mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 08:41:59 +00:00
Remove DepthScale and DepthOrg from FWallTmapVals
This commit is contained in:
parent
891b3da103
commit
bf0856aef5
3 changed files with 3 additions and 11 deletions
|
@ -821,7 +821,6 @@ void FWallTmapVals::InitFromWallCoords(const FWallCoords *wallc)
|
|||
InvZorg = (float)(wallc->tx1 - wallc->tx2) * centerx;
|
||||
InvZstep = (float)(wallc->ty2 - wallc->ty1);
|
||||
}
|
||||
InitDepth();
|
||||
}
|
||||
|
||||
void FWallTmapVals::InitFromLine(int tx1, int ty1, int tx2, int ty2)
|
||||
|
@ -841,13 +840,6 @@ void FWallTmapVals::InitFromLine(int tx1, int ty1, int tx2, int ty2)
|
|||
UoverZstep = (float)(-fully1);
|
||||
InvZorg = (float)(fullx1 - fullx2) * centerx;
|
||||
InvZstep = (float)(fully2 - fully1);
|
||||
InitDepth();
|
||||
}
|
||||
|
||||
void FWallTmapVals::InitDepth()
|
||||
{
|
||||
DepthScale = InvZstep * WallTMapScale2;
|
||||
DepthOrg = -UoverZstep * WallTMapScale2;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -44,13 +44,11 @@ struct FWallCoords
|
|||
|
||||
struct FWallTmapVals
|
||||
{
|
||||
float DepthOrg, DepthScale;
|
||||
float UoverZorg, UoverZstep;
|
||||
float InvZorg, InvZstep;
|
||||
|
||||
void InitFromWallCoords(const FWallCoords *wallc);
|
||||
void InitFromLine(int x1, int y1, int x2, int y2);
|
||||
void InitDepth();
|
||||
};
|
||||
|
||||
extern FWallCoords WallC;
|
||||
|
|
|
@ -2893,6 +2893,8 @@ void PrepWall (fixed_t *swall, fixed_t *lwall, fixed_t walxrepeat, int x1, int x
|
|||
{ // swall = scale, lwall = texturecolumn
|
||||
double top, bot, i;
|
||||
double xrepeat = fabs((double)walxrepeat);
|
||||
double depth_scale = WallT.InvZstep * WallTMapScale2;
|
||||
double depth_org = -WallT.UoverZstep * WallTMapScale2;
|
||||
|
||||
i = x1 - centerx;
|
||||
top = WallT.UoverZorg + WallT.UoverZstep * i;
|
||||
|
@ -2909,7 +2911,7 @@ void PrepWall (fixed_t *swall, fixed_t *lwall, fixed_t walxrepeat, int x1, int x
|
|||
{
|
||||
lwall[x] = xs_RoundToInt(frac * xrepeat);
|
||||
}
|
||||
swall[x] = xs_RoundToInt(frac * WallT.DepthScale + WallT.DepthOrg);
|
||||
swall[x] = xs_RoundToInt(frac * depth_scale + depth_org);
|
||||
top += WallT.UoverZstep;
|
||||
bot += WallT.InvZstep;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue