From 37e364b2c6cc7487a1c888d256a73e5337bb7189 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 14 Jun 2023 00:50:34 +0100 Subject: initial commit --- src/T2DLL/T2Equip.h | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/T2DLL/T2Equip.h (limited to 'src/T2DLL/T2Equip.h') diff --git a/src/T2DLL/T2Equip.h b/src/T2DLL/T2Equip.h new file mode 100644 index 0000000..7e4c914 --- /dev/null +++ b/src/T2DLL/T2Equip.h @@ -0,0 +1,82 @@ +#pragma once +#include "common.h" +#include "T2EquipDef.h" +#include "T2HaveOutViewObject.h" +#include "T2RouteCEArray.h" + +class T2Equip : public T2HaveOutViewObject { +public: + T2Equip(); + virtual ~T2Equip(); + virtual void SetUsed(int); + virtual T2InfoDialog* ShowInfoDialog(T2TowerDoc*); + virtual void DrawHitMask(T2TowerDoc*); + virtual int IsNeedDraw() const { return true; } + virtual int GetOutMoney() const; + virtual int GetInMoney() const; + virtual void BuildStart(T2TowerDoc*) {} + virtual int IsBuildFinish() { return true; } + virtual PARTCODE GetPartFromPoint(T2TowerDoc*, POINT, int*); + virtual PARTCODE GetClickPart(T2TowerDoc*, CPoint, int*); + virtual PROCCODE DoDestruct(T2TowerDoc*, POINT, RECT&); + virtual void SetDrawMode(int drawMode) { + if (mDrawMode != drawMode) + mDrawMode = drawMode; + } + virtual void ClearDrawMode() { + mDrawMode = 0; + } + virtual void PlaySound(T2TowerDoc*, int, unsigned int, unsigned int) const; + + int InitEquip(T2EquipDef* def, const RECT& area, unsigned int valiation); + int DaysSinceBuilt(const T2TowerDoc*) const; + void SetEquipArea(const RECT&); + void InsertCEID(int, int); + void RemoveCEID(int); + void ReplaceCEID(unsigned int, unsigned int); + void GetTypicalName(CString&) const; + + unsigned int GetAttribute() const { return mAttribute; } + int IsSetAttribute(unsigned int a) const { return (mAttribute & a) != 0; } + int IsMover() const { return IsSetAttribute(2); } + int IsNormalMenteCost() const { return IsSetAttribute(0x100); } + unsigned int GetEquipID() const { return mEquipID; } + void SetEquipDef(T2EquipDef* equipDef) { + SetToolDef(equipDef); + } + void GetEquipArea(RECT& rect) const { + rect = mArea; + } + int GetAreaWidth() const { return mArea.right - mArea.left; } + int GetAreaHeight() const { return mArea.bottom - mArea.top; } + int GetEquipType() const { return mEquipType; } + int GetCapacity() const { return mCapacity; } + int GetInMoneyIndex() const { return mInMoneyIndex; } + int GetBuildDay() const { return mBuildDay; } + int GetDrawMode() const { return mDrawMode; } + T2CrossEquipArray* GetCEArray() const { return mCEArray; } + T2EquipDef* GetEquipDef() const { return (T2EquipDef *) mToolDef; } + void SetInMoneyIndex(int i) { mInMoneyIndex = i; } + int GetPatIndex() const { return mPatIndex; } + void SetPatIndex(int i) { mPatIndex = i; } + +protected: + virtual void LoadSelf(T2Archive&, T2TowerDoc*); + virtual void SaveSelf(T2Archive&); + + friend class T2EquipDef; + + unsigned int mEquipID; + RECT mArea; + int mEquipType; + int mDrawMode; + int mPatIndex; + int mCapacity; + int m44; + int m48; + int mBuildDay; + unsigned int mAttribute; + T2RouteCEArray *mCEArray; + int m58; + int mInMoneyIndex; +}; -- cgit v1.2.3