raze/source/games/exhumed/src/exhumedactor.h

65 lines
1.3 KiB
C
Raw Normal View History

2021-09-06 21:50:06 +00:00
#pragma once
2021-11-25 20:42:49 +00:00
#include "coreactor.h"
2021-09-06 21:50:06 +00:00
BEGIN_PS_NS
enum
{
kHitAuxMask = 0x30000,
kHitAux1 = 0x10000,
kHitAux2 = 0x20000,
};
2021-09-06 21:50:06 +00:00
class DExhumedActor : public DCoreActor
2021-09-06 21:50:06 +00:00
{
DECLARE_CLASS(DExhumedActor, DCoreActor)
HAS_OBJECT_POINTERS
2021-09-06 21:50:06 +00:00
public:
DExhumedActor* pTarget;
int16_t nPhase;
int16_t nHealth;
int16_t nFrame;
int16_t nAction;
int16_t nCount;
int16_t nRun;
union { int16_t nIndex; int16_t nAngle; }; // angle is for wasp.
union { int16_t nIndex2; int16_t nAngle2; }; // index2 is for scorpion, angle2 is for wasp.
union { int16_t nChannel; int16_t nVel; }; // channel is for scorpion, vel is for wasp.
union { int16_t nDamage; int16_t nAction2; }; // nAction2 is for the queen.
2021-09-06 21:50:06 +00:00
// for the grenade.
int nTurn;
int x;
int y;
DExhumedActor() = default;
2021-09-06 21:50:06 +00:00
void ClearContent() override
2021-09-06 21:50:06 +00:00
{
Super::ClearContent();
pTarget = nullptr;
nPhase = nHealth = nFrame = nAction = nCount = nRun = nIndex = nIndex2 = nChannel = nDamage = nTurn = x = y = 0;
2021-09-06 21:50:06 +00:00
}
void Serialize(FSerializer& arc) override;
2021-09-06 21:50:06 +00:00
};
2021-11-25 23:25:28 +00:00
// subclassed to add a game specific actor() method
using HitInfo = THitInfo<DExhumedActor>;
2021-11-26 13:26:03 +00:00
using Collision = TCollision<DExhumedActor>;
2021-11-25 23:25:28 +00:00
using ExhumedStatIterator = TStatIterator<DExhumedActor>;
using ExhumedSectIterator = TSectIterator<DExhumedActor>;
using ExhumedSpriteIterator = TSpriteIterator<DExhumedActor>;
2021-09-06 21:50:06 +00:00
END_BLD_NS