summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2BlackOut.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/T2DLL/T2BlackOut.h')
-rw-r--r--src/T2DLL/T2BlackOut.h56
1 files changed, 43 insertions, 13 deletions
diff --git a/src/T2DLL/T2BlackOut.h b/src/T2DLL/T2BlackOut.h
index 7d06eb5..14f3709 100644
--- a/src/T2DLL/T2BlackOut.h
+++ b/src/T2DLL/T2BlackOut.h
@@ -1,15 +1,30 @@
#pragma once
#include "common.h"
+#include "LAttachment.h"
+#include "T2EventItem.h"
-class T2BlackOut {
+class T2BlackOutAttach;
+
+enum {
+ kBlackOutStatus0 = 0,
+ kBlackOutStatus1 = 1,
+ kBlackOutStatus2 = 2,
+ kBlackOutStatus3 = 3,
+ kBlackOutStatus4 = 4
+};
+
+class AFX_EXT_CLASS T2BlackOut : public T2EventItem {
public:
- T2BlackOut(T2TowerEvent*, CResFile*, int);
+ T2BlackOut(T2TowerEvent* inTowerEvent, CResFile* inResFile, int inSubID);
virtual ~T2BlackOut();
- virtual int Start(T2TowerDoc*);
- virtual int Exec(T2TowerDoc*);
- void AddConsumptionPower(int);
- void SubConsumptionPower(int);
- void AddSupplyPower(int);
+ 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();
@@ -17,11 +32,26 @@ public:
int GetDefSupply();
int GetAddSupply();
int GetTransforPrice();
- virtual void Write(T2Archive&);
- virtual void Read(T2Archive&);
+ 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);
- virtual unsigned long GetID() {}
- int IsBlackOut() {}
- T2BlackOut(const T2BlackOut&) {}
- T2BlackOut& operator=(const T2BlackOut&) {}
+ T2BlackOut *mBlackOut;
};