- 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

@ -45,6 +45,7 @@
#include "s_sndseq.h"
#include "v_palette.h"
#include "a_sharedglobal.h"
#include "r_interpolate.h"
static void CopyPlayer (player_t *dst, player_t *src, const char *name);
static void ReadOnePlayer (FArchive &arc);
@ -333,7 +334,11 @@ void P_SerializeWorld (FArchive &arc)
<< sec->Flags
<< sec->FloorSkyBox << sec->CeilingSkyBox
<< sec->ZoneNumber
<< sec->oldspecial;
<< sec->oldspecial
<< sec->interpolations[0]
<< sec->interpolations[1]
<< sec->interpolations[2]
<< sec->interpolations[3];
sec->e->Serialize(arc);
if (arc.IsStoring ())
@ -409,6 +414,21 @@ void extsector_t::Serialize(FArchive &arc)
<< Linked.Ceiling.Sectors;
}
FArchive &operator<< (FArchive &arc, side_t::part &p)
{
arc << p.xoffset << p.yoffset << p.interpolation;// << p.Light;
if (arc.IsStoring ())
{
TexMan.WriteTexture (arc, p.texture);
}
else
{
p.texture = TexMan.ReadTexture (arc);
}
return arc;
}
//
// Thinkers
//
@ -468,7 +488,7 @@ void P_SerializePolyobjs (FArchive &arc)
for(i = 0, po = polyobjs; i < po_NumPolyobjs; i++, po++)
{
arc << po->tag << po->angle << po->startSpot[0] <<
po->startSpot[1] << po->startSpot[2];
po->startSpot[1] << po->startSpot[2] << po->interpolation;
}
}
else
@ -495,7 +515,7 @@ void P_SerializePolyobjs (FArchive &arc)
}
arc << angle;
PO_RotatePolyobj (po->tag, angle);
arc << deltaX << deltaY << deltaZ;
arc << deltaX << deltaY << deltaZ << po->interpolation;
deltaX -= po->startSpot[0];
deltaY -= po->startSpot[1];
deltaZ -= po->startSpot[2];