Dungeonator  1.0.0
a dungeon generator library
direction.h
Go to the documentation of this file.
1 #ifndef DIRECTION_H
2 #define DIRECTION_H
3 
9 #include <assert.h>
10 #include <stdio.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif // __cplusplus
15 
19 #define NUM_DIRECTIONS 4
20 
24  typedef enum Directions {
25  NORTH,
26  EAST,
27  SOUTH,
28  WEST,
30 
34  extern const Direction CARDINAL[NUM_DIRECTIONS];
35 
44  void directionToDelta(Direction direction, int* dx, int* dy);
45 
46 #ifdef __cplusplus
47 }
48 #endif // __cplusplus
49 
50 #endif // !DIRECTION_H
enum Directions Direction
Directions
Definition: direction.h:24
void directionToDelta(Direction direction, int *dx, int *dy)
Definition: direction.c:5
const Direction CARDINAL[NUM_DIRECTIONS]
Definition: direction.c:3
#define NUM_DIRECTIONS
Definition: direction.h:19