various: implement fog of war; make enemy AI slightly more intelligent

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I3e22dbc5e10690871255980c52a24c226a6a6964
This commit is contained in:
raf 2026-04-09 09:35:52 +03:00
commit f85d28e932
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
8 changed files with 151 additions and 21 deletions

View file

@ -18,4 +18,10 @@ void map_init(Map *map);
// Get a random floor tile position
void get_random_floor_tile(Map *map, int *x, int *y, int attempts);
// Visibility / Fog of War
int is_in_view_range(int x, int y, int view_x, int view_y, int range);
int has_line_of_sight(const Map *map, int x1, int y1, int x2, int y2);
void calculate_visibility(Map *map, int x, int y);
int can_see_entity(const Map *map, int from_x, int from_y, int to_x, int to_y, int range);
#endif // MAP_H