OpenTTD

This file has the header for AyStar. More...
Go to the source code of this file.
Data Structures  
struct  AyStarNode 
Node in the search. More...  
struct  PathNode 
A path of nodes. More...  
struct  OpenListNode 
Internal node. More...  
struct  AyStar 
AyStar search algorithm struct. More...  
Typedefs  
typedef int32  AyStar_EndNodeCheck(AyStar *aystar, OpenListNode *current) 
Check whether the endtile is found. More...  
typedef int32  AyStar_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNode *parent) 
Calculate the Gvalue for the AyStar algorithm. More...  
typedef int32  AyStar_CalculateH(AyStar *aystar, AyStarNode *current, OpenListNode *parent) 
Calculate the Hvalue for the AyStar algorithm. More...  
typedef void  AyStar_GetNeighbours(AyStar *aystar, OpenListNode *current) 
This function requests the tiles around the current tile and put them in #tiles_around. More...  
typedef void  AyStar_FoundEndNode(AyStar *aystar, OpenListNode *current) 
If the End Node is found, this function is called. More...  
Enumerations  
enum  AystarStatus { AYSTAR_FOUND_END_NODE, AYSTAR_EMPTY_OPENLIST, AYSTAR_STILL_BUSY, AYSTAR_NO_PATH, AYSTAR_LIMIT_REACHED, AYSTAR_DONE } 
Return status of AyStar methods. More...  
Variables  
static const int  AYSTAR_INVALID_NODE = 1 
Item is not valid (for example, not walkable).  
This file has the header for AyStar.
AyStar is a fast path finding routine and is used for things like AI path finding and Train path finding. For more information about AyStar (A* Algorithm), you can look at http://en.wikipedia.org/wiki/Astar_search_algorithm.
Definition in file aystar.h.
typedef int32 AyStar_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNode *parent) 
Calculate the Gvalue for the AyStar algorithm.
typedef int32 AyStar_CalculateH(AyStar *aystar, AyStarNode *current, OpenListNode *parent) 
typedef int32 AyStar_EndNodeCheck(AyStar *aystar, OpenListNode *current) 
Check whether the endtile is found.
aystar  AyStar search algorithm data. 
current  Node to exam one. 
typedef void AyStar_FoundEndNode(AyStar *aystar, OpenListNode *current) 
typedef void AyStar_GetNeighbours(AyStar *aystar, OpenListNode *current) 
enum AystarStatus 
Return status of AyStar methods.