diff --git a/gfx/saracraft_logo1.png b/gfx/saracraft_logo1.png new file mode 100644 index 0000000..5e56cbb Binary files /dev/null and b/gfx/saracraft_logo1.png differ diff --git a/src/lephisto.c b/src/lephisto.c index 6606563..417b177 100644 --- a/src/lephisto.c +++ b/src/lephisto.c @@ -462,3 +462,15 @@ static void window_caption(void) { SDL_WM_SetCaption(tmp, NULL); } +static char human_version[50]; + +/** + * @brief Return the version in a human readable string. + */ +char* lephisto_version(void) { + if(human_version[0] == '\0') + snprintf(human_version, 50, " "APPNAME" v%s - %s", version, dataname); + + return human_version; +} + diff --git a/src/lephisto.h b/src/lephisto.h index 78d9396..78f7d6a 100644 --- a/src/lephisto.h +++ b/src/lephisto.h @@ -27,3 +27,5 @@ extern char dataname[DATA_NAME_LEN]; #define M_PI 3.14159265358979323846 /* Pi. */ #endif +char* lephisto_version(void); + diff --git a/src/menu.c b/src/menu.c index e6747fc..935c77d 100644 --- a/src/menu.c +++ b/src/menu.c @@ -66,6 +66,9 @@ static void menu_generic_close(char* str); void menu_main(void) { unsigned int bwid, wid; + glTexture* tex; + + tex = gl_newImage("../gfx/saracraft_logo1.png"); /* Create background image window. */ bwid = window_create("BG", -1, -1, SCREEN_W, SCREEN_H); @@ -73,6 +76,10 @@ void menu_main(void) { window_addCust(bwid, 0, 0, SCREEN_W, SCREEN_H, "cstBG", 0, (void(*)(double, double, double, double))nebu_render, NULL); + window_addImage(bwid, (SCREEN_W-tex->sw)/2., -1, "imgLogo", tex, 0); + window_addText(bwid, 0., 50., SCREEN_W, 30., 1, "txtBG", NULL, + &cWhite, lephisto_version()); + /* Create menu window. */ wid = window_create("Main Menu", -1, -1, MAIN_WIDTH, MAIN_HEIGHT); window_addButton(wid, 20, 20 + (BUTTON_HEIGHT+20)*3,