#pragma once #include "common.h" enum { kRouteTypeNeg1 = -1, // Normal people movement kRouteType0 = 0, // Trash disposal 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; }