Merge e119aa4c4d
into 9fb917c357
This commit is contained in:
commit
4b56f22f1b
|
@ -61,6 +61,7 @@ bool sfallConfigInit(int argc, char** argv)
|
||||||
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_VERSION_STRING, "");
|
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_VERSION_STRING, "");
|
||||||
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_CONFIG_FILE, "");
|
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_CONFIG_FILE, "");
|
||||||
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_PATCH_FILE, "");
|
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_PATCH_FILE, "");
|
||||||
|
configSetBool(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_CITIES_LIMIT_FIX, true);
|
||||||
|
|
||||||
configSetString(&gSfallConfig, SFALL_CONFIG_SCRIPTS_KEY, SFALL_CONFIG_INI_CONFIG_FOLDER, "");
|
configSetString(&gSfallConfig, SFALL_CONFIG_SCRIPTS_KEY, SFALL_CONFIG_INI_CONFIG_FOLDER, "");
|
||||||
configSetString(&gSfallConfig, SFALL_CONFIG_SCRIPTS_KEY, SFALL_CONFIG_GLOBAL_SCRIPT_PATHS, "");
|
configSetString(&gSfallConfig, SFALL_CONFIG_SCRIPTS_KEY, SFALL_CONFIG_GLOBAL_SCRIPT_PATHS, "");
|
||||||
|
|
|
@ -75,6 +75,7 @@ namespace fallout {
|
||||||
#define SFALL_CONFIG_VERSION_STRING "VersionString"
|
#define SFALL_CONFIG_VERSION_STRING "VersionString"
|
||||||
#define SFALL_CONFIG_CONFIG_FILE "ConfigFile"
|
#define SFALL_CONFIG_CONFIG_FILE "ConfigFile"
|
||||||
#define SFALL_CONFIG_PATCH_FILE "PatchFile"
|
#define SFALL_CONFIG_PATCH_FILE "PatchFile"
|
||||||
|
#define SFALL_CONFIG_CITIES_LIMIT_FIX "CitiesLimitFix"
|
||||||
|
|
||||||
#define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_MULTIPLIER 1
|
#define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_MULTIPLIER 1
|
||||||
#define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_DIVISOR 3
|
#define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_DIVISOR 3
|
||||||
|
|
|
@ -813,6 +813,7 @@ static int wmMaxEncBaseTypes;
|
||||||
static int wmMaxEncounterInfoTables;
|
static int wmMaxEncounterInfoTables;
|
||||||
|
|
||||||
static bool gTownMapHotkeysFix;
|
static bool gTownMapHotkeysFix;
|
||||||
|
static bool gCitiesLimitFix;
|
||||||
static double gGameTimeIncRemainder = 0.0;
|
static double gGameTimeIncRemainder = 0.0;
|
||||||
static FrmImage _backgroundFrmImage;
|
static FrmImage _backgroundFrmImage;
|
||||||
static FrmImage _townFrmImage;
|
static FrmImage _townFrmImage;
|
||||||
|
@ -838,6 +839,12 @@ static void wmSetFlags(int* flagsPtr, int flag, int value)
|
||||||
// 0x4BC89C
|
// 0x4BC89C
|
||||||
int wmWorldMap_init()
|
int wmWorldMap_init()
|
||||||
{
|
{
|
||||||
|
// SFALL
|
||||||
|
gTownMapHotkeysFix = true;
|
||||||
|
configGetBool(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_TOWN_MAP_HOTKEYS_FIX_KEY, &gTownMapHotkeysFix);
|
||||||
|
gCitiesLimitFix = true;
|
||||||
|
configGetBool(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_CITIES_LIMIT_FIX, &gCitiesLimitFix);
|
||||||
|
|
||||||
char path[COMPAT_MAX_PATH];
|
char path[COMPAT_MAX_PATH];
|
||||||
|
|
||||||
if (wmGenDataInit() == -1) {
|
if (wmGenDataInit() == -1) {
|
||||||
|
@ -865,10 +872,6 @@ int wmWorldMap_init()
|
||||||
wmMarkSubTileRadiusVisited(wmGenData.worldPosX, wmGenData.worldPosY);
|
wmMarkSubTileRadiusVisited(wmGenData.worldPosX, wmGenData.worldPosY);
|
||||||
wmWorldMapSaveTempData();
|
wmWorldMapSaveTempData();
|
||||||
|
|
||||||
// SFALL
|
|
||||||
gTownMapHotkeysFix = true;
|
|
||||||
configGetBool(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_TOWN_MAP_HOTKEYS_FIX_KEY, &gTownMapHotkeysFix);
|
|
||||||
|
|
||||||
// CE: City size fids should be initialized during startup. They are used
|
// CE: City size fids should be initialized during startup. They are used
|
||||||
// during |wmTeleportToArea| to calculate worldmap position when jumping
|
// during |wmTeleportToArea| to calculate worldmap position when jumping
|
||||||
// from Temple to Arroyo - before giving a chance to |wmInterfaceInit| to
|
// from Temple to Arroyo - before giving a chance to |wmInterfaceInit| to
|
||||||
|
@ -1158,6 +1161,13 @@ int wmWorldMap_load(File* stream)
|
||||||
int numCities;
|
int numCities;
|
||||||
if (fileReadInt32(stream, &numCities) == -1) return -1;
|
if (fileReadInt32(stream, &numCities) == -1) return -1;
|
||||||
|
|
||||||
|
if (gCitiesLimitFix && numCities != wmMaxAreaNum) {
|
||||||
|
debugPrint("WorldMap Error: Cities limit fix is enabled, "
|
||||||
|
"but the number of cities in the save file is different from "
|
||||||
|
"the number of cities in the worldmap.txt file.");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
for (int areaIdx = 0; areaIdx < numCities; areaIdx++) {
|
for (int areaIdx = 0; areaIdx < numCities; areaIdx++) {
|
||||||
CityInfo* city = &(wmAreaInfoList[areaIdx]);
|
CityInfo* city = &(wmAreaInfoList[areaIdx]);
|
||||||
|
|
||||||
|
@ -2530,7 +2540,7 @@ static int wmAreaInit()
|
||||||
|
|
||||||
configFree(&cfg);
|
configFree(&cfg);
|
||||||
|
|
||||||
if (wmMaxAreaNum != CITY_COUNT) {
|
if (!gCitiesLimitFix && wmMaxAreaNum != CITY_COUNT) {
|
||||||
showMesageBox("\nwmAreaInit::Error loading Cities!");
|
showMesageBox("\nwmAreaInit::Error loading Cities!");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue