1
0
Fork 0
forked from NotAShelf/rogged
rogged/src/map.h
NotAShelf d3798cc99f
map: add is_floor() helper to check walkable tiles
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I7368f74d1cbcf5913e5d8e9331cfa4326a6a6964
2026-04-03 15:45:11 +03:00

21 lines
488 B
C

#ifndef MAP_H
#define MAP_H
#include "common.h"
// Check if a tile is walkable floor
int is_floor(const Map *map, int x, int y);
// Get room center coordinates
void get_room_center(Room *room, int *cx, int *cy);
// Generate a new dungeon floor
void dungeon_generate(Dungeon *d, Map *map, int floor_num);
// Initialize map to all walls
void map_init(Map *map);
// Get a random floor tile position
void get_random_floor_tile(Map *map, int *x, int *y, int attempts);
#endif // MAP_H