1 // ============================================================================
2 // Rocks'n'Diamonds - McDuffin Strikes Back!
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
7 // https://www.artsoft.org/
8 // ----------------------------------------------------------------------------
10 // ============================================================================
12 #include "libgame/libgame.h"
19 char *getSourceDateString(void)
21 return SOURCE_DATE_STRING;
24 char *getSourceHashString(void)
26 return SOURCE_HASH_STRING;
29 char *getProgramTitleString(void)
31 return program.program_title;
34 char *getProgramRealVersionString(void)
36 static char program_version_string[32];
38 sprintf(program_version_string, "%d.%d.%d.%d%s",
39 PROGRAM_VERSION_SUPER, PROGRAM_VERSION_MAJOR, PROGRAM_VERSION_MINOR,
40 PROGRAM_VERSION_PATCH, PROGRAM_VERSION_EXTRA);
42 return program_version_string;
45 char *getProgramVersionString(void)
47 return program.version_string;
50 char *getProgramInitString(void)
52 static char *program_init_string = NULL;
54 if (program_init_string == NULL)
56 program_init_string = checked_malloc(strlen(getProgramTitleString()) + 1 +
57 strlen(getProgramVersionString()) + 1);
59 sprintf(program_init_string, "%s %s",
60 getProgramTitleString(), getProgramVersionString());
63 return program_init_string;
66 char *getConfigProgramTitleString(void)
68 TreeInfo *graphics_current =
69 getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS);
71 return (leveldir_current->program_title ?
72 leveldir_current->program_title :
73 graphics_current->program_title ?
74 graphics_current->program_title :
75 setup.internal.program_title);
78 char *getConfigProgramCopyrightString(void)
80 TreeInfo *graphics_current =
81 getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS);
83 return (leveldir_current->program_copyright ?
84 leveldir_current->program_copyright :
85 graphics_current->program_copyright ?
86 graphics_current->program_copyright :
87 setup.internal.program_copyright);
90 char *getConfigProgramCompanyString(void)
92 TreeInfo *graphics_current =
93 getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS);
95 return (leveldir_current->program_company ?
96 leveldir_current->program_company :
97 graphics_current->program_company ?
98 graphics_current->program_company :
99 setup.internal.program_company);
102 char *getWindowTitleString(void)
104 static char *window_title_string = NULL;
106 checked_free(window_title_string);
109 window_title_string = checked_malloc(strlen(getProgramInitString()) + 20 +
110 strlen(getSourceDateString()) + 2 + 1);
112 if (setup.internal.show_scaling_in_title)
113 sprintf(window_title_string, "%s (%d %%) [%s]",
114 getProgramInitString(), video.window_scaling_percent,
115 getSourceDateString());
117 sprintf(window_title_string, "%s [%s]",
118 getProgramInitString(),
119 getSourceDateString());
121 window_title_string = checked_malloc(strlen(getProgramInitString()) + 20);
123 if (setup.internal.show_scaling_in_title)
124 sprintf(window_title_string, "%s (%d %%)",
125 getProgramInitString(), video.window_scaling_percent);
127 sprintf(window_title_string, "%s",
128 getProgramInitString());
131 return window_title_string;