Add path smoothing
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user