summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2RouteNavigator.h
blob: a667e075cb8491e2ffba2abe3ac55ce7fbd023b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "common.h"

enum {
	kRouteTypeNeg1 = -1,
	kRouteType0 = 0,
	kRouteType1 = 1,
	kRouteType2 = 2,
	kRouteType3 = 3,
	kMaxRouteType = 4
};

class AFX_CLASS_EXPORT T2RouteNavigator {
public:
	T2RouteNavigator(T2FloorInfo* inFloorInfo);
	virtual ~T2RouteNavigator();
	void FloorAdded(T2Tenant* inTenant, BOOL inFlag);
	void FloorRemoved(T2Tenant* inTenant, BOOL inFlag);
	void MoverAdded(T2Mover* inMover, BOOL inFlag);
	void MoverRemoved(T2Mover* inMover, BOOL inFlag);
	void MoverModified(T2Mover* inMover, BOOL inFlag);
	void Update();
	BOOL CheckRoute(POINT inFromPt, POINT inToPt, unsigned int inSearchScore, int inRouteType = kRouteType0) const;
	BOOL IsConnectRouteFromLobby(POINT inPt) const;
	BOOL GetNextRoute(POINT inFromPt, POINT& ioToPt, int inRouteType) const;
	T2Tenant* SelectNearTenant(POINT inPt, unsigned int inSearchScore) const;
	T2FloorPtrList* GetFloorPtrList() const;

protected:
	BOOL GetNextRouteUsingEStair(POINT inFromPt, POINT&) const;

	T2FloorPtrList *mFloorPtrList;
	T2FloorInfo *mFloorInfo;
	T2RoutingTable *mRoutingTables[kMaxRouteType];
};

inline T2FloorPtrList* T2RouteNavigator::GetFloorPtrList() const {
    return mFloorPtrList;
}