Dungeonator
1.0.0
a dungeon generator library
|
code for placing and detecting collisions of rooms More...
Go to the source code of this file.
Data Structures | |
struct | Rooms |
Macros | |
#define | ROOMS_ALLOC_SIZE 20 |
Typedefs | |
typedef struct Rooms | Room |
Functions | |
bool | isOverlapping (Room *A, Room *B) |
bool | placeRoomsInGrid (Grid *grid, regions_t regions, int tries, int roomAddSize, int *region) |
code for placing and detecting collisions of rooms
#define ROOMS_ALLOC_SIZE 20 |
the default allocation size for the array of rooms, can be overrided
test if two rooms are overlapping
[in] | A | a pointer to the frist room to test |
[in] | B | a pointer to the second room to test |
place rooms in a grid so that they don't overlap, and fill in their respective regions
[in,out] | grid | the grid to put the rooms onto |
[in,out] | regions | the regions to place the rooms' regions onto |
[in] | tries | the number of tries to places the rooms |
[in] | roomAddSize | larger = bigger rooms |
[in,out] | region | a pointer to the region counter to determine the current region - will be mutated |