Normalize and resolve asset bundle paths
This commit is contained in:
parent
2c7ab7f5c8
commit
ec0685ea19
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace fallout {
|
namespace fallout {
|
||||||
|
|
||||||
|
static void gameConfigResolvePath(const char* section, const char* key);
|
||||||
|
|
||||||
// A flag indicating if [gGameConfig] was initialized.
|
// A flag indicating if [gGameConfig] was initialized.
|
||||||
//
|
//
|
||||||
// 0x5186D0
|
// 0x5186D0
|
||||||
|
@ -181,6 +183,15 @@ bool gameConfigInit(bool isMapper, int argc, char** argv)
|
||||||
// whatever was loaded from `fallout2.cfg`.
|
// whatever was loaded from `fallout2.cfg`.
|
||||||
configParseCommandLineArguments(&gGameConfig, argc, argv);
|
configParseCommandLineArguments(&gGameConfig, argc, argv);
|
||||||
|
|
||||||
|
// CE: Normalize and resolve asset bundle paths.
|
||||||
|
gameConfigResolvePath(GAME_CONFIG_SYSTEM_KEY, GAME_CONFIG_MASTER_DAT_KEY);
|
||||||
|
gameConfigResolvePath(GAME_CONFIG_SYSTEM_KEY, GAME_CONFIG_MASTER_PATCHES_KEY);
|
||||||
|
gameConfigResolvePath(GAME_CONFIG_SYSTEM_KEY, GAME_CONFIG_CRITTER_DAT_KEY);
|
||||||
|
gameConfigResolvePath(GAME_CONFIG_SYSTEM_KEY, GAME_CONFIG_CRITTER_PATCHES_KEY);
|
||||||
|
gameConfigResolvePath(GAME_CONFIG_SYSTEM_KEY, GAME_CONFIG_CRITTER_PATCHES_KEY);
|
||||||
|
gameConfigResolvePath(GAME_CONFIG_SOUND_KEY, GAME_CONFIG_MUSIC_PATH1_KEY);
|
||||||
|
gameConfigResolvePath(GAME_CONFIG_SOUND_KEY, GAME_CONFIG_MUSIC_PATH2_KEY);
|
||||||
|
|
||||||
gGameConfigInitialized = true;
|
gGameConfigInitialized = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -226,4 +237,12 @@ bool gameConfigExit(bool shouldSave)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void gameConfigResolvePath(const char* section, const char* key)
|
||||||
|
{
|
||||||
|
char* path;
|
||||||
|
configGetString(&gGameConfig, section, key, &path);
|
||||||
|
compat_windows_path_to_native(path);
|
||||||
|
compat_resolve_path(path);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace fallout
|
} // namespace fallout
|
||||||
|
|
Loading…
Reference in New Issue