mirror of https://github.com/mgba-emu/mgba.git
Sprites shouldn't be blended if the current window has blending disabled
This commit is contained in:
parent
ce33adf5e4
commit
0120ea93a5
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue