qzdoom/src/r_data/r_interpolate.h
Christoph Oelckers fbff5ca932 - moved r_interpolate.cpp and r_translate.cpp to r_data.
- merged r_jpeg.h into jpegtexture.cpp because that's the only place where it's ever used.


SVN r3255 (trunk)
2011-07-06 08:50:15 +00:00

69 lines
1.3 KiB
C++

#ifndef R_INTERPOLATE_H
#define R_INTERPOLATE_H
#include "dobject.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