aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2018-12-13 19:21:03 +0100
committerStapleButter <thetotalworm@gmail.com>2018-12-13 19:21:03 +0100
commit32392cc8e2eb30d05683d8997bc06194ddfac856 (patch)
treea2a39b73f3f98ffbd8e2b7c1cdb6b1c2fedd379d
parenteb1289c2fa4e1ab9c0cabb24c5bfe6e27a036f2d (diff)
2D: blending cases that bypass the BLDCNT first-target check (semitransp sprite, 3D layer) also bypass the window 'color effect enable' check.
fixes #299
-rw-r--r--src/GPU2D.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp
index db58268..4951404 100644
--- a/src/GPU2D.cpp
+++ b/src/GPU2D.cpp
@@ -1167,11 +1167,7 @@ void GPU2D::DrawScanline_Mode1(u32 line, u32* dst)
else if (flag2 & 0x40) target2 = 0x0100;
else target2 = flag2 << 8;
- if (!(windowmask[i] & 0x20))
- {
- coloreffect = 0;
- }
- else if ((flag1 & 0x80) && (BlendCnt & target2))
+ if ((flag1 & 0x80) && (BlendCnt & target2))
{
// sprite blending
@@ -1214,7 +1210,7 @@ void GPU2D::DrawScanline_Mode1(u32 line, u32* dst)
continue;
}
- else if (BlendCnt & flag1)
+ else if ((BlendCnt & flag1) && (windowmask[i] & 0x20))
{
if ((bldcnteffect == 1) && (BlendCnt & target2))
{