#ifndef T2DLL_T2FIREBURNING_H #define T2DLL_T2FIREBURNING_H #include "../common.h" #include "LAttachment.h" #include "T2EventItem.h" enum { kFireBurningStatus0 = 0, kFireBurningStatus1 = 1, kFireBurningStatus2 = 2, }; enum { kFireFightNull = 0, kFireFightHelicopter = 1, kFireFightFireman = 2, kFireFightDoNothing = 3, }; class AFX_CLASS_EXPORT T2FireBurning : public T2EventItem { public: T2FireBurning(T2TowerEvent* inTowerEvent, CResFile* inResFile, int inSubID); virtual ~T2FireBurning(); 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* inTowerDoc, 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: 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; 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 AFX_CLASS_EXPORT T2Fire { public: 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* inPeople); 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 AFX_CLASS_EXPORT T2Helicopter { public: T2Helicopter(T2TowerDoc* inDoc, const T2Tenant* inTenant); ~T2Helicopter(); void Move(T2TowerDoc* inDoc); T2TowerDoc *mDocument; T2Sprite *mSprite; T2BitImage *mImage; T2ImageObj *mImageObj; int mHeliSpriteID; int mTimePassed; int mSpeed; int mWaterSpriteID; BOOL mWaterVisible; }; class AFX_CLASS_EXPORT T2FireAttach : public LAttachment { public: T2FireAttach(T2EventItem* inOwner, unsigned int inMessage, BOOL inExecuteHost); virtual ~T2FireAttach(); protected: virtual void ExecuteSelf(unsigned int inMessage, void* ioData); T2EventItem *mOwner; }; #endif