diff options
author | quou <quou@disroot.org> | 2024-10-05 12:13:47 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-10-05 12:13:47 +1000 |
commit | 0e75a2949678cb8a68fb0819355864aa6db2cb43 (patch) | |
tree | abeb4ecb53649e520e4fcc1652ad870e3d7175fa /game.h | |
parent | 6cab1d56ad2b29a2556090f1f0ce7e2b72d5460a (diff) |
Level transitions and main menu
Diffstat (limited to 'game.h')
-rw-r--r-- | game.h | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -0,0 +1,35 @@ +#ifndef game_h +#define game_h + +#include "world.h" + +struct Renderer; +struct App; + +#define game_max_state_queue 8 + +typedef enum { + game_state_menu, + game_state_play, + game_state_generate, + game_state_fade_in, + game_state_fade_out, + game_state_over +} Game_State; + +typedef struct { + World w; + Game_State st, ps; + Game_State sq[game_max_state_queue]; + Rect fr; + int want_next; + int qt, frame, ff; +} Game; + +void init_game(Game* g, Game_State s); +void update_game(Game* g, struct App* a); +void ren_game(const Game* g, struct Renderer* r); +void queue_gs(Game* g, Game_State s); +void next_gs(Game* g); + +#endif |