summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2Equip.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-06-14 00:50:34 +0100
committerAsh Wolf <ninji@wuffs.org>2023-06-14 00:50:34 +0100
commit37e364b2c6cc7487a1c888d256a73e5337bb7189 (patch)
treeeaf6e857382eef16c2dd940eb4125536fbe068bd /src/T2DLL/T2Equip.h
downloadt2win-37e364b2c6cc7487a1c888d256a73e5337bb7189.tar.gz
t2win-37e364b2c6cc7487a1c888d256a73e5337bb7189.zip
initial commit
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2Equip.h82
1 files changed, 82 insertions, 0 deletions
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;
+};