#ifndef T2DLL_T2EQUIPDEF_H #define T2DLL_T2EQUIPDEF_H #include "../common.h" #include "T2ToolDef.h" enum { kAreaCheckFlag100 = 0x100, kAreaCheckFlag1000 = 0x1000, kAreaCheckFlag10000 = 0x10000, }; 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*); 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* inDoc, RECT& inRect, unsigned int, BOOL inShowError); 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 BOOL 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 DrawMode0; } virtual int BurntDownProc(T2TowerDoc*, T2Equip*) { return 0; } virtual void DebugInfo(CWnd&, CListCtrl&, T2Equip*); int GetInMoney(int); void GetWords(T2People*, CString&) const; int GetEquipType() const; void CalcEquipRect(RECT& rect) const; int GetCapacity() const; unsigned int GetAttribute() const; protected: T2WordDefArray* MakeWordDefArray(); friend class T2People; 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; }; 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; } #endif