src/ai/trolly/pathfinder.cpp
changeset 6248 e4a2ed7e5613
parent 6010 3dfeb08abf4a
child 6681 567445b47b68
equal deleted inserted replaced
6247:7d81e3a5d803 6248:e4a2ed7e5613
   370 
   370 
   371 
   371 
   372 extern uint GetRailFoundation(Slope tileh, TrackBits bits); // XXX function declaration in .c
   372 extern uint GetRailFoundation(Slope tileh, TrackBits bits); // XXX function declaration in .c
   373 extern uint GetRoadFoundation(Slope tileh, RoadBits bits); // XXX function declaration in .c
   373 extern uint GetRoadFoundation(Slope tileh, RoadBits bits); // XXX function declaration in .c
   374 extern uint GetBridgeFoundation(Slope tileh, Axis); // XXX function declaration in .c
   374 extern uint GetBridgeFoundation(Slope tileh, Axis); // XXX function declaration in .c
   375 typedef enum BridgeFoundations{
   375 enum BridgeFoundation {
   376 	BRIDGE_NO_FOUNDATION = 1 << 0 | 1 << 3 | 1 << 6 | 1 << 9 | 1 << 12,
   376 	BRIDGE_NO_FOUNDATION = 1 << 0 | 1 << 3 | 1 << 6 | 1 << 9 | 1 << 12,
   377 } BridgeFoundation;
   377 };
   378 
   378 
   379 // The most important function: it calculates the g-value
   379 // The most important function: it calculates the g-value
   380 static int32 AyStar_AiPathFinder_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNode *parent)
   380 static int32 AyStar_AiPathFinder_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNode *parent)
   381 {
   381 {
   382 	Ai_PathFinderInfo *PathFinderInfo = (Ai_PathFinderInfo*)aystar->user_target;
   382 	Ai_PathFinderInfo *PathFinderInfo = (Ai_PathFinderInfo*)aystar->user_target;