diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-06-20 23:08:22 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-06-20 23:08:22 +0100 |
commit | b4dd0c8956f1c81836e4f3020efe2f85b3d91902 (patch) | |
tree | 658f08795c5774df8e0ee646e5212ffa82e09ba3 /src/menu.c | |
parent | d489b6ef92ae9f61bbceb5f594026a51e71538f2 (diff) | |
download | gold-mine-run-b4dd0c8956f1c81836e4f3020efe2f85b3d91902.tar.gz gold-mine-run-b4dd0c8956f1c81836e4f3020efe2f85b3d91902.zip |
Add menu screen (WIP)
Diffstat (limited to 'src/menu.c')
-rw-r--r-- | src/menu.c | 35 |
1 files changed, 35 insertions, 0 deletions
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 <stdint.h> + +#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; + } +} |