Add path smoothing

This commit is contained in:
2023-11-23 19:01:28 +01:00
parent d62e08a6b8
commit 3885e911a3
4 changed files with 147 additions and 60 deletions

View File

@@ -13,12 +13,19 @@ typedef struct PathNode {
TilePosition pos;
} PathNode;
typedef struct PathClosedNode {
bool visited : 1;
i8 x : 3;
i8 y : 3;
} PathClosedNode;
typedef struct PathfindingDesc {
Position start;
Position target;
BzObjectPool *pool;
BzTileMap *map;
PathNode *openSet; // heap
PathNode *openSet; // heap (size: width * height)
PathClosedNode *closedSet; // size: width * height
Path *outPath;
} PathfindingDesc;