Sprites shouldn't be blended if the current window has blending disabled

This commit is contained in:
Jeffrey Pfau 2013-10-15 21:44:47 -07:00
parent ce33adf5e4
commit 0120ea93a5
1 changed files with 2 additions and 2 deletions

View File

@ -1234,7 +1234,7 @@ static void _preprocessSprite(struct GBAVideoSoftwareRenderer* renderer, struct
return; return;
} }
uint32_t flags = (sprite->priority << OFFSET_PRIORITY) | FLAG_FINALIZED; uint32_t flags = (sprite->priority << OFFSET_PRIORITY) | FLAG_FINALIZED;
flags |= FLAG_TARGET_1 * ((renderer->target1Obj && renderer->blendEffect == BLEND_ALPHA) || sprite->mode == OBJ_MODE_SEMITRANSPARENT); flags |= FLAG_TARGET_1 * ((renderer->currentWindow.blendEnable && renderer->target1Obj && renderer->blendEffect == BLEND_ALPHA) || sprite->mode == OBJ_MODE_SEMITRANSPARENT);
flags |= FLAG_TARGET_2 *renderer->target2Obj; flags |= FLAG_TARGET_2 *renderer->target2Obj;
flags |= FLAG_OBJWIN * (sprite->mode == OBJ_MODE_OBJWIN); flags |= FLAG_OBJWIN * (sprite->mode == OBJ_MODE_OBJWIN);
int x = sprite->x; int x = sprite->x;
@ -1277,7 +1277,7 @@ static void _preprocessTransformedSprite(struct GBAVideoSoftwareRenderer* render
return; return;
} }
uint32_t flags = (sprite->priority << OFFSET_PRIORITY) | FLAG_FINALIZED; uint32_t flags = (sprite->priority << OFFSET_PRIORITY) | FLAG_FINALIZED;
flags |= FLAG_TARGET_1 * ((renderer->target1Obj && renderer->blendEffect == BLEND_ALPHA) || sprite->mode == OBJ_MODE_SEMITRANSPARENT); flags |= FLAG_TARGET_1 * ((renderer->currentWindow.blendEnable && renderer->target1Obj && renderer->blendEffect == BLEND_ALPHA) || sprite->mode == OBJ_MODE_SEMITRANSPARENT);
flags |= FLAG_TARGET_2 * renderer->target2Obj; flags |= FLAG_TARGET_2 * renderer->target2Obj;
flags |= FLAG_OBJWIN * (sprite->mode == OBJ_MODE_OBJWIN); flags |= FLAG_OBJWIN * (sprite->mode == OBJ_MODE_OBJWIN);
int x = sprite->x; int x = sprite->x;