This commit is contained in:
KikooDX 2021-05-28 17:43:16 +02:00
parent b0879e9e03
commit 76dab0fa82
4 changed files with 13 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -70,7 +70,7 @@ main(void)
int frameskip = 0;
/* int level_pack_beaten; */
enum TransitionMode transition_previous_mode;
enum GameState game_state = TitleScreen;
enum GameState game_state = MainMenu;
volatile int has_ticked = 1;
struct Player player;

View File

@ -6,16 +6,27 @@
#include "zxcolors.h"
#include <gint/display.h>
extern const font_t font_main;
extern const font_t font_big;
void
mainmenu_draw(struct MainMenu mainmenu)
{
int i = MENU_ENTRIES;
dfont(&font_big);
dprint_opt(DWIDTH / 2, DHEIGHT * 1 / 3, ZX_WHITE, C_NONE, DTEXT_CENTER,
DTEXT_MIDDLE, GAME_NAME);
dfont(&font_main);
dprint_opt(DWIDTH / 2, DHEIGHT - 2, ZX_WHITE, C_NONE, DTEXT_CENTER,
DTEXT_BOTTOM, "Game by KikooDX (2021) - " VERSION);
while (i-- > 0) {
const int selected = mainmenu.cursor == i;
const color_t foreground_color = selected ? ZX_WHITE : ZX_GRAY;
const color_t background_color =
selected ? ZX_DARK_BLUE : ZX_BLACK;
dprint_opt(DWIDTH / 2, DHEIGHT / 2 + 16 + i * 16,
dprint_opt(DWIDTH / 2, DHEIGHT / 5 * 3 + 16 + i * 16,
foreground_color, background_color, DTEXT_CENTER,
DTEXT_MIDDLE, menu_entries[i], selected ? '[' : ' ',
selected ? ']' : ' ');

View File

@ -9,10 +9,4 @@
void
titlescreen_draw(struct TitleScreen titlescreen)
{
dprint_opt(DWIDTH / 2, DHEIGHT * 1 / 3, ZX_WHITE, C_NONE, DTEXT_CENTER,
DTEXT_MIDDLE, GAME_NAME);
dprint_opt(DWIDTH / 2, DHEIGHT * 2 / 3, ZX_WHITE, C_NONE, DTEXT_CENTER,
DTEXT_MIDDLE, "Press Shift");
dprint_opt(DWIDTH / 2, DHEIGHT - 2, ZX_WHITE, C_NONE, DTEXT_CENTER,
DTEXT_BOTTOM, "Game by KikooDX (2021) - " VERSION);
}