Remove extra magnitude from magic texture mapping values
- These used to be fixed point, but now they're floating point, so the excess magnitude is unneeded.
This commit is contained in:
parent
fefe6aa2c1
commit
891b3da103
3 changed files with 13 additions and 16 deletions
|
|
@ -809,17 +809,17 @@ void FWallTmapVals::InitFromWallCoords(const FWallCoords *wallc)
|
|||
{
|
||||
if (MirrorFlags & RF_XFLIP)
|
||||
{
|
||||
UoverZorg = (float)wallc->tx2 * WallTMapScale;
|
||||
UoverZstep = (float)(-wallc->ty2) * 32.f;
|
||||
InvZorg = (float)(wallc->tx2 - wallc->tx1) * WallTMapScale;
|
||||
InvZstep = (float)(wallc->ty1 - wallc->ty2) * 32.f;
|
||||
UoverZorg = (float)wallc->tx2 * centerx;
|
||||
UoverZstep = (float)(-wallc->ty2);
|
||||
InvZorg = (float)(wallc->tx2 - wallc->tx1) * centerx;
|
||||
InvZstep = (float)(wallc->ty1 - wallc->ty2);
|
||||
}
|
||||
else
|
||||
{
|
||||
UoverZorg = (float)wallc->tx1 * WallTMapScale;
|
||||
UoverZstep = (float)(-wallc->ty1) * 32.f;
|
||||
InvZorg = (float)(wallc->tx1 - wallc->tx2) * WallTMapScale;
|
||||
InvZstep = (float)(wallc->ty2 - wallc->ty1) * 32.f;
|
||||
UoverZorg = (float)wallc->tx1 * centerx;
|
||||
UoverZstep = (float)(-wallc->ty1);
|
||||
InvZorg = (float)(wallc->tx1 - wallc->tx2) * centerx;
|
||||
InvZstep = (float)(wallc->ty2 - wallc->ty1);
|
||||
}
|
||||
InitDepth();
|
||||
}
|
||||
|
|
@ -837,10 +837,10 @@ void FWallTmapVals::InitFromLine(int tx1, int ty1, int tx2, int ty2)
|
|||
fullx2 = -fullx2;
|
||||
}
|
||||
|
||||
UoverZorg = (float)fullx1 * WallTMapScale;
|
||||
UoverZstep = (float)(-fully1) * 32.f;
|
||||
InvZorg = (float)(fullx1 - fullx2) * WallTMapScale;
|
||||
InvZstep = (float)(fully2 - fully1) * 32.f;
|
||||
UoverZorg = (float)fullx1 * centerx;
|
||||
UoverZstep = (float)(-fully1);
|
||||
InvZorg = (float)(fullx1 - fullx2) * centerx;
|
||||
InvZstep = (float)(fully2 - fully1);
|
||||
InitDepth();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue