diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
commit | c0c336500955a23e344651e5412c9d9d441ef4ee (patch) | |
tree | 790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/T2FireBurning.h | |
parent | 37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff) | |
download | t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip |
first pass of T2DLL
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2FireBurning.h | 132 |
1 files changed, 86 insertions, 46 deletions
diff --git a/src/T2DLL/T2FireBurning.h b/src/T2DLL/T2FireBurning.h index 6db462c..6e5f3da 100644 --- a/src/T2DLL/T2FireBurning.h +++ b/src/T2DLL/T2FireBurning.h @@ -1,67 +1,107 @@ #pragma once #include "common.h" +#include "LAttachment.h" +#include "T2EventItem.h" -class T2FireBurning { +enum { + kFireBurningStatus0 = 0, + kFireBurningStatus1 = 1, + kFireBurningStatus2 = 2, +}; + +enum { + kFireFightNull = 0, + kFireFightHelicopter = 1, + kFireFightFireman = 2, + kFireFightDoNothing = 3, +}; + +class AFX_EXT_CLASS T2FireBurning : public T2EventItem { public: - T2FireBurning(T2TowerEvent*, CResFile*, int); + T2FireBurning(T2TowerEvent* inTowerEvent, CResFile* inResFile, int inSubID); virtual ~T2FireBurning(); - virtual int Start(T2TowerDoc*); - virtual int Exec(T2TowerDoc*); - virtual void StartEvent(T2TowerDoc*, POINT, const T2Tenant*); -protected: - virtual void SetupDialog(T2Dialog*); -public: - virtual unsigned int DialogHook(T2EventDialog*, unsigned int, T2TowerDoc*); - virtual void IdleEvent(T2TowerDoc*); - virtual void StopEvent(T2TowerDoc*); - int MakeFire(POINT, T2TowerDoc*); -protected: - int AdjustFirePos(T2FloorInfo*, POINT&, RECT&) const; -public: - void Extinguish(T2Fire*); - int DoExtinguish(CPoint&); + virtual DWORD GetID() { return 'FBEv'; } + virtual BOOL Start(T2TowerDoc* inDoc); + virtual int Exec(T2TowerDoc* inDoc); + virtual void StopEvent(T2TowerDoc* inDoc); + virtual unsigned int DialogHook(T2EventDialog* inDialog, unsigned int inResult, T2TowerDoc* inDoc); + virtual void StartEvent(T2TowerDoc* inDoc, POINT inPt, const T2Tenant* inTenant); + virtual void IdleEvent(T2TowerDoc* inDoc); + BOOL MakeFire(POINT inPt, T2TowerDoc* inDoc); + void Extinguish(T2Fire* inFire); + BOOL DoExtinguish(CPoint& inPt); + BOOL IsEmergency() { return mStatus != kFireBurningStatus0; } + protected: - void CallFireman(T2TowerDoc*, const T2Tenant*); - int IsBreakoutFire(const T2TowerDoc*, POINT&, T2Tenant*&) const; + virtual void SetupDialog(T2Dialog* inDialog); + BOOL AdjustFirePos(T2FloorInfo* inFloorInfo, POINT& inPt, RECT& outRect) const; + void CallFireman(T2TowerDoc* inDoc, const T2Tenant* inTenant); + BOOL IsBreakoutFire(const T2TowerDoc* inDoc, POINT& outPt, T2Tenant*& outTenant) const; -public: - virtual unsigned long GetID() {} - int IsEmergency() {} - T2FireBurning(const T2FireBurning&) {} - T2FireBurning& operator=(const T2FireBurning&) {} + int mFightAction; + unsigned int mTimePassed; + int mHelicopterPrice; + LArray *mFireArray; + int m40; + T2BitImage *mImage; + T2ImageObj *mImageObj; + int mFireWidth; + int _50; + T2FireAttach *mAttach; + int _58; + T2Helicopter *mHelicopter; + T2PeoplePtrList *mPeopleList; }; -class T2Fire { + +class AFX_EXT_CLASS T2Fire { public: - T2Fire(POINT&, T2TowerDoc*, int, T2ImageObj*); + T2Fire(POINT& inPt, T2TowerDoc* inDoc, int inVar, T2ImageObj* inImageObj); ~T2Fire(); + BOOL Move(); + BOOL HitTest(CPoint& inPt, CRect& outRect); + BOOL ExtinguishByFireman(T2TowerDoc* inDoc, T2PeoplePtrList* inPeopleList); + + void SetArsonTenant(T2Tenant* inTenant) { mArsonTenant = inTenant; } + T2Tenant* GetArsonTenant() { return mArsonTenant; } + T2People* GetFireman() const { return mFireman; } + protected: - void SetFireman(T2People*); -public: - int Move(); - int HitTest(CPoint&, CRect&); - int ExtinguishByFireman(T2TowerDoc*, T2PeoplePtrList*); + void SetFireman(T2People* inPeople); - void SetArsonTenant(T2Tenant*) {} - T2Tenant* GetArsonTenant() {} - T2People* GetFireman() const {} - T2Fire& operator=(const T2Fire&) {} + unsigned int x0; + unsigned int x4; + T2TowerDoc *mDocument; + int xC; + T2Sprite *mSprite; + int mFireSpriteID; + unsigned int x18; + unsigned int x1C; + T2Tenant *mArsonTenant; + T2People *mFireman; }; -class T2Helicopter { + +class AFX_EXT_CLASS T2Helicopter { public: - T2Helicopter(T2TowerDoc*, const T2Tenant*); + T2Helicopter(T2TowerDoc* inDoc, const T2Tenant* inTenant); ~T2Helicopter(); - void Move(T2TowerDoc*); + void Move(T2TowerDoc* inDoc); - T2Helicopter& operator=(const T2Helicopter&) {} + T2TowerDoc *mDocument; + T2Sprite *mSprite; + T2BitImage *mImage; + T2ImageObj *mImageObj; + int mHeliSpriteID; + int mTimePassed; + int mSpeed; + int mWaterSpriteID; + BOOL mWaterVisible; }; -class T2FireAttach { + +class AFX_EXT_CLASS T2FireAttach : public LAttachment { public: - T2FireAttach(T2EventItem*, unsigned int, int); + T2FireAttach(T2EventItem* inOwner, unsigned int inMessage, BOOL inExecuteHost); virtual ~T2FireAttach(); protected: - virtual void ExecuteSelf(unsigned int, void*); - -public: - T2FireAttach(const T2FireAttach&) {} - T2FireAttach& operator=(const T2FireAttach&) {} + virtual void ExecuteSelf(unsigned int inMessage, void* ioData); + T2EventItem *mOwner; }; |