From e987d23d915942ec4a3910b9cc2729f1b21361a9 Mon Sep 17 00:00:00 2001 From: NielsCoding <48092678+heavydemon21@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:48:06 +0200 Subject: snake case/background --- src/game_loop/game_over.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/game_loop/game_over.c (limited to 'src/game_loop/game_over.c') 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; + } +} -- cgit v1.2.3