This file has the header for AyStar. More...
#include "queue.h"#include "../../tile_type.h"#include "../../track_type.h"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 end-tile is found. | |
| typedef int32 | AyStar_CalculateG (AyStar *aystar, AyStarNode *current, OpenListNode *parent) |
| Calculate the G-value for the AyStar algorithm. | |
| typedef int32 | AyStar_CalculateH (AyStar *aystar, AyStarNode *current, OpenListNode *parent) |
| Calculate the H-value for the AyStar algorithm. | |
| typedef void | AyStar_GetNeighbours (AyStar *aystar, OpenListNode *current) |
| This function requests the tiles around the current tile and put them in tiles_around. | |
| typedef void | AyStar_FoundEndNode (AyStar *aystar, OpenListNode *current) |
| If the End Node is found, this function is called. | |
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/A-star_search_algorithm.
Definition in file aystar.h.
| typedef int32 AyStar_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNode *parent) |
Calculate the G-value 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 end-tile is found.
| aystar | AyStar search algorithm data. | |
| current | Node to examone. |
| typedef void AyStar_FoundEndNode(AyStar *aystar, OpenListNode *current) |
| typedef void AyStar_GetNeighbours(AyStar *aystar, OpenListNode *current) |
| enum AystarStatus |
Return status of AyStar methods.
1.7.1