Update variant palettes when writing to palette
Jeffrey Pfau jeffrey@endrift.com
Wed, 01 May 2013 02:37:15 -0700
1 files changed,
5 insertions(+),
0 deletions(-)
M
src/gba/renderers/video-software.c
→
src/gba/renderers/video-software.c
@@ -194,6 +194,11 @@ color32 |= (value << 3) & 0xF8;
color32 |= (value << 6) & 0xF800; color32 |= (value << 9) & 0xF80000; softwareRenderer->normalPalette[address >> 1] = color32; + if (softwareRenderer->blendEffect == BLEND_BRIGHTEN) { + softwareRenderer->variantPalette[address >> 1] = _brighten(color32, softwareRenderer->bldy); + } else if (softwareRenderer->blendEffect == BLEND_DARKEN) { + softwareRenderer->variantPalette[address >> 1] = _darken(color32, softwareRenderer->bldy); + } } static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* renderer, int y) {