From e075ba972c655d6da855984180784ff5ad2a48a5 Mon Sep 17 00:00:00 2001 From: KikooDX Date: Mon, 19 Apr 2021 01:30:10 +0200 Subject: [PATCH] Add more informations to titlescreen --- include/conf.h | 2 ++ src/main.c | 2 +- src/titlescreen/draw.c | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/conf.h b/include/conf.h index 1682c8a..676b195 100644 --- a/include/conf.h +++ b/include/conf.h @@ -2,6 +2,8 @@ /* Copyright (C) 2021 KikooDX */ #pragma once +#define GAME_NAME "MTEM" +#define VERSION "3.50" #define TILE_WIDTH 16 #define TILE_HEIGHT 16 #define TILESET_WIDTH 16 diff --git a/src/main.c b/src/main.c index a16f5a7..f99ba01 100644 --- a/src/main.c +++ b/src/main.c @@ -49,7 +49,7 @@ int main(void) int player_return_code; int level_pack_beaten; enum TransitionMode transition_previous_mode; - enum GameState game_state = Playing; + enum GameState game_state = TitleScreen; volatile int has_ticked = 1; struct TitleScreen titlescreen = titlescreen_init(); diff --git a/src/titlescreen/draw.c b/src/titlescreen/draw.c index 662fafa..d0ae8db 100644 --- a/src/titlescreen/draw.c +++ b/src/titlescreen/draw.c @@ -2,10 +2,15 @@ /* Copyright (C) 2021 KikooDX */ #include "titlescreen.h" +#include "conf.h" #include void titlescreen_draw(struct TitleScreen titlescreen) { + dprint_opt(DWIDTH / 2, DHEIGHT * 1 / 3, C_WHITE, C_NONE, + DTEXT_CENTER, DTEXT_MIDDLE, GAME_NAME); dprint_opt(DWIDTH / 2, DHEIGHT * 2 / 3, C_WHITE, C_NONE, - DTEXT_CENTER, DTEXT_MIDDLE, "PRESS SHIFT"); + DTEXT_CENTER, DTEXT_MIDDLE, "Press Shift"); + dprint_opt(DWIDTH / 2, DHEIGHT - 2, C_WHITE, C_NONE, + DTEXT_CENTER, DTEXT_BOTTOM, "Game by KikooDX (2021) - " VERSION); }