mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-24 14:49:53 -06:00
2D: fix fade effects to semitransp sprites and 3D layer. fixes #263
(also remove some useless variable. wtf)
This commit is contained in:
@ -1218,21 +1218,27 @@ void GPU2D::DrawScanline_Mode1(u32 line, u32* dst)
|
|||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if ((BlendCnt & flag1) && (windowmask[i] & 0x20))
|
else
|
||||||
{
|
{
|
||||||
if ((bldcnteffect == 1) && (BlendCnt & target2))
|
if (flag1 & 0x80) flag1 = 0x10;
|
||||||
|
else if (flag1 & 0x40) flag1 = 0x01;
|
||||||
|
|
||||||
|
if ((BlendCnt & flag1) && (windowmask[i] & 0x20))
|
||||||
{
|
{
|
||||||
coloreffect = 1;
|
if ((bldcnteffect == 1) && (BlendCnt & target2))
|
||||||
eva = EVA;
|
{
|
||||||
evb = EVB;
|
coloreffect = 1;
|
||||||
|
eva = EVA;
|
||||||
|
evb = EVB;
|
||||||
|
}
|
||||||
|
else if (bldcnteffect >= 2)
|
||||||
|
coloreffect = bldcnteffect;
|
||||||
|
else
|
||||||
|
coloreffect = 0;
|
||||||
}
|
}
|
||||||
else if (bldcnteffect >= 2)
|
|
||||||
coloreffect = bldcnteffect;
|
|
||||||
else
|
else
|
||||||
coloreffect = 0;
|
coloreffect = 0;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
coloreffect = 0;
|
|
||||||
|
|
||||||
switch (coloreffect)
|
switch (coloreffect)
|
||||||
{
|
{
|
||||||
@ -1905,7 +1911,6 @@ void GPU2D::InterleaveSprites(u32* buf, u32 prio, u32* dst)
|
|||||||
{
|
{
|
||||||
if (((buf[i] & 0xF8000) == prio) && (windowmask[i] & 0x10))
|
if (((buf[i] & 0xF8000) == prio) && (windowmask[i] & 0x10))
|
||||||
{
|
{
|
||||||
u32 blendfunc = 0;
|
|
||||||
DrawPixel(&dst[i], buf[i] & 0x7FFF, buf[i] & 0xFF000000);
|
DrawPixel(&dst[i], buf[i] & 0x7FFF, buf[i] & 0xFF000000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user