Support OBJWIN in mode 4
Jeffrey Pfau jeffrey@endrift.com
Sat, 26 Oct 2013 02:26:08 -0700
1 files changed,
6 insertions(+),
5 deletions(-)
M
src/gba/renderers/video-software.c
→
src/gba/renderers/video-software.c
@@ -1103,11 +1103,12 @@
color = ((uint8_t*)renderer->d.vram)[offset + (localX >> 8) + (localY >> 8) * VIDEO_HORIZONTAL_PIXELS]; uint32_t current = renderer->row[outX]; - if (color && !(current & FLAG_FINALIZED) && (!objwinSlowPath || !(current & FLAG_OBJWIN) != objwinOnly)) { - if (!variant) { - _composite(renderer, outX, renderer->normalPalette[color] | flags, current); - } else { - _composite(renderer, outX, renderer->variantPalette[color] | flags, current); + if (color && !(current & FLAG_FINALIZED)) { + if (!objwinSlowPath) { + _composite(renderer, outX, palette[color] | flags, current); + } else if (objwinForceEnable || !(current & FLAG_OBJWIN) == objwinOnly) { + color_t* currentPalette = (current & FLAG_OBJWIN) ? objwinPalette : palette; + _composite(renderer, outX, currentPalette[color] | flags, current); } } }