22 lines
526 B
C
22 lines
526 B
C
#ifndef PATHFINDING_H
|
|
#define PATHFINDING_H
|
|
|
|
#include <raylib.h>
|
|
#include <stdbool.h>
|
|
|
|
#include "terrain.h"
|
|
|
|
#define PATH_MAX_WAYPOINTS 16
|
|
|
|
typedef struct {
|
|
Vector2 waypoints[PATH_MAX_WAYPOINTS];
|
|
int count;
|
|
} Path;
|
|
|
|
bool IsWaterWithClearance(Terrain *terrain, Vector2 pos, float clearance);
|
|
Vector2 GetRandomWaterPositionNear(Terrain *terrain, Vector2 origin, float maxRadius,
|
|
float clearance);
|
|
Path FindWaterPath(Terrain *terrain, Vector2 start, Vector2 goal, float clearance);
|
|
|
|
#endif
|