From 5c6a48b2ff362a70416a6a00fda7d06e0f276f2d Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sat, 1 Jul 2023 02:43:29 +0100 Subject: i am in hell --- src/T2DLL/T2EquipDef.h | 63 ++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 27 deletions(-) (limited to 'src/T2DLL/T2EquipDef.h') diff --git a/src/T2DLL/T2EquipDef.h b/src/T2DLL/T2EquipDef.h index aed9a66..fe6fe3e 100644 --- a/src/T2DLL/T2EquipDef.h +++ b/src/T2DLL/T2EquipDef.h @@ -2,53 +2,52 @@ #include "common.h" #include "T2ToolDef.h" -class AFX_EXT_CLASS T2EquipDef : public T2ToolDef { +class AFX_CLASS_EXPORT T2EquipDef : public T2ToolDef { public: T2EquipDef(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile, T2WorldDef* worldDef, T2EquipPlugin* plugin); virtual ~T2EquipDef(); virtual BOOL InitObject(T2Object*); - virtual BOOL IsMover() { return IsSetAttribute(kToolAttrIsMover); } + + BOOL IsSetAttribute(unsigned int a) { + return (mAttribute & a) != 0; + } + virtual BOOL IsMover() { return IsSetAttribute(kToolAttrIsMover); } + BOOL IsAbleDragMaking() { return IsSetAttribute(kEquipAttrIsAbleDragMaking); } + int GetNumOfInMoney() const { return mNumOfInMoney; } + virtual void LoadExtraData(T2Archive& inArchive, T2TowerDoc*, T2HaveOutViewObject*); virtual void SaveExtraData(T2Archive& inArchive, 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 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* inDoc, T2Equip* inEquip); 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*); + + virtual int EmergencyProc(T2TowerDoc*, T2Equip*) { + return DrawMode0; + } + virtual int BurntDownProc(T2TowerDoc*, T2Equip*) { + return 0; + } + + virtual void DebugInfo(CWnd&, CListCtrl&, T2Equip*); int GetInMoney(int); void GetWords(T2People*, CString&) const; - BOOL IsSetAttribute(unsigned int a) { - return (mAttribute & a) != 0; - } - BOOL IsAbleDragMaking() { return IsSetAttribute(kEquipAttrIsAbleDragMaking); } - 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; } + int GetEquipType() const; + void CalcEquipRect(RECT& rect) const; + int GetCapacity() const; + unsigned int GetAttribute() const; protected: T2WordDefArray* MakeWordDefArray(); @@ -68,3 +67,13 @@ protected: int mInMoney[4]; int m154; }; + +inline int T2EquipDef::GetEquipType() const { return mToolType; } +inline void T2EquipDef::CalcEquipRect(RECT& rect) const { + rect.top = 0; + rect.left = 0; + rect.bottom = mHeight; + rect.right = mWidth; +} +inline int T2EquipDef::GetCapacity() const { return mCapacity; } +inline unsigned int T2EquipDef::GetAttribute() const { return mAttribute; } -- cgit v1.2.3