- floatified p_trace, p_slopes and p_udmf.cpp.
- major cleanup of unused code.
This commit is contained in:
parent
ced30e7bbb
commit
66929cbaff
35 changed files with 350 additions and 529 deletions
|
|
@ -1531,7 +1531,7 @@ void R_DrawNormalPlane (visplane_t *pl, fixed_t alpha, bool additive, bool maske
|
|||
yscale = pl->yscale << (16 - ds_ybits);
|
||||
if (planeang != 0)
|
||||
{
|
||||
double rad = ANGLE2RAD(planeang);
|
||||
double rad = planeang * (M_PI / ANGLE_180);
|
||||
double cosine = cos(rad), sine = sin(rad);
|
||||
|
||||
pviewx = xs_RoundToInt(pl->xoffs + viewx * cosine - viewy * sine);
|
||||
|
|
@ -1668,29 +1668,29 @@ void R_DrawTiltedPlane (visplane_t *pl, fixed_t alpha, bool additive, bool maske
|
|||
// p is the texture origin in view space
|
||||
// Don't add in the offsets at this stage, because doing so can result in
|
||||
// errors if the flat is rotated.
|
||||
ang = ANGLE2RAD(ANG270 - viewangle);
|
||||
ang = (ANG270 - viewangle) * (M_PI / ANGLE_180);
|
||||
p[0] = vx * cos(ang) - vy * sin(ang);
|
||||
p[2] = vx * sin(ang) + vy * cos(ang);
|
||||
p[1] = pl->height.ZatPoint(0.0, 0.0) - vz;
|
||||
|
||||
// m is the v direction vector in view space
|
||||
ang = ANGLE2RAD(ANG180 - viewangle - pl->angle);
|
||||
ang = (ANG180 - viewangle - pl->angle) * (M_PI / ANGLE_180);
|
||||
m[0] = yscale * cos(ang);
|
||||
m[2] = yscale * sin(ang);
|
||||
// m[1] = FIXED2FLOAT(pl->height.ZatPoint (0, iyscale) - pl->height.ZatPoint (0,0));
|
||||
// m[1] = pl->height.ZatPointF (0, iyscale) - pl->height.ZatPointF (0,0));
|
||||
// VectorScale2 (m, 64.f/VectorLength(m));
|
||||
|
||||
// n is the u direction vector in view space
|
||||
ang += PI/2;
|
||||
n[0] = -xscale * cos(ang);
|
||||
n[2] = -xscale * sin(ang);
|
||||
// n[1] = FIXED2FLOAT(pl->height.ZatPoint (ixscale, 0) - pl->height.ZatPoint (0,0));
|
||||
// n[1] = pl->height.ZatPointF (ixscale, 0) - pl->height.ZatPointF (0,0));
|
||||
// VectorScale2 (n, 64.f/VectorLength(n));
|
||||
|
||||
// This code keeps the texture coordinates constant across the x,y plane no matter
|
||||
// how much you slope the surface. Use the commented-out code above instead to keep
|
||||
// the textures a constant size across the surface's plane instead.
|
||||
ang = ANGLE2RAD(pl->angle);
|
||||
ang = pl->angle * (M_PI / ANGLE_180);
|
||||
m[1] = pl->height.ZatPoint(vx + yscale * sin(ang), vy + yscale * cos(ang)) - zeroheight;
|
||||
ang += PI/2;
|
||||
n[1] = pl->height.ZatPoint(vx + xscale * sin(ang), vy + xscale * cos(ang)) - zeroheight;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue