mirror of https://github.com/mgba-emu/mgba.git
GBA Video: Fix OBJ semitransparency interaction properly...
This commit is contained in:
parent
d0c2d4e46b
commit
e9c97bed00
|
@ -149,15 +149,14 @@ int GBAVideoSoftwareRendererPreprocessSprite(struct GBAVideoSoftwareRenderer* re
|
||||||
}
|
}
|
||||||
int variant = renderer->target1Obj &&
|
int variant = renderer->target1Obj &&
|
||||||
GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) &&
|
GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) &&
|
||||||
(renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN) &&
|
(renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN);
|
||||||
GBAObjAttributesAGetMode(sprite->a) != OBJ_MODE_SEMITRANSPARENT;
|
|
||||||
if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT) {
|
if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT) {
|
||||||
int target2 = renderer->target2Bd << 4;
|
int target2 = renderer->target2Bd << 4;
|
||||||
target2 |= renderer->bg[0].target2 << (renderer->bg[0].priority);
|
target2 |= renderer->bg[0].target2 << (renderer->bg[0].priority);
|
||||||
target2 |= renderer->bg[1].target2 << (renderer->bg[1].priority);
|
target2 |= renderer->bg[1].target2 << (renderer->bg[1].priority);
|
||||||
target2 |= renderer->bg[2].target2 << (renderer->bg[2].priority);
|
target2 |= renderer->bg[2].target2 << (renderer->bg[2].priority);
|
||||||
target2 |= renderer->bg[3].target2 << (renderer->bg[3].priority);
|
target2 |= renderer->bg[3].target2 << (renderer->bg[3].priority);
|
||||||
if ((1 << GBAObjAttributesCGetPriority(sprite->c)) < target2) {
|
if ((1 << GBAObjAttributesCGetPriority(sprite->c)) <= target2) {
|
||||||
variant = 0;
|
variant = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue