GBA Video: Re-fix sprite blending

This commit is contained in:
Jeffrey Pfau 2015-05-18 22:44:43 -07:00
parent f2eae7ce33
commit 2161769660
1 changed files with 8 additions and 1 deletions

View File

@ -1765,7 +1765,14 @@ static int _preprocessSprite(struct GBAVideoSoftwareRenderer* renderer, struct G
unsigned charBase = GBAObjAttributesCGetTile(sprite->c) * 0x20;
int variant = renderer->target1Obj && GBAWindowControlIsBlendEnable(renderer->currentWindow.packed) && (renderer->blendEffect == BLEND_BRIGHTEN || renderer->blendEffect == BLEND_DARKEN);
if (GBAObjAttributesAGetMode(sprite->a) == OBJ_MODE_SEMITRANSPARENT) {
variant = 0;
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 (GBAObjAttributesCGetPriority(sprite->c) < target2) {
variant = 0;
}
}
color_t* palette = &renderer->normalPalette[0x100];
if (variant) {