1 // ============================================================================
2 // Rocks'n'Diamonds - McDuffin Strikes Back!
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
7 // http://www.artsoft.org/
8 // ----------------------------------------------------------------------------
10 // ============================================================================
12 #include "libgame/libgame.h"
18 char *getSourceDateString(void)
20 return SOURCE_DATE_STRING;
23 char *getProgramTitleString(void)
25 return program.program_title;
28 char *getProgramRealVersionString(void)
30 static char program_version_string[32];
32 sprintf(program_version_string, "%d.%d.%d.%d%s",
33 PROGRAM_VERSION_SUPER, PROGRAM_VERSION_MAJOR, PROGRAM_VERSION_MINOR,
34 PROGRAM_VERSION_PATCH, PROGRAM_VERSION_EXTRA);
36 return program_version_string;
39 char *getProgramVersionString(void)
41 return program.version_string;
44 char *getProgramInitString(void)
46 static char *program_init_string = NULL;
48 if (program_init_string == NULL)
50 program_init_string = checked_malloc(strlen(getProgramTitleString()) + 1 +
51 strlen(getProgramVersionString()) + 1);
53 sprintf(program_init_string, "%s %s",
54 getProgramTitleString(), getProgramVersionString());
57 return program_init_string;
60 char *getConfigProgramTitleString(void)
62 TreeInfo *graphics_current =
63 getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS);
65 return (leveldir_current->program_title ?
66 leveldir_current->program_title :
67 graphics_current->program_title ?
68 graphics_current->program_title :
69 setup.internal.program_title);
72 char *getConfigProgramCopyrightString(void)
74 TreeInfo *graphics_current =
75 getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS);
77 return (leveldir_current->program_copyright ?
78 leveldir_current->program_copyright :
79 graphics_current->program_copyright ?
80 graphics_current->program_copyright :
81 setup.internal.program_copyright);
84 char *getConfigProgramCompanyString(void)
86 TreeInfo *graphics_current =
87 getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS);
89 return (leveldir_current->program_company ?
90 leveldir_current->program_company :
91 graphics_current->program_company ?
92 graphics_current->program_company :
93 setup.internal.program_company);
96 char *getWindowTitleString(void)
98 static char *window_title_string = NULL;
100 checked_free(window_title_string);
103 window_title_string = checked_malloc(strlen(getProgramInitString()) + 20 +
104 strlen(getSourceDateString()) + 2 + 1);
106 if (setup.internal.show_scaling_in_title)
107 sprintf(window_title_string, "%s (%d %%) [%s]",
108 getProgramInitString(), video.window_scaling_percent,
109 getSourceDateString());
111 sprintf(window_title_string, "%s [%s]",
112 getProgramInitString(),
113 getSourceDateString());
115 window_title_string = checked_malloc(strlen(getProgramInitString()) + 20);
117 if (setup.internal.show_scaling_in_title)
118 sprintf(window_title_string, "%s (%d %%)",
119 getProgramInitString(), video.window_scaling_percent);
121 sprintf(window_title_string, "%s",
122 getProgramInitString());
125 return window_title_string;