diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/menu.h | 11 | ||||
| -rw-r--r-- | include/players.h | 1 | ||||
| -rw-r--r-- | include/rounds.h | 4 | ||||
| -rw-r--r-- | include/zombies.h | 1 |
4 files changed, 15 insertions, 2 deletions
diff --git a/include/menu.h b/include/menu.h index 1623d51..9a448cd 100644 --- a/include/menu.h +++ b/include/menu.h @@ -3,11 +3,20 @@ #include <projectbase/project_base.h> -#define PROGRAM_VERSION "0.1.0 | "__DATE__ +#define PROGRAM_VERSION "0.1 | "__DATE__ + +typedef enum t_menu_state { + MENU_STATE_MAIN, + MENU_STATE_LEVEL_SELECT, + MENU_STATE_CREDITS, + MENU_STATE_SETTINGS, + MENU_STATE_JOIN_GAME, +} menu_state; extern int current_res_index; extern bool is_fullscreen; vec2 available_resolutions[10]; +extern menu_state current_menu_state; void update_menu(platform_window* window); diff --git a/include/players.h b/include/players.h index d97b978..1343e14 100644 --- a/include/players.h +++ b/include/players.h @@ -114,5 +114,6 @@ char* get_player_name_by_player_index(int index); color get_color_tint_by_player_index(int index); void add_points_to_player(player* p, u32 points); void update_points_animation_server(); +void clear_players(); #endif
\ No newline at end of file diff --git a/include/rounds.h b/include/rounds.h index 2a93f30..4edbde2 100644 --- a/include/rounds.h +++ b/include/rounds.h @@ -11,6 +11,7 @@ typedef enum t_round_state { } round_state; #define FADE_IN_DURATION 3.0f +#define FADE_OUT_DELAY_DURATION 2.0f typedef struct t_zombie_round { u32 round_nr; @@ -18,9 +19,10 @@ typedef struct t_zombie_round { round_state state; float round_timer; float fade_in_timer; + float fade_out_timer; } zombie_round; -zombie_round _current_round = {.round_nr = 0, .zombies = 0, .state = ROUND_SWITCHING, 3.0f}; +zombie_round _current_round = {.round_nr = 0, .zombies = 0, .state = ROUND_SWITCHING, FADE_IN_DURATION, FADE_OUT_DELAY_DURATION}; bool current_round_is_done(); void start_next_round(); diff --git a/include/zombies.h b/include/zombies.h index 36d4ede..1b3a728 100644 --- a/include/zombies.h +++ b/include/zombies.h @@ -61,6 +61,7 @@ void create_spawner(vec2 position); void draw_spawners(platform_window* window); void draw_zombies(platform_window* window, uint32_t ystart, uint32_t yend); void spawn_zombie(int x, int y); +void clear_zombies(); u32 number_of_zombies_active(); #endif
\ No newline at end of file |
