mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-17 17:11:19 +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)
|
if (MirrorFlags & RF_XFLIP)
|
||||||
{
|
{
|
||||||
UoverZorg = (float)wallc->tx2 * WallTMapScale;
|
UoverZorg = (float)wallc->tx2 * centerx;
|
||||||
UoverZstep = (float)(-wallc->ty2) * 32.f;
|
UoverZstep = (float)(-wallc->ty2);
|
||||||
InvZorg = (float)(wallc->tx2 - wallc->tx1) * WallTMapScale;
|
InvZorg = (float)(wallc->tx2 - wallc->tx1) * centerx;
|
||||||
InvZstep = (float)(wallc->ty1 - wallc->ty2) * 32.f;
|
InvZstep = (float)(wallc->ty1 - wallc->ty2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UoverZorg = (float)wallc->tx1 * WallTMapScale;
|
UoverZorg = (float)wallc->tx1 * centerx;
|
||||||
UoverZstep = (float)(-wallc->ty1) * 32.f;
|
UoverZstep = (float)(-wallc->ty1);
|
||||||
InvZorg = (float)(wallc->tx1 - wallc->tx2) * WallTMapScale;
|
InvZorg = (float)(wallc->tx1 - wallc->tx2) * centerx;
|
||||||
InvZstep = (float)(wallc->ty2 - wallc->ty1) * 32.f;
|
InvZstep = (float)(wallc->ty2 - wallc->ty1);
|
||||||
}
|
}
|
||||||
InitDepth();
|
InitDepth();
|
||||||
}
|
}
|
||||||
|
@ -837,10 +837,10 @@ void FWallTmapVals::InitFromLine(int tx1, int ty1, int tx2, int ty2)
|
||||||
fullx2 = -fullx2;
|
fullx2 = -fullx2;
|
||||||
}
|
}
|
||||||
|
|
||||||
UoverZorg = (float)fullx1 * WallTMapScale;
|
UoverZorg = (float)fullx1 * centerx;
|
||||||
UoverZstep = (float)(-fully1) * 32.f;
|
UoverZstep = (float)(-fully1);
|
||||||
InvZorg = (float)(fullx1 - fullx2) * WallTMapScale;
|
InvZorg = (float)(fullx1 - fullx2) * centerx;
|
||||||
InvZstep = (float)(fully2 - fully1) * 32.f;
|
InvZstep = (float)(fully2 - fully1);
|
||||||
InitDepth();
|
InitDepth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,6 @@ FDynamicColormap*basecolormap; // [RH] colormap currently drawing with
|
||||||
int fixedlightlev;
|
int fixedlightlev;
|
||||||
lighttable_t *fixedcolormap;
|
lighttable_t *fixedcolormap;
|
||||||
FSpecialColormap *realfixedcolormap;
|
FSpecialColormap *realfixedcolormap;
|
||||||
float WallTMapScale;
|
|
||||||
float WallTMapScale2;
|
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;
|
iyaspectmulfloat = (float)virtwidth * r_Yaspect / 320.f / (float)virtheight;
|
||||||
InvZtoScale = yaspectmul * centerx;
|
InvZtoScale = yaspectmul * centerx;
|
||||||
|
|
||||||
WallTMapScale = (float)centerx * 32.f;
|
WallTMapScale2 = iyaspectmulfloat * 64.f / (float)centerx;
|
||||||
WallTMapScale2 = iyaspectmulfloat * 2.f / (float)centerx;
|
|
||||||
|
|
||||||
// psprite scales
|
// psprite scales
|
||||||
pspritexscale = (centerxwide << FRACBITS) / 160;
|
pspritexscale = (centerxwide << FRACBITS) / 160;
|
||||||
|
|
|
@ -42,7 +42,6 @@ extern fixed_t FocalLengthX, FocalLengthY;
|
||||||
extern float FocalLengthXfloat;
|
extern float FocalLengthXfloat;
|
||||||
extern fixed_t InvZtoScale;
|
extern fixed_t InvZtoScale;
|
||||||
|
|
||||||
extern float WallTMapScale;
|
|
||||||
extern float WallTMapScale2;
|
extern float WallTMapScale2;
|
||||||
|
|
||||||
extern int viewwindowx;
|
extern int viewwindowx;
|
||||||
|
|
Loading…
Reference in a new issue