diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-06-14 00:50:34 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-06-14 00:50:34 +0100 |
commit | 37e364b2c6cc7487a1c888d256a73e5337bb7189 (patch) | |
tree | eaf6e857382eef16c2dd940eb4125536fbe068bd /src/T2DLL/T2Matter.h | |
download | t2win-37e364b2c6cc7487a1c888d256a73e5337bb7189.tar.gz t2win-37e364b2c6cc7487a1c888d256a73e5337bb7189.zip |
initial commit
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2Matter.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/src/T2DLL/T2Matter.h b/src/T2DLL/T2Matter.h new file mode 100644 index 0000000..60caed3 --- /dev/null +++ b/src/T2DLL/T2Matter.h @@ -0,0 +1,81 @@ +#pragma once +#include "common.h" +#include "T2DrawableObject.h" + +class T2Matter : public T2DrawableObject { +public: + T2Matter(); + + virtual ~T2Matter(); + virtual void SetUsed(BOOL); + void Initialize(T2MatterDef*); + void FlipDirection(); + void SetDestination(unsigned int, unsigned int); + void ClearDestination(); + BOOL IsStartTime(unsigned int) const; + BOOL IsSetReturn() const; + BOOL IsSetReturnTime() const; + unsigned int GetReturnTime() const; + unsigned int GetReturn() const; + BOOL SetReturn(unsigned int tenant, unsigned int time); + void SetReturnTime(unsigned int); + BOOL PopReturn(unsigned int& outTenant, unsigned int& outTime); + BOOL SetReturnToDestination(); + BOOL SetDestinationToReturn(); + void DayChanged(); + BOOL RemoveReturn(unsigned int); + + unsigned int GetMatterID() { return mMatterID; } + T2MatterDef* GetMatterDef() const { return mMatterDef; } + BOOL IsFront() { return m44 == 0; } + BOOL IsLast() { return m48 == 0; } + unsigned int GetWorkTenant() const { return mWorkTenant; } + unsigned int GetHomeTenant() const { return mHomeTenant; } + unsigned int GetCurrEquipID() const { return mCurrEquipID; } + void SetWorkTenant(unsigned int v) { mWorkTenant = v; } + void SetHomeTenant(unsigned int v) { mHomeTenant = v; } + void SetCurrEquipID(unsigned int v) { mCurrEquipID = v; } + unsigned int GetDstTenant() { return mDstTenant; } + POINT GetCurPosition() const { return mCurPosition; } + void SetDirection(int v) { mDirection = v; } + int GetDirection() const { return mDirection; } + int GetWalkStyle() const { return mWalkStyle; } + void MoveHTo(int v) { mCurPosition.x = v; } + void MoveVTo(int v) { mCurPosition.y = v; } + POINT GetCurrDestPos() const { return mCurrDestPos; } + void SetCurrDestPos(POINT pt) { mCurrDestPos = pt; } + BOOL InDestFloor() const { + return mCurPosition.y == mCurrDestPos.y; + } + BOOL IsGoDown() const { + return mCurrDestPos.y > mCurPosition.y; + } + BOOL IsSetStartTime() const { return mStartTime > -1; } + BOOL IsSetDestination() const { return mDstTenant != 0; } + unsigned int GetDestination() const { return mDstTenant; } + void SetStartTime(unsigned int v) { mStartTime = v; } + +private: + void Initialize(); + +protected: + virtual void LoadSelf(T2Archive&, T2TowerDoc*); + virtual void SaveSelf(T2Archive&); + + friend class T2MatterArray; + unsigned int mMatterID; + T2MatterDef *mMatterDef; + int m18; + unsigned int mWorkTenant; + unsigned int mHomeTenant; + unsigned int mCurrEquipID; + unsigned int mDstTenant; + POINT mCurPosition; + POINT mCurrDestPos; + int mStartTime; + T2ReturnStack *mReturnStack; + int m44; + int m48; + int mDirection; + int mWalkStyle; +}; |