summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-05-31 02:32:30 -0400
committerrealtradam <[email protected]>2023-05-31 02:32:30 -0400
commitf31ad1e6123a3a5b4b9dceddbf1b296b64626322 (patch)
tree4bfa5dc0de3e9b2dc72b7273e90f555e08fe4530
parent7da75ae48aa57f851777f8352bedd5b10015a7ce (diff)
downloadrodeo_sample_game-f31ad1e6123a3a5b4b9dceddbf1b296b64626322.tar.gz
rodeo_sample_game-f31ad1e6123a3a5b4b9dceddbf1b296b64626322.zip
added proper splash screen and play instructions
-rw-r--r--assets/death_menu_art.xcfbin0 -> 235624 bytes
-rw-r--r--assets/floor.pngbin147486 -> 152741 bytes
-rw-r--r--assets/main_menu.pngbin0 -> 76793 bytes
-rw-r--r--assets/menu_art.xcfbin0 -> 250713 bytes
-rw-r--r--assets/restart_menu.pngbin0 -> 76251 bytes
-rw-r--r--src/menu.c20
6 files changed, 17 insertions, 3 deletions
diff --git a/assets/death_menu_art.xcf b/assets/death_menu_art.xcf
new file mode 100644
index 0000000..3e485c5
--- /dev/null
+++ b/assets/death_menu_art.xcf
Binary files differ
diff --git a/assets/floor.png b/assets/floor.png
index e400264..83c8d4c 100644
--- a/assets/floor.png
+++ b/assets/floor.png
Binary files differ
diff --git a/assets/main_menu.png b/assets/main_menu.png
new file mode 100644
index 0000000..d2abc52
--- /dev/null
+++ b/assets/main_menu.png
Binary files differ
diff --git a/assets/menu_art.xcf b/assets/menu_art.xcf
new file mode 100644
index 0000000..63d49b7
--- /dev/null
+++ b/assets/menu_art.xcf
Binary files differ
diff --git a/assets/restart_menu.png b/assets/restart_menu.png
new file mode 100644
index 0000000..1b451bc
--- /dev/null
+++ b/assets/restart_menu.png
Binary files differ
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
);