summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2RoutingTable.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/T2RoutingTable.h
parent37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff)
downloadt2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz
t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip
first pass of T2DLL
Diffstat (limited to 'src/T2DLL/T2RoutingTable.h')
-rw-r--r--src/T2DLL/T2RoutingTable.h78
1 files changed, 40 insertions, 38 deletions
diff --git a/src/T2DLL/T2RoutingTable.h b/src/T2DLL/T2RoutingTable.h
index a5596da..d42616b 100644
--- a/src/T2DLL/T2RoutingTable.h
+++ b/src/T2DLL/T2RoutingTable.h
@@ -1,54 +1,56 @@
#pragma once
#include "common.h"
+#include "LArray.h"
-class T2RoutingTable {
+class AFX_EXT_CLASS T2RoutingTable : private LArray {
public:
- T2RoutingTable(T2FloorInfo*, T2FloorPtrList*, int);
+ T2RoutingTable(T2FloorInfo* inFloorInfo, T2FloorPtrList* inFloorPtrList, int inWhichTable);
virtual ~T2RoutingTable();
void FloorAdded();
- void FloorRemoved(int);
-protected:
- int IsRelatedMover(T2Mover*) const;
-public:
- void MoverAdded(T2Mover*, int);
- void MoverRemoved(T2Mover*, int);
- void MoverModified(T2Mover*, int);
-protected:
- void AddItem(T2Mover*);
- void RemoveItem(T2Mover*);
- T2MoverRoutingTable* GetItem(T2Mover*) const;
- int GetElem(T2Mover*, int, T2RoutingTableElem&) const;
- int GetIndex(T2Mover*) const;
- void Update();
-public:
+ void FloorRemoved(int inFloorID);
+ void MoverAdded(T2Mover* inMover, BOOL inFlag);
+ void MoverRemoved(T2Mover* inMover, BOOL inFlag);
+ void MoverModified(T2Mover* inMover, BOOL inFlag);
void FullUpdate();
+ BOOL CheckRoute(POINT inFromPt, POINT inToPt, unsigned int inSearchScore) const;
+ BOOL IsConnectRouteFromLobby(POINT inPt) const;
+ BOOL GetNextRoute(POINT inFromPt, POINT& ioToPt) const;
+ T2Tenant* SelectNearTenant(POINT inPt, unsigned int inSearchScore) const;
+
protected:
+ BOOL IsRelatedMover(T2Mover* inMover) const;
+ void AddItem(T2Mover* inMover);
+ void RemoveItem(T2Mover* inMover);
+ T2MoverRoutingTable* GetItem(T2Mover* inMover) const;
+ BOOL GetElem(T2Mover* inMover, int inFloor, T2RoutingTableElem& outElem) const;
+ int GetIndex(T2Mover* inMover) const;
+ void Update();
void ClearData();
-public:
- int CheckRoute(POINT, POINT, unsigned int) const;
- int IsConnectRouteFromLobby(POINT) const;
- int GetNextRoute(POINT, POINT&) const;
- T2Tenant* SelectNearTenant(POINT, unsigned int) const;
-protected:
- T2Tenant* SelectNearTenant(T2Tenant*, int, unsigned int) const;
+ T2Tenant* SelectNearTenant(T2Tenant* inTenant, int inH, unsigned int inSearchScore) const;
-public:
- T2RoutingTable(const T2RoutingTable&) {}
- T2RoutingTable& operator=(const T2RoutingTable&) {}
+ unsigned int mAttributeMask;
+ T2FloorPtrList *mFloorPtrList;
+ T2FloorInfo *mFloorInfo;
};
-class T2RoutingTableElem {
+
+class AFX_EXT_CLASS T2RoutingTableElem {
public:
T2RoutingTableElem();
~T2RoutingTableElem();
- int IsStopFloor() const;
- void SetTable(unsigned int, int);
- int IsSetTable(unsigned int, unsigned int, int, int);
- int HasNextRoute(unsigned int) const;
+ BOOL IsStopFloor() const;
+ void SetTable(unsigned int inNextFloorID, int inFinalHPos);
+ BOOL IsSetTable(unsigned int inNextFloorID, unsigned int inScore, int inTime, int inFinalHPos);
+ BOOL HasNextRoute(unsigned int inFloorID) const;
+
+ unsigned int GetNextFloorID() const { return mNextFloorID; }
+ unsigned int GetScore() const { return mScore; }
+ int GetTime() const { return mTime; }
+ int GetFinalHPos() const { return mFinalHPos; }
+ BOOL HasRoute() const { return (mNextFloorID != 0); }
- T2RoutingTableElem& operator=(const T2RoutingTableElem&) {}
- unsigned int GetNextFloorID() const {}
- unsigned int GetScore() const {}
- int GetTime() const {}
- int GetFinalHPos() const {}
- int HasRoute() const {}
+protected:
+ unsigned int mNextFloorID;
+ unsigned int mScore;
+ int mTime;
+ int mFinalHPos;
};