mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-13 22:01:25 +00:00
1eb91fddcd
- Fixed: Before a level's thinkers are loaded all previous interpolations must be cleared. - Fixed: deleted interpolations didn't NULL the pointer in the interpolated object. Also added all interpolation pointers to DSectorMarker to ensure that they are properyl processed by the garbage collector. SVN r1028 (trunk)
68 lines
1.3 KiB
C++
68 lines
1.3 KiB
C++
#ifndef R_INTERPOLATE_H
|
|
#define R_INTERPOLATE_H
|
|
|
|
//==========================================================================
|
|
//
|
|
//
|
|
//
|
|
//==========================================================================
|
|
|
|
class DInterpolation : public DObject
|
|
{
|
|
friend struct FInterpolator;
|
|
|
|
DECLARE_ABSTRACT_CLASS(DInterpolation, DObject)
|
|
|
|
DInterpolation *Next;
|
|
DInterpolation **Prev;
|
|
int refcount;
|
|
|
|
protected:
|
|
DInterpolation();
|
|
|
|
public:
|
|
int AddRef();
|
|
int DelRef();
|
|
|
|
virtual void Destroy();
|
|
virtual void UpdateInterpolation() = 0;
|
|
virtual void Restore() = 0;
|
|
virtual void Interpolate(fixed_t smoothratio) = 0;
|
|
virtual void Serialize(FArchive &arc);
|
|
};
|
|
|
|
//==========================================================================
|
|
//
|
|
//
|
|
//
|
|
//==========================================================================
|
|
|
|
struct FInterpolator
|
|
{
|
|
DInterpolation *Head;
|
|
bool didInterp;
|
|
int count;
|
|
|
|
int CountInterpolations ();
|
|
|
|
public:
|
|
FInterpolator()
|
|
{
|
|
Head = NULL;
|
|
didInterp = false;
|
|
count = 0;
|
|
}
|
|
void UpdateInterpolations();
|
|
void AddInterpolation(DInterpolation *);
|
|
void RemoveInterpolation(DInterpolation *);
|
|
void DoInterpolations(fixed_t smoothratio);
|
|
void RestoreInterpolations();
|
|
void ClearInterpolations();
|
|
};
|
|
|
|
extern FInterpolator interpolator;
|
|
|
|
|
|
|
|
#endif
|
|
|