summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2FloorInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/T2DLL/T2FloorInfo.h')
-rw-r--r--src/T2DLL/T2FloorInfo.h162
1 files changed, 88 insertions, 74 deletions
diff --git a/src/T2DLL/T2FloorInfo.h b/src/T2DLL/T2FloorInfo.h
index b292900..d76eac9 100644
--- a/src/T2DLL/T2FloorInfo.h
+++ b/src/T2DLL/T2FloorInfo.h
@@ -1,86 +1,100 @@
#pragma once
#include "common.h"
-class T2FloorInfo {
+class AFX_EXT_CLASS T2FloorInfo {
public:
- T2FloorInfo(const T2WorldDef*);
+ T2FloorInfo(const T2WorldDef* inWorldDef);
virtual ~T2FloorInfo();
- int UnitToFloor(int) const;
- void InitMask(CResFile&);
- void Read(T2Archive&, T2TowerDoc*);
- void Write(T2Archive&);
-protected:
- int IsValidRange(const RECT&) const;
-public:
- int IsAreaBuildable(const RECT&);
- int IsAllTenant(const RECT&);
- int IsThereNoFloorTenant(const RECT&);
- int IsThereMover(const RECT&);
- int IsThereOtherKindMover(const RECT&, int);
- int IsEnoughSideSpace(const RECT&);
- T2Tenant* GetTenant(unsigned int) const;
- T2Tenant* GetTenant(int, int) const;
+ int UnitToFloor(int unit) const;
+ void InitMask(CResFile& inResFile);
+ void Read(T2Archive& inArchive, T2TowerDoc* inDoc);
+ void Write(T2Archive& inArchive);
+ BOOL IsAreaBuildable(const RECT& inRect);
+ BOOL IsAllTenant(const RECT& inRect);
+ BOOL IsThereNoFloorTenant(const RECT& inRect);
+ BOOL IsThereMover(const RECT& inRect);
+ BOOL IsThereOtherKindMover(const RECT& inRect, int inType);
+ BOOL IsEnoughSideSpace(const RECT& inRect);
+ T2Tenant* GetTenant(unsigned int inTenantID) const;
+ T2Tenant* GetTenant(int inV, int inH) const;
T2Tenant* GetPoolTenant() const;
- T2Tenant* GetFloor(int, int) const;
- T2Mover* GetMover(unsigned int);
- T2Mover* GetMover(int, int);
- T2MoverModule* GetModule(unsigned int) const;
- T2Request* GetRequest(unsigned int) const;
- T2Request* GetRequest(int, int) const;
- T2People* FindPeople(int, int) const;
- T2OutObj* GetOutObj(int, int) const;
- T2OutObj* GetIndOutObj(unsigned int) const;
+ T2Tenant* GetFloor(int inV, int inH) const;
+ T2Mover* GetMover(unsigned int inMoverID);
+ T2Mover* GetMover(int inV, int inH);
+ T2MoverModule* GetModule(unsigned int inModuleID) const;
+ T2Request* GetRequest(unsigned int inRequestID) const;
+ T2Request* GetRequest(int inV, int inH) const;
+ T2People* FindPeople(int inV, int inH) const;
+ T2OutObj* GetOutObj(int inV, int inH) const;
+ T2OutObj* GetIndOutObj(unsigned int inIndex) const;
T2Tenant* FindUnusedTenant();
T2Mover* FindUnusedMover();
T2Request* FindUnusedRequest();
T2OutObj* FindUnusedOutObj();
- unsigned int GetTenantID(int, int) const;
- unsigned int GetFloorID(int, int);
- unsigned int GetEntranceFloorID(unsigned int);
- POINT GetEntrancePt(unsigned int);
- unsigned int GetMoverID(int, int);
- unsigned int GetRequestID(int, int) const;
- unsigned int GetOutObjID(int, int) const;
- T2UnitInfo* GetUnitInfo(int, int) const;
- void FillTenantID(const RECT&, unsigned int);
- void ReplaceFloorID(const RECT&, unsigned int, unsigned int);
- void FillMoverID(const RECT&, unsigned int);
- void FillRequestID(const RECT&, unsigned int);
- int FillRequestID(POINT, ERequestUpDown, unsigned int);
- void RemoveRequestID(ERequestUpDown, const RECT&);
- void FillOutObjID(const RECT&, unsigned int);
- unsigned int FindTenantID(int, int, int, int, unsigned int);
-protected:
- int CalcRequestRightEnd(POINT, int);
- int CalcRequestLeftEnd(POINT, int);
-public:
- int GetLeftMoverID(POINT, int) const;
- void UpdeteRequestByUnionFloor(T2Tenant*, POINT);
- void MoverAreaAdded(const RECT&, unsigned int);
- void MoverAreaRemoved(const RECT&);
- void UpdeteRequestByBuildMover(const RECT&);
- void UpdeteRequestByRemoveMover(const RECT&);
- unsigned int GetNextTenantNumber(int);
- void SetTenantNumber(int, unsigned int);
- T2Tenant* FindNumberredTenant(int, unsigned int);
- void FinishBuildFloor(T2TowerDoc*, const RECT&);
- void SetTenantDrawModeByRect(const RECT&, int);
- void UpdateFloorCEArray(const RECT&, unsigned int, unsigned int);
- int CalcMentenanceCost(T2TowerDoc*) const;
- T2Tenant* GetTenantByPID(unsigned long);
- int BuildFinishForce(const RECT&);
+ unsigned int GetTenantID(int inV, int inH) const;
+ unsigned int GetFloorID(int inV, int inH);
+ unsigned int GetEntranceFloorID(unsigned int inTenantID);
+ POINT GetEntrancePt(unsigned int inTenantID);
+ unsigned int GetMoverID(int inV, int inH);
+ unsigned int GetRequestID(int inV, int inH) const;
+ unsigned int GetOutObjID(int inV, int inH) const;
+ T2UnitInfo* GetUnitInfo(int inV, int inH) const;
+ void FillTenantID(const RECT& inRect, unsigned int inTenantID);
+ void ReplaceFloorID(const RECT& inRect, unsigned int inOldID, unsigned int inNewID);
+ void FillMoverID(const RECT& inRect, unsigned int inMoverID);
+ void FillRequestID(const RECT& inRect, unsigned int inRequestID);
+ int FillRequestID(POINT inPt, ERequestUpDown inUpDown, unsigned int inRequestID);
+ void RemoveRequestID(ERequestUpDown inUpDown, const RECT& inRect);
+ void FillOutObjID(const RECT& inRect, unsigned int inOutObjID);
+ unsigned int FindTenantID(int inV, int inH, BOOL inRight, int inMaxDistance, unsigned int inExclTenantID);
+ int GetLeftMoverID(POINT inPt, int inMinH) const;
+ void UpdeteRequestByUnionFloor(T2Tenant* inTenant, POINT inPt);
+ void MoverAreaAdded(const RECT& inRect, unsigned int inMoverID);
+ void MoverAreaRemoved(const RECT& inRect);
+ void UpdeteRequestByBuildMover(const RECT& inRect);
+ void UpdeteRequestByRemoveMover(const RECT& inRect);
+ unsigned int GetNextTenantNumber(int inV);
+ void SetTenantNumber(int inV, unsigned int inTenantNumber);
+ T2Tenant* FindNumberredTenant(int inV, unsigned int inTenantNumber);
+ void FinishBuildFloor(T2TowerDoc* inDoc, const RECT& inRect);
+ void SetTenantDrawModeByRect(const RECT& inRect, int inDrawMode);
+ void UpdateFloorCEArray(const RECT& inRect, unsigned int inOldID, unsigned int inNewID);
+ int CalcMentenanceCost(T2TowerDoc* inDoc) const;
+ T2Tenant* GetTenantByPID(DWORD inPluginID);
+ BOOL BuildFinishForce(const RECT& inRect);
- int GetVRange() const {}
- int GetHRange() const {}
- int GetGroundLine() const {}
- int GetTopFloorLine() const {}
- int GetBottomFloorLine() const {}
- int GetEntranceWidth() const {}
- void GetBuildArea(RECT&) const {}
- void GetFloorArea(RECT&) const {}
- T2TenantArrayList* GetTenantArrayList() const {}
- T2MoverArrayList* GetMoverArrayList() const {}
- T2RequestArrayList* GetRequestArrayList() const {}
- T2OutObjArrayList* GetOutObjArrayList() const {}
- T2OutsideInfo* GetOutsideInfo() const {}
+ int GetVRange() const { return mVRange; }
+ int GetHRange() const { return mHRange; }
+ int GetGroundLine() const { return mGroundLine; }
+ int GetTopFloorLine() const { return mTopFloorLine; }
+ int GetBottomFloorLine() const { return mBottomFloorLine; }
+ int GetEntranceWidth() const { return mEntranceWidth; }
+ void GetBuildArea(RECT& outRect) const { outRect = mBuildArea; }
+ void GetFloorArea(RECT& outRect) const { outRect = mFloorArea; }
+ T2TenantArrayList* GetTenantArrayList() const { return mTenantArrayList; }
+ T2MoverArrayList* GetMoverArrayList() const { return mMoverArrayList; }
+ T2RequestArrayList* GetRequestArrayList() const { return mRequestArrayList; }
+ T2OutObjArrayList* GetOutObjArrayList() const { return mOutObjArrayList; }
+ T2OutsideInfo* GetOutsideInfo() const { return mOutsideInfo; }
+
+ int mVRange;
+ int mHRange;
+ int mGroundLine;
+ int mTopFloorLine;
+ int mBottomFloorLine;
+ int mEntranceWidth;
+ RECT mBuildArea;
+ RECT mFloorArea;
+ T2UnitInfo *mUnitInfo;
+ unsigned int *mTenantNumber;
+ T2TenantArrayList *mTenantArrayList;
+ T2MoverArrayList *mMoverArrayList;
+ T2RequestArrayList *mRequestArrayList;
+ T2OutObjArrayList *mOutObjArrayList;
+ T2OutsideInfo *mOutsideInfo;
+
+protected:
+ BOOL IsValidRange(const RECT& inRect) const;
+ int CalcRequestRightEnd(POINT inPt, int inMaxH);
+ int CalcRequestLeftEnd(POINT inPt, int inMinH);
};