1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back! *
3 *----------------------------------------------------------*
4 * (c) 1995-2006 Artsoft Entertainment *
6 * Detmolder Strasse 189 *
9 * e-mail: info@artsoft.org *
10 *----------------------------------------------------------*
12 ***********************************************************/
14 #include "libgame/libgame.h"
20 char *getCompileDateString()
22 return COMPILE_DATE_STRING;
25 char *getProgramReleaseVersionString()
27 static char program_version_string[32];
29 sprintf(program_version_string, "%d.%d.%d",
30 PROGRAM_VERSION_MAJOR, PROGRAM_VERSION_MINOR, PROGRAM_VERSION_PATCH);
32 return program_version_string;
35 char *getProgramFullVersionString()
37 static char program_version_string[32];
39 sprintf(program_version_string, "%d.%d.%d-%d",
40 PROGRAM_VERSION_MAJOR, PROGRAM_VERSION_MINOR, PROGRAM_VERSION_PATCH,
41 PROGRAM_VERSION_BUILD);
43 return program_version_string;
46 char *getProgramVersionString()
49 return getProgramFullVersionString();
51 return getProgramReleaseVersionString();
55 char *getProgramInitString()
57 static char *program_init_string = NULL;
59 if (program_init_string == NULL)
61 program_init_string = checked_malloc(strlen(PROGRAM_TITLE_STRING) + 1 +
62 strlen(getProgramVersionString()) +1 +
63 strlen(TARGET_STRING) + 1);
65 sprintf(program_init_string, "%s %s %s",
66 PROGRAM_TITLE_STRING, getProgramVersionString(), TARGET_STRING);
69 return program_init_string;
72 char *getWindowTitleString()
75 static char *window_title_string = NULL;
77 if (window_title_string == NULL)
79 window_title_string = checked_malloc(strlen(getProgramInitString()) + 1 +
80 strlen(getCompileDateString()) + 2 +1);
82 sprintf(window_title_string, "%s [%s]",
83 getProgramInitString(), getCompileDateString());
86 return window_title_string;
88 return getProgramInitString();