summaryrefslogtreecommitdiff
path: root/src/pathfinder/npf/aystar.h
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-10-02 10:00:05 +0000
committeralberth <alberth@openttd.org>2010-10-02 10:00:05 +0000
commit7bb7d6c35a8d5ce01120fe54b7544186be24ef08 (patch)
tree82fbe310f2a6275cf6c8f353d18dd342f0bc6bde /src/pathfinder/npf/aystar.h
parent49ba3539b5971535476110cba85dbf13f9b02bd6 (diff)
downloadopenttd-7bb7d6c35a8d5ce01120fe54b7544186be24ef08.tar.xz
(svn r20868) -Codechange: Make AyStarMain_Main() a method.
Diffstat (limited to 'src/pathfinder/npf/aystar.h')
-rw-r--r--src/pathfinder/npf/aystar.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/pathfinder/npf/aystar.h b/src/pathfinder/npf/aystar.h
index bcda7000a..199e3d944 100644
--- a/src/pathfinder/npf/aystar.h
+++ b/src/pathfinder/npf/aystar.h
@@ -103,9 +103,6 @@ typedef void AyStar_GetNeighbours(AyStar *aystar, OpenListNode *current);
*/
typedef void AyStar_FoundEndNode(AyStar *aystar, OpenListNode *current);
-/* For internal use, see aystar.cpp */
-typedef int AyStar_Main(AyStar *aystar);
-
struct AyStar {
/* These fields should be filled before initting the AyStar, but not changed
* afterwards (except for user_data and user_path)! (free and init again to change them) */
@@ -128,7 +125,7 @@ struct AyStar {
void *user_target;
uint user_data[10];
- /* How many loops are there called before AyStarMain_Main gives
+ /* How many loops are there called before Main() gives
* control back to the caller. 0 = until done */
byte loops_per_tick;
/* If the g-value goes over this number, it stops searching
@@ -143,9 +140,9 @@ struct AyStar {
byte num_neighbours;
/* These will contain the methods for manipulating the AyStar. Only
- * main() should be called externally */
+ * Main() should be called externally */
void AddStartNode(AyStarNode *start_node, uint g);
- AyStar_Main *main;
+ int Main();
int Loop();
void Free();
void Clear();
@@ -163,8 +160,6 @@ struct AyStar {
};
-int AyStarMain_Main(AyStar *aystar);
-
/* Initialize an AyStar. You should fill all appropriate fields before
* callling init_AyStar (see the declaration of AyStar for which fields are
* internal */