- Put more floor/ceiling properties in sector_t into a substructure and

added wrapper functions.


SVN r1174 (trunk)
This commit is contained in:
Christoph Oelckers 2008-08-16 20:19:35 +00:00
commit bc5d0c882b
29 changed files with 271 additions and 246 deletions

View file

@ -245,27 +245,27 @@ FTextureID DBaseDecal::StickToWall (side_t *wall, fixed_t x, fixed_t y)
{
RenderFlags |= RF_RELMID;
if (line->flags & ML_DONTPEGBOTTOM)
Z -= front->floortexz;
Z -= front->GetPlaneTexZ(sector_t::floor);
else
Z -= front->ceilingtexz;
Z -= front->GetPlaneTexZ(sector_t::ceiling);
tex = wall->GetTexture(side_t::mid);
}
else if (back->floorplane.ZatPoint (x, y) >= Z)
{
RenderFlags |= RF_RELLOWER|RF_CLIPLOWER;
if (line->flags & ML_DONTPEGBOTTOM)
Z -= front->ceilingtexz;
Z -= front->GetPlaneTexZ(sector_t::ceiling);
else
Z -= back->floortexz;
Z -= back->GetPlaneTexZ(sector_t::floor);
tex = wall->GetTexture(side_t::bottom);
}
else
{
RenderFlags |= RF_RELUPPER|RF_CLIPUPPER;
if (line->flags & ML_DONTPEGTOP)
Z -= front->ceilingtexz;
Z -= front->GetPlaneTexZ(sector_t::ceiling);
else
Z -= back->ceilingtexz;
Z -= back->GetPlaneTexZ(sector_t::ceiling);
tex = wall->GetTexture(side_t::top);
}
@ -301,29 +301,29 @@ fixed_t DBaseDecal::GetRealZ (const side_t *wall) const
case RF_RELUPPER:
if (curline->linedef->flags & ML_DONTPEGTOP)
{
return Z + front->ceilingtexz;
return Z + front->GetPlaneTexZ(sector_t::ceiling);
}
else
{
return Z + back->ceilingtexz;
return Z + back->GetPlaneTexZ(sector_t::ceiling);
}
case RF_RELLOWER:
if (curline->linedef->flags & ML_DONTPEGBOTTOM)
{
return Z + front->ceilingtexz;
return Z + front->GetPlaneTexZ(sector_t::ceiling);
}
else
{
return Z + back->floortexz;
return Z + back->GetPlaneTexZ(sector_t::floor);
}
case RF_RELMID:
if (curline->linedef->flags & ML_DONTPEGBOTTOM)
{
return Z + front->floortexz;
return Z + front->GetPlaneTexZ(sector_t::floor);
}
else
{
return Z + front->ceilingtexz;
return Z + front->GetPlaneTexZ(sector_t::ceiling);
}
}
}