fallout2-ce/src/version.cc

21 lines
536 B
C++
Raw Normal View History

2022-05-19 01:51:26 -07:00
#include "version.h"
2023-06-16 04:10:26 -07:00
#include "sfall_config.h"
2022-05-19 01:51:26 -07:00
#include <stdio.h>
2022-09-23 05:43:44 -07:00
namespace fallout {
2022-05-19 01:51:26 -07:00
// 0x4B4580
2022-12-08 12:05:50 -08:00
void versionGetVersion(char* dest, size_t size)
2022-05-19 01:51:26 -07:00
{
2023-06-16 04:10:26 -07:00
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);
2022-05-19 01:51:26 -07:00
}
2022-09-23 05:43:44 -07:00
} // namespace fallout