blob: cf486cc5c78acb8a8b2b160223ca126042e2a938 (
plain)
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
|
#ifndef STATE_H
#define STATE_H
#include <engine/memory.h>
typedef enum StateType {
STATE_null,
#define State(name) STATE_##name,
#include <states/list_of_states.h>
#undef State
STATE_quit,
} StateType;
extern const char *StateTypeStr[];
StateType(*State_updateFunc(StateType type))(void*);
void State_init(StateType type, memory *mem);
void State_free(StateType type, memory *mem);
StateType State_update(StateType type, memory *mem);
/* Reloads shared object file associated with state */
bool State_reload(StateType type);
#endif
|