mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 17:41:19 +00:00
fc9e304189
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.
60 lines
1.1 KiB
C++
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__
|