gzdoom-gles/src/dsectoreffect.h
Christoph Oelckers fc9e304189 - separated class descriptors from VM types.
Combining these two groups of data has been the cause of many hard to detect errors because it allowed liberal casting between types that are used for completely different things.
2017-04-12 22:46:49 +02:00

60 lines
1.1 KiB
C++

#ifndef __DSECTOREFFECT_H__
#define __DSECTOREFFECT_H__
#include "dthinker.h"
#include "r_defs.h"
class DSectorEffect : public DThinker
{
DECLARE_CLASS (DSectorEffect, DThinker)
public:
DSectorEffect (sector_t *sector);
void Serialize(FSerializer &arc);
void OnDestroy() override;
sector_t *GetSector() const { return m_Sector; }
sector_t *m_Sector;
protected:
DSectorEffect();
};
class DMover : public DSectorEffect
{
DECLARE_ABSTRACT_CLASS (DMover, DSectorEffect)
HAS_OBJECT_POINTERS
protected:
DMover (sector_t *sector);
TObjPtr<DInterpolation*> interpolation;
public:
void StopInterpolation(bool force = false);
protected:
DMover () {}
void Serialize(FSerializer &arc);
void OnDestroy() override;
};
class DMovingFloor : public DMover
{
DECLARE_ABSTRACT_CLASS (DMovingFloor, DMover)
protected:
DMovingFloor (sector_t *sector);
DMovingFloor() {}
};
class DMovingCeiling : public DMover
{
DECLARE_ABSTRACT_CLASS (DMovingCeiling, DMover)
protected:
DMovingCeiling (sector_t *sector, bool interpolate = true);
DMovingCeiling () {}
};
#endif //__DSECTOREFFECT_H__