-
Notifications
You must be signed in to change notification settings - Fork 1
/
enums.h
64 lines (50 loc) · 1.32 KB
/
enums.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef H_ENUMS
#define H_ENUMS
#define GENERATE_ENUM(ENUM) ENUM,
#define GENERATE_STRING(STRING) #STRING,
// Artifact definitions
#define FOREACH_ARTIFACT(ARTIFACT) \
ARTIFACT(GamePiece) \
ARTIFACT(Ball) \
ARTIFACT(Hatch) \
enum ARTIFACT_ENUM {
FOREACH_ARTIFACT(GENERATE_ENUM)
};
static const char *ARTIFACT_STRING[] = {
FOREACH_ARTIFACT(GENERATE_STRING)
};
// Direction definitions
#define FOREACH_DIRECTION(DIRECTION) \
DIRECTION(Back) \
DIRECTION(Front) \
enum DIRECTION_ENUM {
FOREACH_DIRECTION(GENERATE_ENUM)
};
static const char *DIRECTION_STRING[] = {
FOREACH_DIRECTION(GENERATE_STRING)
};
// Destination definitions
#define FOREACH_DESTINATION(DESTINATION) \
DESTINATION(Destination) \
DESTINATION(Rocket) \
DESTINATION(CargoShip) \
DESTINATION(LoadingStation) \
enum DESTINATION_ENUM {
FOREACH_DESTINATION(GENERATE_ENUM)
};
static const char *DESTINATION_STRING[] = {
FOREACH_DESTINATION(GENERATE_STRING)
};
// Height definitions
#define FOREACH_HEIGHT(HEIGHT) \
HEIGHT(Height) \
HEIGHT(High) \
HEIGHT(Medium) \
HEIGHT(Low) \
enum HEIGHT_ENUM {
FOREACH_HEIGHT(GENERATE_ENUM)
};
static const char *HEIGHT_STRING[] = {
FOREACH_HEIGHT(GENERATE_STRING)
};
#endif // H_ENUMS