Dungeonator
1.0.0
a dungeon generator library
|
declaration file for directions enum More...
#include <assert.h>
#include <stdio.h>
Go to the source code of this file.
Macros | |
#define | NUM_DIRECTIONS 4 |
Typedefs | |
typedef enum Directions | Direction |
Enumerations | |
enum | Directions { NORTH , EAST , SOUTH , WEST } |
Functions | |
void | directionToDelta (Direction direction, int *dx, int *dy) |
Variables | |
const Direction | CARDINAL [NUM_DIRECTIONS] |
declaration file for directions enum
#define NUM_DIRECTIONS 4 |
the number of directions in the enum
typedef enum Directions Direction |
enum for the cardinal directions on a grid - used for the backtracking algorithm
enum Directions |
enum for the cardinal directions on a grid - used for the backtracking algorithm
void directionToDelta | ( | Direction | direction, |
int * | dx, | ||
int * | dy | ||
) |
convert the direction enum to a change in x and y, normalized, for use by the backtracking algorithm.
[in] | direction | the direction to convert |
[out] | dx | a pointer to a variable to write the change in x to, cannot be null |
[out] | dy | a pointer to a variable to write the change in xy to, cannot be null |
|
extern |
a constant array of cardinal directions