mirror of
https://github.com/risingPhil/libpokemegb.git
synced 2026-03-21 17:44:24 -05:00
Do the same fix for gen 1 SpriteRendering for RGBA32
This commit is contained in:
parent
816c4ea679
commit
7b96cae992
|
|
@ -26,7 +26,10 @@ static uint32_t getRGBA16Offset(int row, int column, int spriteWidthInPixels)
|
|||
*/
|
||||
static bool rgba32_is_white(uint8_t* buffer, uint32_t srcOffset)
|
||||
{
|
||||
return ((*((uint32_t *)(buffer + srcOffset))) == 0xFFFFFFFF);
|
||||
const uint32_t colorVal = *((uint32_t *)(buffer + srcOffset));
|
||||
// generic white: 0xFFFFFFFF
|
||||
// gen 1 pokemon colorpalette white: 0xFFEEFFFF or 0xFFF6FFFF (after convertGBColorPaletteToRGBA24() and adding alpha)
|
||||
return (colorVal == 0xFFFFFFFF || (colorVal == 0xFFFFEEFF) || (colorVal == 0xFFF6FFFF));
|
||||
}
|
||||
|
||||
static bool rgba16_is_white(uint8_t* buffer, uint32_t srcOffset)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user