GBA Video: Fix OBJWIN mosaic sprites
Jeffrey Pfau jeffrey@endrift.com
Sun, 20 Sep 2015 21:10:02 -0700
1 files changed,
12 insertions(+),
2 deletions(-)
jump to
M
src/gba/renderers/software-obj.c
→
src/gba/renderers/software-obj.c
@@ -236,7 +236,12 @@ palette = &palette[GBAObjAttributesCGetPalette(sprite->c) << 4];
if (flags & FLAG_OBJWIN) { SPRITE_NORMAL_LOOP(16, OBJWIN); } else if (GBAObjAttributesAIsMosaic(sprite->a)) { - SPRITE_MOSAIC_LOOP(16, NORMAL); + if (objwinSlowPath) { + objwinPalette = &objwinPalette[GBAObjAttributesCGetPalette(sprite->c) << 4]; + SPRITE_MOSAIC_LOOP(16, NORMAL_OBJWIN); + } else { + SPRITE_MOSAIC_LOOP(16, NORMAL); + } } else if (objwinSlowPath) { objwinPalette = &objwinPalette[GBAObjAttributesCGetPalette(sprite->c) << 4]; SPRITE_NORMAL_LOOP(16, NORMAL_OBJWIN);@@ -247,7 +252,12 @@ } else {
if (flags & FLAG_OBJWIN) { SPRITE_NORMAL_LOOP(256, OBJWIN); } else if (GBAObjAttributesAIsMosaic(sprite->a)) { - SPRITE_MOSAIC_LOOP(256, NORMAL); + if (objwinSlowPath) { + objwinPalette = &objwinPalette[GBAObjAttributesCGetPalette(sprite->c) << 4]; + SPRITE_MOSAIC_LOOP(256, NORMAL_OBJWIN); + } else { + SPRITE_MOSAIC_LOOP(256, NORMAL); + } } else if (objwinSlowPath) { SPRITE_NORMAL_LOOP(256, NORMAL_OBJWIN); } else {