reworked the skewing properties.
The Eternity-based definitions are currently disabled due to unclear semantics and overall unsatisfying design. They can be re-enabled once their precise working has been established. New properties were added to replace them with something that will be clearly specified and is fully ortohonal i.e. they will allow to align an upper tier skew with the floor as well and a lower tier's skew with a ceiling.
This commit is contained in:
parent
f92f6b8de4
commit
b48caddb96
5 changed files with 70 additions and 10 deletions
|
|
@ -2280,11 +2280,27 @@ void HWWall::Process(HWWallDispatcher *di, seg_t *seg, sector_t * frontsector, s
|
|||
if (texture && texture->isValid())
|
||||
{
|
||||
int skewflag = seg->sidedef->textures[side_t::top].skew;
|
||||
float skew;
|
||||
if (skewflag == 0) skewflag = topskew;
|
||||
float skew =
|
||||
skewflag == side_t::skew_front ? fch2 - fch1 :
|
||||
skewflag == side_t::skew_back ? bch2 - bch1 : 0.;
|
||||
|
||||
switch (skewflag)
|
||||
{
|
||||
default:
|
||||
skew = 0;
|
||||
break;
|
||||
case side_t::skew_front_ceiling:
|
||||
skew = fch2 - fch1;
|
||||
break;
|
||||
case side_t::skew_back_ceiling:
|
||||
skew = bch2 - bch1;
|
||||
break;
|
||||
case side_t::skew_front_floor:
|
||||
skew = bfh2 - bfh1;
|
||||
break;
|
||||
case side_t::skew_back_floor:
|
||||
skew = ffh2 - ffh1;
|
||||
break;
|
||||
}
|
||||
DoTexture(di, RENDERWALL_TOP, seg, (seg->linedef->flags & (ML_DONTPEGTOP)) == 0,
|
||||
crefz, realback->GetPlaneTexZ(sector_t::ceiling),
|
||||
fch1, fch2, bch1a, bch2a, 0, skew);
|
||||
|
|
@ -2407,9 +2423,25 @@ void HWWall::Process(HWWallDispatcher *di, seg_t *seg, sector_t * frontsector, s
|
|||
{
|
||||
int skewflag = seg->sidedef->textures[side_t::bottom].skew;
|
||||
if (skewflag == 0) skewflag = bottomskew;
|
||||
float skew =
|
||||
skewflag == side_t::skew_back ? bfh2a - bfh1a :
|
||||
skewflag == side_t::skew_front ? ffh2 - ffh1 : 0.;
|
||||
float skew;
|
||||
switch (skewflag)
|
||||
{
|
||||
default:
|
||||
skew = 0;
|
||||
break;
|
||||
case side_t::skew_front_ceiling:
|
||||
skew = fch2 - fch1;
|
||||
break;
|
||||
case side_t::skew_back_ceiling:
|
||||
skew = bch2 - bch1;
|
||||
break;
|
||||
case side_t::skew_front_floor:
|
||||
skew = bfh2a - bfh1a;
|
||||
break;
|
||||
case side_t::skew_back_floor:
|
||||
skew = ffh2 - ffh1;
|
||||
break;
|
||||
}
|
||||
|
||||
DoTexture(di, RENDERWALL_BOTTOM, seg, (seg->linedef->flags & ML_DONTPEGBOTTOM) > 0,
|
||||
realback->GetPlaneTexZ(sector_t::floor), frefz,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue