Remove memory allocation in pathfinding
This commit is contained in:
@@ -23,11 +23,12 @@ typedef struct PathNodeRecord {
|
||||
typedef struct PathfindingDesc {
|
||||
Position start;
|
||||
Position target;
|
||||
BzObjectPool *pool;
|
||||
|
||||
BzTileMap *map;
|
||||
PathNode *openSet; // heap (size: width * height)
|
||||
PathNodeRecord *closedSet; // size: width * height
|
||||
Path *outPath;
|
||||
Path *outPath;
|
||||
|
||||
BzObjectPool *pool;
|
||||
BzStackAlloc *alloc;
|
||||
} PathfindingDesc;
|
||||
|
||||
bool pathfindAStar(const PathfindingDesc *desc);
|
||||
|
||||
Reference in New Issue
Block a user