Dungeonator  1.0.0
a dungeon generator library
connectors.h
Go to the documentation of this file.
1 #ifndef CONNECTORS_H
2 #define CONNECTORS_H
3 
9 #include <stdbool.h>
10 
11 #include "grid.h"
12 #include "direction.h"
13 #include "util.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif // __cplusplus
18 
22 typedef struct Connectors
23 {
35  int x;
39  int y;
43  bool used;
45 
46 #ifndef CONNECTOR_ALLOC_SIZE
51 #define CONNECTOR_ALLOC_SIZE 50
52 #endif // !CONNECTOR_ALLOC_SIZE
53 
63 Connector* getConnectors(Grid* grid, regions_t regions, size_t* num_connectors);
64 
79 int* mapMergedRegions(Connector* connector, int* merged, int* num_regions);
80 
81 #ifdef __cplusplus
82 }
83 #endif // __cplusplus
84 
85 #endif // !CONNECTORS_H
struct Connectors Connector
Connector * getConnectors(Grid *grid, regions_t regions, size_t *num_connectors)
Definition: connectors.c:3
int * mapMergedRegions(Connector *connector, int *merged, int *num_regions)
Definition: connectors.c:45
declaration file for directions enum
#define NUM_DIRECTIONS
Definition: direction.h:19
declaration file for grid functions
int ** regions_t
Definition: grid.h:31
Definition: connectors.h:23
int y
Definition: connectors.h:39
bool used
Definition: connectors.h:43
int regions[NUM_DIRECTIONS]
Definition: connectors.h:27
int num_regions
Definition: connectors.h:31
int x
Definition: connectors.h:35
Definition: grid.h:36
various utilities used thoughout the code