summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/menu.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/menu.c b/src/menu.c
index 35f92b2..868fbfd 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -15,10 +15,10 @@ void
init_menu(void)
{
splash_texture = rodeo_texture_2d_create_from_path(cstr_lit("assets/splash.png"));
- main_menu_texture = rodeo_texture_2d_create_from_path(cstr_lit("assets/mainmenu.png"));
- gameover_texture = rodeo_texture_2d_create_from_path(cstr_lit("assets/gameover.png"));
+ main_menu_texture = rodeo_texture_2d_create_from_path(cstr_lit("assets/main_menu.png"));
+ gameover_texture = rodeo_texture_2d_create_from_path(cstr_lit("assets/restart_menu.png"));
- menu_state = menu_state_splash;
+ menu_state = menu_state_main;
splash_timer = 3000.0f;
rodeo_input_scene_activate(get_command_inputs()->menu_scene);
}
@@ -34,6 +34,7 @@ deinit_menu(void)
void
draw_menu(void)
{
+ float transparency = 0.65f;
if (splash_timer > 0 && menu_state == menu_state_splash)
{
splash_timer -= rodeo_frame_time_get();
@@ -49,6 +50,13 @@ draw_menu(void)
}
else if (menu_state == menu_state_main)
{
+
+ rodeo_texture_2d_draw(
+ &screen_dimensions,
+ &screen_dimensions,
+ &(rodeo_color_RGBAFloat_t){ .array = { 0,0,0,transparency }},
+ NULL
+ );
rodeo_texture_2d_draw(
&screen_dimensions,
&screen_dimensions,
@@ -61,6 +69,12 @@ draw_menu(void)
rodeo_texture_2d_draw(
&screen_dimensions,
&screen_dimensions,
+ &(rodeo_color_RGBAFloat_t){ .array = { 0,0,0,transparency }},
+ NULL
+ );
+ rodeo_texture_2d_draw(
+ &screen_dimensions,
+ &screen_dimensions,
NULL,
&gameover_texture
);