#pragma once #include "common.h" #include "T2ToolDef.h" class AFX_EXT_CLASS 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); } 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 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*); 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; } 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; };