summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2Matter.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-06-28 22:22:32 +0100
committerAsh Wolf <ninji@wuffs.org>2023-06-28 22:22:32 +0100
commitc0c336500955a23e344651e5412c9d9d441ef4ee (patch)
tree790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/T2Matter.h
parent37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff)
downloadt2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz
t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip
first pass of T2DLL
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2Matter.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/T2DLL/T2Matter.h b/src/T2DLL/T2Matter.h
index 60caed3..4c7b9df 100644
--- a/src/T2DLL/T2Matter.h
+++ b/src/T2DLL/T2Matter.h
@@ -2,7 +2,7 @@
#include "common.h"
#include "T2DrawableObject.h"
-class T2Matter : public T2DrawableObject {
+class AFX_EXT_CLASS T2Matter : public T2DrawableObject {
public:
T2Matter();
@@ -10,14 +10,14 @@ public:
virtual void SetUsed(BOOL);
void Initialize(T2MatterDef*);
void FlipDirection();
- void SetDestination(unsigned int, unsigned int);
+ void SetDestination(unsigned int dstTenant, unsigned int startTime = 0);
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);
+ BOOL SetReturn(unsigned int tenant, unsigned int time = 0);
void SetReturnTime(unsigned int);
BOOL PopReturn(unsigned int& outTenant, unsigned int& outTime);
BOOL SetReturnToDestination();
@@ -48,21 +48,13 @@ public:
return mCurPosition.y == mCurrDestPos.y;
}
BOOL IsGoDown() const {
- return mCurrDestPos.y > mCurPosition.y;
+ return (mCurrDestPos.y - mCurPosition.y) > 0;
}
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;
@@ -78,4 +70,11 @@ protected:
int m48;
int mDirection;
int mWalkStyle;
+
+private:
+ void Initialize();
+
+protected:
+ virtual void LoadSelf(T2Archive&, T2TowerDoc*);
+ virtual void SaveSelf(T2Archive&);
};