add sfall version string
This commit is contained in:
parent
fe035d8514
commit
7fee1da7d8
|
@ -58,6 +58,7 @@ bool sfallConfigInit(int argc, char** argv)
|
|||
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MOVIE_TIMER_ARTIMER3, 270);
|
||||
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MOVIE_TIMER_ARTIMER4, 360);
|
||||
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_AUTO_QUICK_SAVE, 0);
|
||||
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_VERSION_STRING, "");
|
||||
|
||||
configSetString(&gSfallConfig, SFALL_CONFIG_SCRIPTS_KEY, SFALL_CONFIG_INI_CONFIG_FOLDER, "");
|
||||
configSetString(&gSfallConfig, SFALL_CONFIG_SCRIPTS_KEY, SFALL_CONFIG_GLOBAL_SCRIPT_PATHS, "");
|
||||
|
|
|
@ -72,6 +72,7 @@ namespace fallout {
|
|||
#define SFALL_CONFIG_INI_CONFIG_FOLDER "IniConfigFolder"
|
||||
#define SFALL_CONFIG_GLOBAL_SCRIPT_PATHS "GlobalScriptPaths"
|
||||
#define SFALL_CONFIG_AUTO_QUICK_SAVE "AutoQuickSave"
|
||||
#define SFALL_CONFIG_VERSION_STRING "VersionString"
|
||||
|
||||
#define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_MULTIPLIER 1
|
||||
#define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_DIVISOR 3
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "version.h"
|
||||
#include "sfall_config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -7,7 +8,13 @@ namespace fallout {
|
|||
// 0x4B4580
|
||||
void versionGetVersion(char* dest, size_t size)
|
||||
{
|
||||
snprintf(dest, size, "FALLOUT II %d.%02d", VERSION_MAJOR, VERSION_MINOR);
|
||||
char* versionString = nullptr;
|
||||
if (configGetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_VERSION_STRING, &versionString)) {
|
||||
if (*versionString == '\0') {
|
||||
versionString = nullptr;
|
||||
}
|
||||
}
|
||||
snprintf(dest, size, (versionString != nullptr ? versionString : "FALLOUT II %d.%02d"), VERSION_MAJOR, VERSION_MINOR);
|
||||
}
|
||||
|
||||
} // namespace fallout
|
||||
|
|
Loading…
Reference in New Issue