- moved VM thunks from p_sectors.cpp to a separate file and started adding direct native implementations.

For a few larger functions I took them out of sector_t and made them global functions to avoid creating more unnecessary stubs.
This commit is contained in:
Christoph Oelckers 2018-11-25 11:34:50 +01:00
commit dc16c1d44e
6 changed files with 926 additions and 864 deletions

View file

@ -368,13 +368,13 @@ bool P_CreateCeiling(sector_t *sec, DCeiling::ECeiling type, line_t *line, int t
break;
case DCeiling::ceilLowerByTexture:
targheight = sec->ceilingplane.ZatPoint (spot) - sec->FindShortestUpperAround ();
targheight = sec->ceilingplane.ZatPoint (spot) - FindShortestUpperAround (sec);
ceiling->m_BottomHeight = sec->ceilingplane.PointToDist (spot, targheight);
ceiling->m_Direction = -1;
break;
case DCeiling::ceilRaiseByTexture:
targheight = sec->ceilingplane.ZatPoint (spot) + sec->FindShortestUpperAround ();
targheight = sec->ceilingplane.ZatPoint (spot) + FindShortestUpperAround (sec);
ceiling->m_TopHeight = sec->ceilingplane.PointToDist (spot, targheight);
ceiling->m_Direction = 1;
break;
@ -420,8 +420,8 @@ bool P_CreateCeiling(sector_t *sec, DCeiling::ECeiling type, line_t *line, int t
type == DCeiling::ceilRaiseToFloor ||
/*type == ceilLowerToHighest ||*/
type == DCeiling::ceilLowerToFloor) ?
sec->FindModelFloorSector (targheight) :
sec->FindModelCeilingSector (targheight);
FindModelFloorSector(sec, targheight) :
FindModelCeilingSector(sec, targheight);
if (modelsec != NULL)
{
ceiling->m_Texture = modelsec->GetTexture(sector_t::ceiling);