Rename variables in pathfinding.c to be more clear
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user