diff --git a/CHANGES b/CHANGES index 559dac8ea..eb5c5296b 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,7 @@ Bugfixes: - Util: Fix PowerPC PNG read/write pixel order - GBA Video: Fix edge case with sprite blend modes and semitransparency - GBA Video: Fix objwin and blending interaction on sprites + - GBA Video: Fix OBJ semitransparency improperly interacting with other blending ops Misc: - Qt: Window size command line options are now supported - Qt: Increase usability of key mapper diff --git a/src/gba/renderers/software-obj.c b/src/gba/renderers/software-obj.c index afa3738e0..36185aa8d 100644 --- a/src/gba/renderers/software-obj.c +++ b/src/gba/renderers/software-obj.c @@ -147,7 +147,10 @@ int GBAVideoSoftwareRendererPreprocessSprite(struct GBAVideoSoftwareRenderer* re if (GBARegisterDISPCNTGetMode(renderer->dispcnt) >= 3 && GBAObjAttributesCGetTile(sprite->c) < 512) { return 0; } - int variant = renderer->target1Obj && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN); + int variant = renderer->target1Obj && + GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && + (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN) && + GBAObjAttributesAGetMode(sprite->a) != OBJ_MODE_SEMITRANSPARENT; if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT) { int target2 = renderer->target2Bd << 4; target2 |= renderer->bg[0].target2 << (renderer->bg[0].priority);