Fix compiler warnings

This commit is contained in:
Philippe Symons 2024-08-08 21:45:51 +02:00
parent bd95cc3ef8
commit 2136e90bde
2 changed files with 4 additions and 0 deletions

View File

@ -473,13 +473,16 @@ uint8_t* SpriteRenderer::draw(const uint8_t* spriteBuffer, OutputFormat format,
{
case OutputFormat::RGB:
rgbPalette = convertGBColorPaletteToRGB24(palette);
rgba16Palette = nullptr;
numColorComponents = 3;
break;
case OutputFormat::RGBA32:
rgbPalette = convertGBColorPaletteToRGB24(palette);
rgba16Palette = nullptr;
numColorComponents = 4;
break;
case OutputFormat::RGBA16:
rgbPalette = nullptr;
rgba16Palette = convertGBColorPaletteToRGBA16(palette);
numColorComponents = 2;
break;

View File

@ -243,6 +243,7 @@ bool write_png(const char *filename, unsigned char *rgb_data, int width, int hei
(void)rgb_data;
(void)width;
(void)height;
(void)hasAlpha;
fprintf(stderr, "Error: Can't write %s! PNG support was not enabled at build time!\n", filename);
return false;