all repos — mgba @ e9c97bed0069f52007f429182cb64b16adc18cfd

mGBA Game Boy Advance Emulator

GBA Video: Fix OBJ semitransparency interaction properly...
Jeffrey Pfau jeffrey@endrift.com
Thu, 24 Sep 2015 20:24:22 -0700
commit

e9c97bed0069f52007f429182cb64b16adc18cfd

parent

d0c2d4e46ba6776c3572159329d50213baff2725

1 files changed, 2 insertions(+), 3 deletions(-)

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

@@ -149,15 +149,14 @@ return 0;

} int variant = renderer->target1Obj && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && - (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN) && - GBAObjAttributesAGetMode(sprite->a) != OBJ_MODE_SEMITRANSPARENT; + (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT) { int target2 = renderer->target2Bd << 4; target2 |= renderer->bg[0].target2 << (renderer->bg[0].priority); target2 |= renderer->bg[1].target2 << (renderer->bg[1].priority); target2 |= renderer->bg[2].target2 << (renderer->bg[2].priority); target2 |= renderer->bg[3].target2 << (renderer->bg[3].priority); - if ((1 << GBAObjAttributesCGetPriority(sprite->c)) < target2) { + if ((1 << GBAObjAttributesCGetPriority(sprite->c)) <= target2) { variant = 0; } }