src/ai/trolly/pathfinder.cpp
branchcpp_gui
changeset 6298 c30fe89622df
parent 6254 abc6ad7c035c
child 6719 4cc327ad39d5
child 7177 08330bb931a1
equal deleted inserted replaced
6297:4bf29d14edba 6298:c30fe89622df
   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;