aboutsummaryrefslogtreecommitdiff
path: root/src/menu.c
blob: c95416f56c752f4da03fa30e2947485c9707dda6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 SOUND");
    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;
    }
}