aystar.h
changeset 2008 cdb444f6d43c
parent 1977 37bbebf94434
child 2186 db48cf29b983
equal deleted inserted replaced
2007:b0f522d5a80f 2008:cdb444f6d43c
    94  * If the End Node is found, this function is called.
    94  * If the End Node is found, this function is called.
    95  *  It can do, for example, calculate the route and put that in an array
    95  *  It can do, for example, calculate the route and put that in an array
    96  */
    96  */
    97 typedef void AyStar_FoundEndNode(AyStar *aystar, OpenListNode *current);
    97 typedef void AyStar_FoundEndNode(AyStar *aystar, OpenListNode *current);
    98 
    98 
       
    99 /*
       
   100  * Is called when aystar ends it pathfinding, but before cleanup.
       
   101  */
       
   102 typedef void AyStar_BeforeExit(AyStar *aystar);
       
   103 
    99 // For internal use, see aystar.c
   104 // For internal use, see aystar.c
   100 typedef void AyStar_AddStartNode(AyStar *aystar, AyStarNode* start_node, uint g);
   105 typedef void AyStar_AddStartNode(AyStar *aystar, AyStarNode* start_node, uint g);
   101 typedef int AyStar_Main(AyStar *aystar);
   106 typedef int AyStar_Main(AyStar *aystar);
   102 typedef int AyStar_Loop(AyStar *aystar);
   107 typedef int AyStar_Loop(AyStar *aystar);
   103 typedef int AyStar_CheckTile(AyStar *aystar, AyStarNode *current, OpenListNode *parent);
   108 typedef int AyStar_CheckTile(AyStar *aystar, AyStarNode *current, OpenListNode *parent);
   113 	AyStar_CalculateG* CalculateG;
   118 	AyStar_CalculateG* CalculateG;
   114 	AyStar_CalculateH* CalculateH;
   119 	AyStar_CalculateH* CalculateH;
   115 	AyStar_GetNeighbours* GetNeighbours;
   120 	AyStar_GetNeighbours* GetNeighbours;
   116 	AyStar_EndNodeCheck* EndNodeCheck;
   121 	AyStar_EndNodeCheck* EndNodeCheck;
   117 	AyStar_FoundEndNode* FoundEndNode;
   122 	AyStar_FoundEndNode* FoundEndNode;
       
   123 	AyStar_BeforeExit* BeforeExit;
   118 
   124 
   119 	/* These are completely untouched by AyStar, they can be accesed by
   125 	/* These are completely untouched by AyStar, they can be accesed by
   120 	 * the application specific routines to input and output data.
   126 	 * the application specific routines to input and output data.
   121 	 * user_path should typically contain data about the resulting path
   127 	 * user_path should typically contain data about the resulting path
   122 	 * afterwards, user_target should typically contain information about
   128 	 * afterwards, user_target should typically contain information about