initial commit

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ie3b66d17f6f660c9b9a719210bd86f9f6a6a6964
This commit is contained in:
raf 2026-03-17 23:34:37 +03:00
commit b381e2efbd
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
29 changed files with 1633 additions and 0 deletions

21
src/map.h Normal file
View file

@ -0,0 +1,21 @@
#ifndef MAP_H
#define MAP_H
#include "common.h"
// Check if a tile is walkable floor
int is_floor(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