mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 21:37:42 -07:00
fix rendering for crapoed 'butterfly' polygons
This commit is contained in:
parent
209a639461
commit
da10f9b3f6
@ -723,8 +723,7 @@ void SubmitPolygon()
|
||||
// clipping
|
||||
|
||||
nverts = ClipPolygon<true>(clippedvertices, nverts, clipstart);
|
||||
//if (((CurPolygonAttr >> 16) & 0x1F) != 0x1F) nverts=0;
|
||||
//CurPolygonAttr|=0x1F0000;
|
||||
|
||||
if (nverts == 0)
|
||||
{
|
||||
LastStripPolygon = NULL;
|
||||
|
@ -255,10 +255,10 @@ public:
|
||||
return x0;
|
||||
}
|
||||
|
||||
s32 Setup(s32 x0, s32 x1, s32 y0, s32 y1, s32 w0, s32 w1)
|
||||
s32 Setup(s32 x0, s32 x1, s32 y0, s32 y1, s32 w0, s32 w1, s32 y)
|
||||
{
|
||||
this->x0 = x0;
|
||||
this->y = y0;
|
||||
this->y = y;
|
||||
|
||||
if (x1 > x0)
|
||||
{
|
||||
@ -310,6 +310,8 @@ public:
|
||||
else dx = 0;
|
||||
}
|
||||
|
||||
dx += (y - y0) * Increment;
|
||||
|
||||
s32 x = XVal();
|
||||
|
||||
if (XMajor)
|
||||
@ -831,7 +833,7 @@ void SetupPolygonLeftEdge(RendererPolygon* rp, s32 y)
|
||||
|
||||
rp->XL = rp->SlopeL.Setup(polygon->Vertices[rp->CurVL]->FinalPosition[0], polygon->Vertices[rp->NextVL]->FinalPosition[0],
|
||||
polygon->Vertices[rp->CurVL]->FinalPosition[1], polygon->Vertices[rp->NextVL]->FinalPosition[1],
|
||||
polygon->FinalW[rp->CurVL], polygon->FinalW[rp->NextVL]);
|
||||
polygon->FinalW[rp->CurVL], polygon->FinalW[rp->NextVL], y);
|
||||
}
|
||||
|
||||
void SetupPolygonRightEdge(RendererPolygon* rp, s32 y)
|
||||
@ -858,7 +860,7 @@ void SetupPolygonRightEdge(RendererPolygon* rp, s32 y)
|
||||
|
||||
rp->XR = rp->SlopeR.Setup(polygon->Vertices[rp->CurVR]->FinalPosition[0], polygon->Vertices[rp->NextVR]->FinalPosition[0],
|
||||
polygon->Vertices[rp->CurVR]->FinalPosition[1], polygon->Vertices[rp->NextVR]->FinalPosition[1],
|
||||
polygon->FinalW[rp->CurVR], polygon->FinalW[rp->NextVR]);
|
||||
polygon->FinalW[rp->CurVR], polygon->FinalW[rp->NextVR], y);
|
||||
}
|
||||
|
||||
void SetupPolygon(RendererPolygon* rp, Polygon* polygon)
|
||||
|
Loading…
Reference in New Issue
Block a user