Restructure files
This commit is contained in:
30
game/pathfinding.h
Normal file
30
game/pathfinding.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef PIXELDEFENSE_PATHFINDING_H
|
||||
#define PIXELDEFENSE_PATHFINDING_H
|
||||
|
||||
#include <breeze.h>
|
||||
|
||||
#include "components.h"
|
||||
|
||||
typedef struct PathMove {
|
||||
i8 x;
|
||||
i8 y;
|
||||
} PathMove;
|
||||
|
||||
typedef struct PathNode {
|
||||
i32 weight; // g + h
|
||||
i32 gCost; // from start cost
|
||||
i32 hCost; // to target cost
|
||||
TilePosition pos;
|
||||
} PathNode;
|
||||
|
||||
typedef struct PathfindingDesc {
|
||||
TilePosition start;
|
||||
TilePosition target;
|
||||
BzTileMap *map;
|
||||
PathNode *heap;
|
||||
Path *outPath;
|
||||
} PathfindingDesc;
|
||||
|
||||
bool findPath(const PathfindingDesc *desc);
|
||||
|
||||
#endif //PIXELDEFENSE_PATHFINDING_H
|
||||
Reference in New Issue
Block a user