Fixed Dreamcast build isues with latest GCC14.1.0

- Apparently the latest GCC14.1.0 got stricter about integer/pointer
  conversions.
- Fixed two functions which failed to build due to implicitly converting between
  typedefs to unsigned and void* by adding explicit casts.
This commit is contained in:
Falco Girgis 2024-07-02 00:11:45 -05:00
parent 889af509fa
commit e0386ae7a6

View file

@ -342,7 +342,7 @@ static GfxResourceID Gfx_AllocTexture(struct Bitmap* bmp, int rowWidth, cc_uint8
int width, height; int width, height;
gldcGetTexture(&pixels, &width, &height); gldcGetTexture(&pixels, &width, &height);
ConvertTexture(pixels, bmp, rowWidth); ConvertTexture(pixels, bmp, rowWidth);
return texId; return (GfxResourceID)texId;
} }
// TODO: struct GPUTexture ?? // TODO: struct GPUTexture ??
@ -372,7 +372,7 @@ static void ConvertSubTexture(cc_uint16* dst, int texWidth, int texHeight,
} }
void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, int rowWidth, cc_bool mipmaps) { void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, int rowWidth, cc_bool mipmaps) {
gldcBindTexture(texId); gldcBindTexture((GLuint)texId);
void* pixels; void* pixels;
int width, height; int width, height;