Rename variables in pathfinding.c to be more clear

This commit is contained in:
2023-11-18 18:07:22 +01:00
parent 2d50a43a73
commit 2fc0d7196a
3 changed files with 28 additions and 29 deletions

View File

@@ -5,15 +5,11 @@
#include "components.h"
typedef struct PathMove {
i8 x;
i8 y;
} PathMove;
typedef struct PathNode {
i32 weight; // g + h
i32 weight; // fCost = g + h
i32 gCost; // from start cost
i32 hCost; // to target cost
bool visited;
TilePosition pos;
} PathNode;
@@ -22,7 +18,7 @@ typedef struct PathfindingDesc {
TilePosition target;
BzObjectPool *pool;
BzTileMap *map;
PathNode *heap;
PathNode *openSet; // heap
Path *outPath;
} PathfindingDesc;