all repos — mgba @ 9ba250e9bb85b8ff61f5ebc06006161611d44bda

mGBA Game Boy Advance Emulator

GBA Video: Fix rendering of sprites with objwin passthrough (fixes #128)
Jeffrey Pfau jeffrey@endrift.com
Wed, 05 Nov 2014 05:07:44 -0800
commit

9ba250e9bb85b8ff61f5ebc06006161611d44bda

parent

25f5520b0b59a5235dae0c9c476baa9e2753269f

1 files changed, 9 insertions(+), 0 deletions(-)

jump to
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -1631,6 +1631,15 @@ _compositeBlendObjwin(renderer, pixel, color | flags, current);

} } return; + } else { + for (x = 0; x < VIDEO_HORIZONTAL_PIXELS; ++x, ++pixel) { + uint32_t color = renderer->spriteLayer[x] & ~FLAG_OBJWIN; + uint32_t current = *pixel; + if ((color & FLAG_UNWRITTEN) != FLAG_UNWRITTEN && (color & FLAG_PRIORITY) >> OFFSET_PRIORITY == priority) { + _compositeBlendObjwin(renderer, pixel, color | flags, current); + } + } + return; } } for (x = 0; x < VIDEO_HORIZONTAL_PIXELS; ++x, ++pixel) {