mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 05:01:41 +00:00
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();
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,6 @@ FDynamicColormap*basecolormap; // [RH] colormap currently drawing with
|
|||
int fixedlightlev;
|
||||
lighttable_t *fixedcolormap;
|
||||
FSpecialColormap *realfixedcolormap;
|
||||
float WallTMapScale;
|
||||
float WallTMapScale2;
|
||||
|
||||
|
||||
|
@ -386,8 +385,7 @@ void R_SWRSetWindow(int windowSize, int fullWidth, int fullHeight, int stHeight,
|
|||
iyaspectmulfloat = (float)virtwidth * r_Yaspect / 320.f / (float)virtheight;
|
||||
InvZtoScale = yaspectmul * centerx;
|
||||
|
||||
WallTMapScale = (float)centerx * 32.f;
|
||||
WallTMapScale2 = iyaspectmulfloat * 2.f / (float)centerx;
|
||||
WallTMapScale2 = iyaspectmulfloat * 64.f / (float)centerx;
|
||||
|
||||
// psprite scales
|
||||
pspritexscale = (centerxwide << FRACBITS) / 160;
|
||||
|
|
|
@ -42,7 +42,6 @@ extern fixed_t FocalLengthX, FocalLengthY;
|
|||
extern float FocalLengthXfloat;
|
||||
extern fixed_t InvZtoScale;
|
||||
|
||||
extern float WallTMapScale;
|
||||
extern float WallTMapScale2;
|
||||
|
||||
extern int viewwindowx;
|
||||
|
|
Loading…
Reference in a new issue