Skip to content

Commit

Permalink
2D: blending cases that bypass the BLDCNT first-target check (semitra…
Browse files Browse the repository at this point in the history
…nsp sprite, 3D layer) also bypass the window 'color effect enable' check.

fixes #299
  • Loading branch information
Arisotura committed Dec 13, 2018
1 parent eb1289c commit 32392cc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/GPU2D.cpp
Expand Up @@ -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

Expand Down Expand Up @@ -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))
{
Expand Down

0 comments on commit 32392cc

Please sign in to comment.