diff options
author | UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> | 2023-04-03 09:52:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 09:52:40 +0200 |
commit | 0a014f39c375c0cf28de70ebaab6cb0a5266f3c2 (patch) | |
tree | 4ee2404a1e796e8803035dd9285debcfdcb7bbea /src/game_loop/game_over.c | |
parent | d32a4942c7e16af5daf71a769906b17cb44de8e1 (diff) | |
parent | cc23564547b736125fe7e7869de277ea4d4455ab (diff) |
Merge branch 'lonkaars:dev' into dev
Diffstat (limited to 'src/game_loop/game_over.c')
-rw-r--r-- | src/game_loop/game_over.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/game_loop/game_over.c b/src/game_loop/game_over.c new file mode 100644 index 0000000..f5b70cf --- /dev/null +++ b/src/game_loop/game_over.c @@ -0,0 +1,28 @@ +#include "game_over.h" + + +void hh_game_over(hh_e_game_state* hh_game_state){ + static hh_e_game_over hh_e_states_game_over = hh_e_game_over_show; + + switch (hh_e_states_game_over) + { + case hh_e_game_over_show: + hh_clear_screen(); + hh_clear_sprite(); + // todo: make function to show game over + hh_e_states_game_over = hh_e_game_over_input; + break; + case hh_e_game_over_input: + if(g_hh_controller_p1.button_primary){ + hh_e_states_game_over = hh_e_game_over_end; + } + break; + case hh_e_game_over_end: + hh_e_states_game_over = hh_e_game_over_show; + *hh_game_state = hh_e_state_game_over; + break; + default: + hh_e_states_game_over = hh_e_game_over_show; + break; + } +} |