#ifndef T2DLL_T2MATTER_H #define T2DLL_T2MATTER_H #include "../common.h" #include "T2DrawableObject.h" class AFX_CLASS_EXPORT T2Matter : public T2DrawableObject { public: T2Matter(); virtual ~T2Matter(); virtual void SetUsed(BOOL); void Initialize(T2MatterDef*); void FlipDirection(); 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 = 0); 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) > 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; } 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; private: void Initialize(); protected: virtual void LoadSelf(T2Archive&, T2TowerDoc*); virtual void SaveSelf(T2Archive&); }; #endif