2016-03-01 15:47:10 +00:00
|
|
|
#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);
|
|
|
|
|
2016-09-19 17:14:30 +00:00
|
|
|
|
2016-09-19 13:07:53 +00:00
|
|
|
void Serialize(FSerializer &arc);
|
2017-01-12 21:49:18 +00:00
|
|
|
void OnDestroy() override;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
sector_t *GetSector() const { return m_Sector; }
|
|
|
|
|
|
|
|
sector_t *m_Sector;
|
2017-03-19 12:15:38 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
DSectorEffect();
|
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class DMover : public DSectorEffect
|
|
|
|
{
|
2017-04-12 20:46:49 +00:00
|
|
|
DECLARE_ABSTRACT_CLASS (DMover, DSectorEffect)
|
2016-03-01 15:47:10 +00:00
|
|
|
HAS_OBJECT_POINTERS
|
|
|
|
protected:
|
2017-04-12 20:46:49 +00:00
|
|
|
DMover (sector_t *sector);
|
|
|
|
|
2017-03-08 12:34:26 +00:00
|
|
|
TObjPtr<DInterpolation*> interpolation;
|
2017-04-12 20:46:49 +00:00
|
|
|
public:
|
|
|
|
void StopInterpolation(bool force = false);
|
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
protected:
|
2017-04-12 20:46:49 +00:00
|
|
|
DMover () {}
|
2016-09-19 17:14:30 +00:00
|
|
|
|
2016-09-19 13:07:53 +00:00
|
|
|
void Serialize(FSerializer &arc);
|
2017-01-12 21:49:18 +00:00
|
|
|
void OnDestroy() override;
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class DMovingFloor : public DMover
|
|
|
|
{
|
2017-04-12 20:46:49 +00:00
|
|
|
DECLARE_ABSTRACT_CLASS (DMovingFloor, DMover)
|
2016-03-01 15:47:10 +00:00
|
|
|
protected:
|
2017-04-12 20:46:49 +00:00
|
|
|
DMovingFloor (sector_t *sector);
|
|
|
|
DMovingFloor() {}
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class DMovingCeiling : public DMover
|
|
|
|
{
|
2017-04-12 20:46:49 +00:00
|
|
|
DECLARE_ABSTRACT_CLASS (DMovingCeiling, DMover)
|
2016-03-01 15:47:10 +00:00
|
|
|
protected:
|
2017-04-12 20:46:49 +00:00
|
|
|
DMovingCeiling (sector_t *sector, bool interpolate = true);
|
|
|
|
DMovingCeiling () {}
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__DSECTOREFFECT_H__
|