GBA Video: Fix OBJ semitransparency improperly interacting with other blending ops

This commit is contained in:
Jeffrey Pfau 2015-09-23 20:36:57 -07:00
parent 11a6a1b3a0
commit 9cd5b12925
2 changed files with 5 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Bugfixes:
- VFS: Fix return values of VFileFILE.read and .write
- 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: Remove useless help icons in dialogs
- GBA: Attempting to save a screenshot-style savestate should be allowed without libpng

View File

@ -145,7 +145,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);