From b4dd0c8956f1c81836e4f3020efe2f85b3d91902 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 20 Jun 2023 23:08:22 +0100 Subject: Add menu screen (WIP) --- src/menu.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/menu.c (limited to 'src/menu.c') diff --git a/src/menu.c b/src/menu.c new file mode 100644 index 0000000..02cda24 --- /dev/null +++ b/src/menu.c @@ -0,0 +1,35 @@ +#include + +#include "keyb.h" +#include "vga.h" +#include "text.h" +#include "data.h" + +uint8_t run_menu() +{ + blit_erase(0); + + put_text(124, 10, "HI 000000"); + + Rect dst = { 80, 45, 160, 38 }; + blit(binary_title_start, &dst); + + put_text(84, 110, "PRESS SPACE TO PLAY"); + + put_text(64, 140, "CODE, GRAPHICS AND MUSIC"); + put_text(96, 150, "JUAN J. MARTINEZ"); + + put_text(96, 180, "_2023 USEBOX.NET"); + + wait_vsync(); + blit_update(); + + while (1) + { + if (keys[KEY_ESC]) + return 0; + + if (keys[KEY_SPACE]) + return 1; + } +} -- cgit v1.2.3