diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-06-14 00:50:34 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-06-14 00:50:34 +0100 |
commit | 37e364b2c6cc7487a1c888d256a73e5337bb7189 (patch) | |
tree | eaf6e857382eef16c2dd940eb4125536fbe068bd /src/T2DLL/T2EquipDef.h | |
download | t2win-37e364b2c6cc7487a1c888d256a73e5337bb7189.tar.gz t2win-37e364b2c6cc7487a1c888d256a73e5337bb7189.zip |
initial commit
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2EquipDef.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/T2DLL/T2EquipDef.h b/src/T2DLL/T2EquipDef.h new file mode 100644 index 0000000..de66a3c --- /dev/null +++ b/src/T2DLL/T2EquipDef.h @@ -0,0 +1,68 @@ +#pragma once +#include "common.h" +#include "T2ToolDef.h" + +class T2EquipDef : public T2ToolDef { +public: + T2EquipDef(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile, T2WorldDef* worldDef, T2EquipPlugin* plugin); + virtual ~T2EquipDef(); + virtual int InitObject(T2Object*); + virtual int IsMover() { return IsSetAttribute(2); } + virtual void LoadExtraData(T2Archive&, T2TowerDoc*, T2HaveOutViewObject*); + virtual void SaveExtraData(T2Archive&, T2HaveOutViewObject*); + virtual AREACHECKCODE AreaCheck(T2TowerDoc*, RECT&, unsigned int, int); + virtual int ClickProc(T2TowerDoc*, RECT*, unsigned int&); + virtual int GetDestructPartProc(int, POINT, POINT, T2Equip*); + virtual PARTCODE GetPartFromPoint(T2TowerDoc*, T2Equip*, POINT, int*); + virtual PROCCODE DoBuildProc(T2TowerDoc*, RECT&, unsigned int) { + return ProcCode_0; + } + virtual int FingerToolProc(T2TowerDoc*, T2Equip*, const POINT&, MOUSEEVENT); + virtual void BuildFinish(T2TowerDoc*, T2Equip*); + virtual unsigned long OptionProc(T2TowerDoc*, T2Equip*, void*); + virtual void DrawPeople(T2TowerDoc*, T2Equip*); + virtual int GetInfoDialogID(T2TowerDoc*, const T2Equip*) const; + virtual T2InfoDialog* ShowInfoDialog(T2TowerDoc*, T2Equip*); + virtual T2InfoDialog* ConstructInfoDialog(T2Equip*); + virtual int EmergencyProc(T2TowerDoc*, T2Equip*) { + return 0; + } + virtual int BurntDownProc(T2TowerDoc*, T2Equip*) { + return 0; + } + virtual void DebugInfo(CWnd&, CListCtrl&, T2Equip*); + + int GetInMoney(int); + void GetWords(T2People*, CString&) const; + + int IsSetAttribute(unsigned int a) { + return (mAttribute & a) != 0; + } + int IsAbleDragMaking() { return IsSetAttribute(0x80); } + int GetNumOfInMoney() const { return mNumOfInMoney; } + int GetEquipType() const { return mToolType; } + void CalcEquipRect(RECT& rect) const { + rect.top = 0; + rect.left = 0; + rect.bottom = mHeight; + rect.right = mWidth; + } + int GetCapacity() const { return mCapacity; } + unsigned int GetAttribute() const { return mAttribute; } + +protected: + T2WordDefArray* MakeWordDefArray(); + + int mCapacity; + int mStress; + T2BitImage *m124; + T2BitImage *m128; + T2WordDefArray *mWordDefArray; + T2BitImage *m130; + int mOutSpan; + int mInSpan; + int mNumOfInMoney; + int m140; + int mInMoney[4]; + int m154; +}; |