Merge branch 'main' of github.com:risingPhil/libpokemegb into main

This commit is contained in:
risingPhil 2024-08-09 12:53:41 +02:00
commit 044bb1f6e3
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;