Fix wall scroller direction

This commit is contained in:
Magnus Norddahl 2017-02-14 02:52:41 +01:00
parent 2a71ec89de
commit 5ef8ecce2a

View file

@ -163,21 +163,6 @@ namespace swrenderer
float depthScale = (float)(WallT.InvZstep * viewport->WallTMapScale2);
float depthOrg = (float)(-WallT.UoverZstep * viewport->WallTMapScale2);
if (xrepeat < 0.0f)
{
for (int x = x1; x < x2; x++)
{
float u = uOverZ / invZ;
UPos[x] = (fixed_t)((xrepeat - u * xrepeat) * FRACUNIT);
VStep[x] = depthOrg + u * depthScale;
uOverZ += uGradient;
invZ += zGradient;
}
}
else
{
for (int x = x1; x < x2; x++)
{
float u = uOverZ / invZ;
@ -189,7 +174,6 @@ namespace swrenderer
invZ += zGradient;
}
}
}
void ProjectedWallTexcoords::ProjectPos(double walxrepeat, int x1, int x2, const FWallTmapVals &WallT)
{
@ -201,20 +185,6 @@ namespace swrenderer
float zGradient = WallT.InvZstep;
float xrepeat = (float)walxrepeat;
if (xrepeat < 0.0f)
{
for (int x = x1; x < x2; x++)
{
float u = uOverZ / invZ * xrepeat - xrepeat;
UPos[x] = (fixed_t)(u * FRACUNIT);
uOverZ += uGradient;
invZ += zGradient;
}
}
else
{
for (int x = x1; x < x2; x++)
{
float u = uOverZ / invZ * xrepeat;
@ -225,5 +195,4 @@ namespace swrenderer
invZ += zGradient;
}
}
}
}