re3-wiiu/src/core/Fire.h

52 lines
1.3 KiB
C
Raw Normal View History

#pragma once
2019-07-09 18:50:35 +02:00
class CEntity;
class CFire
{
public:
2019-07-09 18:50:35 +02:00
bool m_bIsOngoing;
2019-09-15 01:28:07 +02:00
bool m_bIsScriptFire;
2020-03-24 17:24:47 +01:00
bool m_bPropagationFlag;
2019-07-09 18:50:35 +02:00
bool m_bAudioSet;
CVector m_vecPos;
CEntity *m_pEntity;
CEntity *m_pSource;
2020-03-24 17:24:47 +01:00
uint32 m_nExtinguishTime;
uint32 m_nStartTime;
2020-03-25 21:01:38 +01:00
int32 field_20;
uint32 m_nNextTimeToAddFlames;
2019-09-15 01:28:07 +02:00
uint32 m_nFiremenPuttingOut;
2020-03-24 17:24:47 +01:00
float m_fStrength;
2020-03-24 17:24:47 +01:00
CFire();
~CFire();
void ProcessFire(void);
void ReportThisFire(void);
void Extinguish(void);
2019-07-09 18:50:35 +02:00
};
class CFireManager
{
2019-09-15 01:28:07 +02:00
enum {
MAX_FIREMEN_ATTENDING = 2,
};
2019-07-09 18:50:35 +02:00
public:
2020-03-24 17:24:47 +01:00
uint32 m_nTotalFires;
2020-02-24 21:09:05 +01:00
CFire m_aFires[NUM_FIRES];
2020-03-24 17:24:47 +01:00
void StartFire(CVector pos, float size, bool propagation);
2020-03-25 21:01:10 +01:00
CFire *StartFire(CEntity *entityOnFire, CEntity *fleeFrom, float strength, bool propagation);
2019-10-19 00:23:40 +02:00
void Update(void);
2020-03-24 17:24:47 +01:00
CFire *FindFurthestFire_NeverMindFireMen(CVector coords, float minRange, float maxRange);
CFire *FindNearestFire(CVector vecPos, float *pDistance);
CFire *GetNextFreeFire(void);
2020-03-25 21:01:10 +01:00
uint32 GetTotalActiveFires() const;
2020-03-24 17:24:47 +01:00
void ExtinguishPoint(CVector point, float range);
int32 StartScriptFire(const CVector &pos, CEntity *target, float strength, bool propagation);
bool IsScriptFireExtinguish(int16 index);
2020-01-01 00:35:54 +01:00
void RemoveAllScriptFires(void);
2020-03-24 17:24:47 +01:00
void RemoveScriptFire(int16 index);
void SetScriptFireAudio(int16 index, bool state);
2019-07-09 18:50:35 +02:00
};
2020-04-17 07:54:14 +02:00
extern CFireManager gFireManager;