VERSION_MINOR(version),
VERSION_PATCH(version));
+ if (!VERSION_STABLE(version))
+ {
+ if (VERSION_EXTRA(version))
+ sprintf(&version_string[strlen(version_string)], "-%s-%d",
+ PROGRAM_VERSION_EXTRA_TEXT, VERSION_EXTRA(version));
+ else if (VERSION_BUILD(version))
+ sprintf(&version_string[strlen(version_string)], "-%s-%d",
+ PROGRAM_VERSION_BUILD_TEXT, VERSION_BUILD(version));
+ }
+
return version_string;
}
char *getProgramRealVersionString(void)
{
- static char program_version_string[32];
-
- sprintf(program_version_string, "%d.%d.%d.%d%s",
- PROGRAM_VERSION_SUPER, PROGRAM_VERSION_MAJOR, PROGRAM_VERSION_MINOR,
- PROGRAM_VERSION_PATCH, PROGRAM_VERSION_EXTRA);
-
- return program_version_string;
+ return getVersionString(GAME_VERSION_ACTUAL);
}
char *getProgramVersionString(void)
#define PROGRAM_VERSION_MAJOR 4
#define PROGRAM_VERSION_MINOR 0
#define PROGRAM_VERSION_PATCH 0
-#define PROGRAM_VERSION_EXTRA "-test-3"
+
+#define PROGRAM_VERSION_STABLE 0
+#define PROGRAM_VERSION_EXTRA 3
+#define PROGRAM_VERSION_BUILD 0
+#define PROGRAM_VERSION_EXTRA_TEXT "test"
+#define PROGRAM_VERSION_BUILD_TEXT "build"
#define PROGRAM_TITLE_STRING "Rocks'n'Diamonds"
#define PROGRAM_AUTHOR_STRING "Holger Schemel"
#define GAME_VERSION_2_0 FILE_VERSION_2_0
#define GAME_VERSION_3_0 FILE_VERSION_3_0
-#define GAME_VERSION_ACTUAL VERSION_IDENT(PROGRAM_VERSION_SUPER, \
- PROGRAM_VERSION_MAJOR, \
- PROGRAM_VERSION_MINOR, \
- PROGRAM_VERSION_PATCH)
+#define GAME_VERSION_ACTUAL VERSION_IDENT_FULL(PROGRAM_VERSION_SUPER, \
+ PROGRAM_VERSION_MAJOR, \
+ PROGRAM_VERSION_MINOR, \
+ PROGRAM_VERSION_PATCH, \
+ PROGRAM_VERSION_STABLE, \
+ PROGRAM_VERSION_EXTRA, \
+ PROGRAM_VERSION_BUILD)
// values for game_emulation
#define EMU_NONE 0