22 #include "../../tile_type.h" 23 #include "../../track_type.h" 151 void AddStartNode(
AyStarNode *start_node, uint g);
167 void ClosedListAdd(
const PathNode *node);
void AyStar_FoundEndNode(AyStar *aystar, OpenListNode *current)
If the End Node is found, this function is called.
static const int AYSTAR_INVALID_NODE
Item is not valid (for example, not walkable).
No path to the goal was found.
byte loops_per_tick
How many loops are there called before Main() gives control back to the caller. 0 = until done...
uint max_path_cost
If the g-value goes over this number, it stops searching, 0 = infinite.
Not an end-tile, or wrong direction.
The #max_nodes limit has been reached, aborting search.
BinaryHeap openlist_queue
The open queue.
AyStar search algorithm struct.
Binary heap implementation, hash implementation.
int32 AyStar_EndNodeCheck(AyStar *aystar, OpenListNode *current)
Check whether the end-tile is found.
uint max_search_nodes
The maximum number of nodes that will be expanded, 0 = infinite.
Trackdir
Enumeration for tracks and directions.
All items are tested, and no path has been found.
uint Hash_HashProc(uint key1, uint key2)
Generates a hash code from the given key pair.
PathNode * parent
The parent of this item.
int32 AyStar_CalculateH(AyStar *aystar, AyStarNode *current, OpenListNode *parent)
Calculate the H-value for the AyStar algorithm.
Hash closedlist_hash
The actual closed list.
Some checking was done, but no path found yet, and there are still items left to try.
void AyStar_GetNeighbours(AyStar *aystar, OpenListNode *current)
This function requests the tiles around the current tile and put them in #tiles_around.
int32 AyStar_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNode *parent)
Calculate the G-value for the AyStar algorithm.
uint32 TileIndex
The index/ID of a Tile.
AystarStatus
Return status of AyStar methods.
Hash openlist_hash
An extra hash to speed up the process of looking up an element in the open list.