GBA Video: Fix rendering of sprites with objwin passthrough (fixes #128)

This commit is contained in:
Jeffrey Pfau 2014-11-05 05:07:44 -08:00
parent 25f5520b0b
commit 9ba250e9bb
1 changed files with 9 additions and 0 deletions

View File

@ -1631,6 +1631,15 @@ static void _postprocessSprite(struct GBAVideoSoftwareRenderer* renderer, unsign
}
}
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) {