blob: f5b70cfa1b334885fbc55463a6d5986eeda6319b (
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
27
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;
}
}
|