- While doing the interpolation rewrite I noticed that DScroller and DPolyAction

were doing some things in their destructor that needed to be done in the
  Destroy method.
- Rewrote the interpolation code. Interpolations are no longer some objects
  that are separate from the rest of the engine. Instead, they are owned by
  the thinkers starting them. Also, polyobjects only spawn a single interpolation
  for each polyobject instead of a single one for each vertex.
  Also, different types of interpolation objects are used for different types
  of interpolation so that they can do some additional work if eventually needed.


SVN r1018 (trunk)
This commit is contained in:
Christoph Oelckers 2008-06-04 17:53:15 +00:00
commit acab6d9b30
22 changed files with 1075 additions and 630 deletions

View file

@ -207,7 +207,7 @@ bool P_MoveLinkedSectors(sector_t *sector, int crush, fixed_t move, bool ceiling
//
//============================================================================
void P_StartLinkedSectorInterpolations(sector_t *sector, bool ceiling)
void P_StartLinkedSectorInterpolations(TArray<DInterpolation *> &list, sector_t *sector, bool ceiling)
{
extsector_t::linked::plane &scrollplane = ceiling? sector->e->Linked.Ceiling : sector->e->Linked.Floor;
@ -215,43 +215,15 @@ void P_StartLinkedSectorInterpolations(sector_t *sector, bool ceiling)
{
if (scrollplane.Sectors[i].Type & LINK_FLOOR)
{
setinterpolation(INTERP_SectorFloor, scrollplane.Sectors[i].Sector, false);
list.Push(scrollplane.Sectors[i].Sector->SetInterpolation(sector_t::FloorMove, false));
}
if (scrollplane.Sectors[i].Type & LINK_CEILING)
{
setinterpolation(INTERP_SectorCeiling, scrollplane.Sectors[i].Sector, false);
list.Push(scrollplane.Sectors[i].Sector->SetInterpolation(sector_t::CeilingMove, false));
}
}
}
//============================================================================
//
// P_StopLinkedSectorInterpolations
//
// Stops interpolators for every sector plane is being changed by moving
// this sector
//
//============================================================================
void P_StopLinkedSectorInterpolations(sector_t *sector, bool ceiling)
{
extsector_t::linked::plane &scrollplane = ceiling? sector->e->Linked.Ceiling : sector->e->Linked.Floor;
for(unsigned i = 0; i < scrollplane.Sectors.Size(); i++)
{
if (scrollplane.Sectors[i].Type & LINK_FLOOR)
{
stopinterpolation(INTERP_SectorFloor, scrollplane.Sectors[i].Sector, false);
}
if (scrollplane.Sectors[i].Type & LINK_CEILING)
{
stopinterpolation(INTERP_SectorCeiling, scrollplane.Sectors[i].Sector, false);
}
}
}
//============================================================================
//
// AddSingleSector