gzdoom-gles/src/g_shared/a_specialspot.h
Christoph Oelckers dab68184f5 - moved the global spot state into FLevelLocals.
This way it doesn't even have to be a thinker.
2019-01-05 10:04:27 +01:00

33 lines
720 B
C++

#ifndef __A_SPECSPOT_H
#define __A_SPECSPOT_H
#include "actor.h"
#include "tarray.h"
struct FSpotList;
class DSpotState : public DObject
{
DECLARE_CLASS(DSpotState, DObject)
TArray<FSpotList> SpotLists;
public:
DSpotState ();
void OnDestroy() override;
void Tick ();
static DSpotState *GetSpotState(bool create = true);
FSpotList *FindSpotList(PClassActor *type);
bool AddSpot(AActor *spot);
bool RemoveSpot(AActor *spot);
void Serialize(FSerializer &arc);
AActor *GetNextInList(PClassActor *type, int skipcounter);
AActor *GetSpotWithMinMaxDistance(PClassActor *type, double x, double y, double mindist, double maxdist);
AActor *GetRandomSpot(PClassActor *type, bool onlyonce = false);
};
#endif