diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-12 15:31:26 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-12 15:31:26 +0100 |
| commit | 10ae402862df4337772fe8e35f68ee8ab5bfc224 (patch) | |
| tree | 1ac5fda82a2dd01f7f5ffdc2b337947c569afc15 /include/game.h | |
| parent | ec3796faff12ba7bf5f775d757ac25834549903d (diff) | |
networking
Diffstat (limited to 'include/game.h')
| -rw-r--r-- | include/game.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/game.h b/include/game.h new file mode 100644 index 0000000..944a831 --- /dev/null +++ b/include/game.h @@ -0,0 +1,32 @@ +#ifndef INCLUDE_GAME +#define INCLUDE_GAME + +#include <projectbase/project_base.h> + +#include "../include/protocol.h" + +typedef enum t_game_state { + GAMESTATE_IDLE, + GAMESTATE_LOADING_MAP, + GAMESTATE_PLAYING, +} game_state; + +typedef enum t_network_state { + CONNECTING, + WAITING_FOR_ID, + CONNECTED, + DISCONNECTED, +} network_state; + +typedef struct t_game { + game_state state; + network_state network_state; + network_server *server; + network_client *client; +} game; + +game global_state; + +void init_game(); + +#endif
\ No newline at end of file |
