-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcrew.h
51 lines (42 loc) · 850 Bytes
/
crew.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
/*
harris - a strategy game
Copyright (C) 2012-2015 Edward Cree
licensed under GPLv3+ - see top of harris.c for details
crew: crew member handling
*/
#include <stdbool.h>
enum cclass
{
CCLASS_P,
CCLASS_N,
CCLASS_B,
CCLASS_E,
CCLASS_W,
CCLASS_G,
CREW_CLASSES,
CCLASS_NONE // for extra_pupil, and lookup failure
};
typedef struct
{
char letter;
const char *name;
const char *desc;
unsigned int initpool, pupils;
enum cclass extra_pupil;
bool eats;
}
cclass_data;
extern const cclass_data cclasses[CREW_CLASSES];
enum cstatus
{
CSTATUS_CREWMAN,
CSTATUS_STUDENT,
CSTATUS_INSTRUC,
SHOW_STATUSES,
CSTATUS_ESCAPEE = SHOW_STATUSES,
CREW_STATUSES,
CSTATUS_NONE // for lookup failure
};
extern const char *cstatuses[CREW_STATUSES];
enum cclass lookup_crew_letter(char letter);
enum cstatus lookup_crew_status(char *status);