diff --git a/sc2/src/options.h b/sc2/src/options.h index 12f9fdf51..8aa6f38f2 100644 --- a/sc2/src/options.h +++ b/sc2/src/options.h @@ -23,6 +23,10 @@ #ifndef OPTIONS_H #define OPTIONS_H +#define UQM_MAJOR_VERSION 0 +#define UQM_MINOR_VERSION 1 +char UQM_VERSION_STRING[1000]; + enum { MUSIC_3DO, diff --git a/sc2/src/sc2code/libs/graphics/gfx_common.h b/sc2/src/sc2code/libs/graphics/gfx_common.h index 696280e6b..0e974c50d 100644 --- a/sc2/src/sc2code/libs/graphics/gfx_common.h +++ b/sc2/src/sc2code/libs/graphics/gfx_common.h @@ -28,8 +28,6 @@ #include "libs/vidlib.h" #include "libs/misc.h" -#define TFB_WINDOW_CAPTION "The Ur-Quan Masters" - // driver for TFB_InitGraphics enum { diff --git a/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c b/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c index 7a1668580..1e88d2a78 100644 --- a/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c +++ b/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c @@ -24,6 +24,7 @@ #include "rotozoom.h" #include "primitives.h" #include "dcqueue.h" +#include "options.h" #include "SDL_thread.h" SDL_Surface *SDL_Video; @@ -68,7 +69,7 @@ TFB_InitGraphics (int driver, int flags, int width, int height, int bpp) } SDL_EnableUNICODE (1); - SDL_WM_SetCaption (TFB_WINDOW_CAPTION, NULL); + SDL_WM_SetCaption (UQM_VERSION_STRING, NULL); if (flags & TFB_GFXFLAGS_SHOWFPS) ShowFPS = TRUE; diff --git a/sc2/src/starcon2.c b/sc2/src/starcon2.c index f285fa6c2..ee61683e0 100644 --- a/sc2/src/starcon2.c +++ b/sc2/src/starcon2.c @@ -79,6 +79,9 @@ main (int argc, char *argv[]) {0, 0, 0, 0} }; + sprintf (UQM_VERSION_STRING, "The Ur-Quan Masters v%d.%d (compiled %s %s)", UQM_MAJOR_VERSION, UQM_MINOR_VERSION, __DATE__, __TIME__); + fprintf (stderr, "%s\n", UQM_VERSION_STRING); + #ifndef WIN32 strcpy (contentdir, "content"); #else @@ -164,8 +167,7 @@ main (int argc, char *argv[]) printf ("\nOption %s not found!\n", long_options[option_index].name); case '?': case 'h': - printf("\nThe Ur-Quan Masters\n"); - printf("Options:\n"); + printf("\nOptions:\n"); printf(" -r, --res=WIDTHxHEIGHT (default 640x480, others work only with --opengl)\n"); printf(" -d, --bpp=BITSPERPIXEL (default 16)\n"); printf(" -f, --fullscreen (default off)\n");