#ifndef T2DLL_T2BLACKOUT_H #define T2DLL_T2BLACKOUT_H #include "../common.h" #include "LAttachment.h" #include "T2EventItem.h" class T2BlackOutAttach; enum { kBlackOutStatus0 = 0, kBlackOutStatus1 = 1, kBlackOutStatus2 = 2, kBlackOutStatus3 = 3, kBlackOutStatus4 = 4 }; class AFX_CLASS_EXPORT T2BlackOut : public T2EventItem { public: T2BlackOut(T2TowerEvent* inTowerEvent, CResFile* inResFile, int inSubID); virtual ~T2BlackOut(); virtual DWORD GetID() { return 'BOEv'; } virtual BOOL Start(T2TowerDoc* inDoc); virtual int Exec(T2TowerDoc* inDoc); virtual void Write(T2Archive& inArchive); virtual void Read(T2Archive& inArchive); void AddConsumptionPower(int inPower); void SubConsumptionPower(int inPower); void AddSupplyPower(int inPower); void SubSupplyPower(); void BreakerOn(); int GetConsumptionPower(); int GetSupplyPower(); int GetDefSupply(); int GetAddSupply(); int GetTransforPrice(); BOOL IsBlackOut() { return mStatus != kBlackOutStatus0; } protected: int mDefSupply; int mAddSupply; int mTransforPrice; int mConsumptionPower; int mSupplyPower; unsigned int m44; DWORD m48; T2BlackOutAttach *mAttach; }; class T2BlackOutAttach : public LAttachment { public: T2BlackOutAttach(T2BlackOut *inBlackOut, unsigned int inMessage, BOOL inExecuteHost); virtual ~T2BlackOutAttach(); protected: virtual void ExecuteSelf(unsigned int inMessage, void *ioData); T2BlackOut *mBlackOut; }; #endif