GBA Video: Fix rendering of sprites with objwin passthrough (fixes #128)
Jeffrey Pfau jeffrey@endrift.com
Wed, 05 Nov 2014 05:07:44 -0800
1 files changed,
9 insertions(+),
0 deletions(-)
M
src/gba/renderers/video-software.c
→
src/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) {