GBA Video: WIN0/1 take priority over OBJWIN
Jeffrey Pfau jeffrey@endrift.com
Sun, 14 Aug 2016 04:19:08 -0700
2 files changed,
4 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -22,6 +22,7 @@ - Wii: Fix framelimiting after a slowdown
- PSP2: Fix gyroscope direction - Qt: Fix hanging key press after disabling autofire - PSP2: Delete threads after they return + - GBA Video: WIN0/1 take priority over OBJWIN Misc: - 3DS: Use blip_add_delta_fast for a small speed improvement - OpenGL: Log shader compilation failure
M
src/gba/renderers/software-obj.c
→
src/gba/renderers/software-obj.c
@@ -142,6 +142,9 @@ int end = renderer->end;
uint32_t flags = GBAObjAttributesCGetPriority(sprite->c) << OFFSET_PRIORITY; flags |= FLAG_TARGET_1 * ((GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && renderer->target1Obj && renderer->blendEffect == BLEND_ALPHA) || GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT); flags |= FLAG_OBJWIN * (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_OBJWIN); + if ((flags & FLAG_OBJWIN) && renderer->currentWindow.priority < renderer->objwin.priority) { + return 0; + } int32_t x = (uint32_t) GBAObjAttributesBGetX(sprite->b) << 23; x >>= 23; uint16_t* vramBase = &renderer->d.vram[BASE_TILE >> 1];