Dungeonator  1.0.0
a dungeon generator library
rooms.h
Go to the documentation of this file.
1 #ifndef ROOMS_H
2 #define ROOMS_H
3 
9 #include "util.h"
10 #include "grid.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif // __cplusplus
15 
19  typedef struct Rooms {
23  int x1;
27  int y1;
31  int x2;
35  int y2;
36  } Room;
37 
46  bool isOverlapping(Room* A, Room* B);
47 
48 #ifndef ROOMS_ALLOC_SIZE
52 #define ROOMS_ALLOC_SIZE 20
53 #endif
54 
66  bool placeRoomsInGrid(Grid* grid, regions_t regions, int tries, int roomAddSize, int* region);
67 
68 #ifdef __cplusplus
69 }
70 #endif // __cplusplus
71 
72 #endif // !ROOMS_H
declaration file for grid functions
int ** regions_t
Definition: grid.h:31
struct Rooms Room
bool placeRoomsInGrid(Grid *grid, regions_t regions, int tries, int roomAddSize, int *region)
Definition: rooms.c:8
bool isOverlapping(Room *A, Room *B)
Definition: rooms.c:3
Definition: grid.h:36
Definition: rooms.h:19
int y2
Definition: rooms.h:35
int x2
Definition: rooms.h:31
int x1
Definition: rooms.h:23
int y1
Definition: rooms.h:27
various utilities used thoughout the code