Dungeonator
1.0.0
a dungeon generator library
src
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
grid.h
declaration file for grid functions
regions_t
int ** regions_t
Definition:
grid.h:31
Room
struct Rooms Room
placeRoomsInGrid
bool placeRoomsInGrid(Grid *grid, regions_t regions, int tries, int roomAddSize, int *region)
Definition:
rooms.c:8
isOverlapping
bool isOverlapping(Room *A, Room *B)
Definition:
rooms.c:3
Grids
Definition:
grid.h:36
Rooms
Definition:
rooms.h:19
Rooms::y2
int y2
Definition:
rooms.h:35
Rooms::x2
int x2
Definition:
rooms.h:31
Rooms::x1
int x1
Definition:
rooms.h:23
Rooms::y1
int y1
Definition:
rooms.h:27
util.h
various utilities used thoughout the code
Generated by
1.9.0