28#ifndef MAPSEARCHASTARPME_H
29#define MAPSEARCHASTARPME_H
32#include "MemoryManager.h"
36using namespace CRM64Pro;
38class MapSearchAStar :
public CMemPME
41 explicit MapSearchAStar(GameField*);
53 eSearchState findPath(Sint32, Sint32, Sint32, Sint32, vector<MazePoint>&, Sint32);
58 float heuristic(MazeNode*);
59 float cost(MazeNode*, Sint32, Sint32);
61 bool addSuccessor(MazeNode *);
62 bool getSuccessors(MazeNode *, MazeNode *);
64 MazeNode* allocateNode();
65 void freeNode(MazeNode *);
67 void freeUnusedNodes();
68 void freeSolutionNodes();
69 MazeNode* getSolutionStart();
70 MazeNode* getSolutionNext();
71 MazeNode* getSolutionEnd();
72 MazeNode* getSolutionPrev();
75 vector<MazeNode*> vOpenList;
76 vector<MazeNode*> vClosedList;
77 vector<MazeNode*> vSuccessors;
84 MazeNode* pNodeCurrentSolution;
85 Sint32 iMinimumAcceptableValue;
89 GameField* pGameField;
92 MazeNode* getOpenListStart();
93 MazeNode* getOpenListStart(
float &,
float &,
float &);
94 MazeNode* getOpenListNext();
95 MazeNode* getOpenListNext(
float &,
float &,
float &);
96 MazeNode* getClosedListStart();
97 MazeNode* getClosedListStart(
float &,
float &,
float &);
98 MazeNode* getClosedListNext();
99 MazeNode* getClosedListNext(
float &,
float &,
float &);
100 vector<MazeNode*>::iterator iterDbgOpen;
101 vector<MazeNode*>::iterator iterDbgClosed;
102 Sint32 iAllocateNodeCount;
103 Sint32 iFreeNodeCount;