From 49ba3539b5971535476110cba85dbf13f9b02bd6 Mon Sep 17 00:00:00 2001 From: alberth Date: Sat, 2 Oct 2010 09:58:32 +0000 Subject: (svn r20867) -Codechange: Make AyStarMain_AddStartNode() a method. --- src/pathfinder/npf/aystar.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/pathfinder/npf/aystar.cpp') diff --git a/src/pathfinder/npf/aystar.cpp b/src/pathfinder/npf/aystar.cpp index 956f81a83..2910f2c1c 100644 --- a/src/pathfinder/npf/aystar.cpp +++ b/src/pathfinder/npf/aystar.cpp @@ -268,13 +268,13 @@ int AyStarMain_Main(AyStar *aystar) * clear() automatically when the algorithm finishes * g is the cost for starting with this node. */ -static void AyStarMain_AddStartNode(AyStar *aystar, AyStarNode *start_node, uint g) +void AyStar::AddStartNode(AyStarNode *start_node, uint g) { #ifdef AYSTAR_DEBUG printf("[AyStar] Starting A* Algorithm from node (%d, %d, %d)\n", TileX(start_node->tile), TileY(start_node->tile), start_node->direction); #endif - AyStarMain_OpenList_Add(aystar, NULL, start_node, 0, g); + AyStarMain_OpenList_Add(this, NULL, start_node, 0, g); } void init_AyStar(AyStar *aystar, Hash_HashProc hash, uint num_buckets) @@ -289,6 +289,5 @@ void init_AyStar(AyStar *aystar, Hash_HashProc hash, uint num_buckets) * That is why it can stay this high */ aystar->OpenListQueue.Init(102400); - aystar->addstart = AyStarMain_AddStartNode; aystar->main = AyStarMain_Main; } -- cgit v1.2.3-54-g00ecf