diff options
Diffstat (limited to 'src/T2DLL/T2Request.h')
-rw-r--r-- | src/T2DLL/T2Request.h | 86 |
1 files changed, 50 insertions, 36 deletions
diff --git a/src/T2DLL/T2Request.h b/src/T2DLL/T2Request.h index 0657b3a..685f141 100644 --- a/src/T2DLL/T2Request.h +++ b/src/T2DLL/T2Request.h @@ -1,67 +1,81 @@ #pragma once #include "common.h" +#include "T2DrawableObject.h" -class T2Request { +class AFX_EXT_CLASS T2Request : public T2DrawableObject { public: T2Request(); virtual ~T2Request(); + virtual void SetUsed(BOOL); + virtual BOOL Enter(CLink*); + virtual BOOL Leave(CLink*); + virtual unsigned int Idle(T2TowerDoc*); + virtual void Draw(T2TowerDoc*, const RECT&); + virtual void DrawHitMask(T2TowerDoc*); + void InitRequest(unsigned int, int, const RECT&); void InitRequest(T2FloorInfo*, unsigned int, POINT, ERequestUpDown); void RemoveRequest(T2TowerDoc*); -protected: - void RemoveContents(T2FloorInfo*); -public: - virtual void SetUsed(int); void StopRemoved(T2TowerDoc*, int); void CalcArea(RECT&); void CalcOnArea(RECT&); void CalcOffArea(RECT&); void CalcPrevArea(RECT&); - int CalcPersonArea(T2People*, RECT&); - virtual int Enter(CLink*); - virtual int Leave(CLink*); + BOOL CalcPersonArea(T2People*, RECT&); T2People* LeaveFirst(); - int Regist(T2TowerDoc*, T2People*); + BOOL Regist(T2TowerDoc*, T2People*); void ChangeOffPPLStatus(T2FloorInfo*, T2People*); void AddOnPeople(T2People*); T2People* RemoveOnPeople(); void AddOffPeople(T2People*); T2People* RemoveOffPeople(); - virtual unsigned int Idle(T2TowerDoc*); - virtual void Draw(T2TowerDoc*, const RECT&); + void BreakoutEmergency(T2TowerDoc*); + T2People* FindPeople(int) const; + void CalcValidArea(RECT&); + + unsigned int GetRequestID() const { return mRequestID; } + unsigned int GetMoverID() const { return mMoverID; } + void MoverIDChanged(unsigned int id) { mMoverID = id; } + ERequestUpDown GetUpDown() const { return mIsGoDown ? ERequestUpDown_1 : ERequestUpDown_0; } + POINT GetHeadPosition() const { return mHeadPosition; } + int GetModuleIndex() const { return mModuleIndex; } + BOOL IsModuleReserved() const { return (mModuleIndex > -1); } + void CancelReservingModule() { mModuleIndex = -1; } + int GetDrawWidth() const { return mDrawWidth; } + void SetDrawWidth(int w) { mDrawWidth = w; } + int GetNumOfContent() const { return mNumOfContent; } + protected: + virtual void LoadSelf(T2Archive&, T2TowerDoc*); + virtual void SaveSelf(T2Archive&); + + void RemoveContents(T2FloorInfo*); void DrawUp(T2TowerDoc*, const RECT&); void DrawDown(T2TowerDoc*, const RECT&); void* GetInfoClick(T2TowerDoc*, POINT); void* GetInfoClickUp(T2TowerDoc*, POINT); void* GetInfoClickDown(T2TowerDoc*, POINT); -public: - void BreakoutEmergency(T2TowerDoc*); -protected: - virtual void LoadSelf(T2Archive&, T2TowerDoc*); - virtual void SaveSelf(T2Archive&); -public: - T2People* FindPeople(int) const; -protected: - int CalcIncQueueArea(RECT&) const; + BOOL CalcIncQueueArea(RECT&) const; void DrawFinished(); T2People* FindUpPeople(int) const; T2People* FindDownPeople(int) const; -public: - void CalcValidArea(RECT&); - virtual void DrawHitMask(T2TowerDoc*); - unsigned int GetRequestID() const {} - unsigned int GetMoverID() const {} - void MoverIDChanged(unsigned int) {} - ERequestUpDown GetUpDown() const {} - POINT GetHeadPosition() const {} - int GetModuleIndex() const {} - int IsModuleReserved() const {} - void CancelReservingModule() {} - int GetDrawWidth() const {} - void SetDrawWidth(int) {} - int GetNumOfContent() const {} - T2Request(const T2Request&) {} - T2Request& operator=(const T2Request&) {} + friend class T2RequestArray; + friend class T2ElevatorModule; + + unsigned int mRequestID; + unsigned int mMoverID; + POINT mHeadPosition; + BOOL mIsGoDown; + int mModuleIndex; + int mDrawWidth; + int m2C; + int m30; + T2People *mOnPeople; + T2People *mOffPeople; + T2People *mFirst; + T2People *mLast; + BOOL m44; + BOOL mPeopleRemoved; + int mNumOfContent; }; |