mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Removed no longer used code
This commit is contained in:
parent
55bd164f1c
commit
ef5686634d
@ -205,7 +205,7 @@ int main(int argc, char * argv[])
|
||||
logGlobal->info("The log file will be saved to %s", logPath);
|
||||
|
||||
// Init filesystem and settings
|
||||
preinitDLL(::console);
|
||||
preinitDLL(::console, false);
|
||||
|
||||
Settings session = settings.write["session"];
|
||||
auto setSettingBool = [](std::string key, std::string arg) {
|
||||
|
@ -47,14 +47,14 @@ VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
LibClasses * VLC = nullptr;
|
||||
|
||||
DLL_LINKAGE void preinitDLL(CConsoleHandler * Console, bool onlyEssential, bool extractArchives)
|
||||
DLL_LINKAGE void preinitDLL(CConsoleHandler * Console, bool extractArchives)
|
||||
{
|
||||
console = Console;
|
||||
VLC = new LibClasses();
|
||||
VLC->loadFilesystem(extractArchives);
|
||||
settings.init("config/settings.json", "vcmi:settings");
|
||||
persistentStorage.init("config/persistentStorage.json", "");
|
||||
VLC->loadModFilesystem(onlyEssential);
|
||||
VLC->loadModFilesystem();
|
||||
|
||||
}
|
||||
|
||||
@ -182,12 +182,12 @@ void LibClasses::loadFilesystem(bool extractArchives)
|
||||
logGlobal->info("\tData loading: %d ms", loadTime.getDiff());
|
||||
}
|
||||
|
||||
void LibClasses::loadModFilesystem(bool onlyEssential)
|
||||
void LibClasses::loadModFilesystem()
|
||||
{
|
||||
CStopWatch loadTime;
|
||||
modh = new CModHandler();
|
||||
identifiersHandler = new CIdentifierStorage();
|
||||
modh->loadMods(onlyEssential);
|
||||
modh->loadMods();
|
||||
logGlobal->info("\tMod handler: %d ms", loadTime.getDiff());
|
||||
|
||||
modh->loadModFilesystems();
|
||||
|
@ -115,7 +115,7 @@ public:
|
||||
|
||||
// basic initialization. should be called before init(). Can also extract original H3 archives
|
||||
void loadFilesystem(bool extractArchives);
|
||||
void loadModFilesystem(bool onlyEssential);
|
||||
void loadModFilesystem();
|
||||
|
||||
#if SCRIPTING_ENABLED
|
||||
void scriptsLoaded();
|
||||
@ -124,7 +124,7 @@ public:
|
||||
|
||||
extern DLL_LINKAGE LibClasses * VLC;
|
||||
|
||||
DLL_LINKAGE void preinitDLL(CConsoleHandler * Console, bool onlyEssential = false, bool extractArchives = false);
|
||||
DLL_LINKAGE void preinitDLL(CConsoleHandler * Console, bool extractArchives);
|
||||
DLL_LINKAGE void loadDLLClasses(bool onlyEssential = false);
|
||||
|
||||
|
||||
|
@ -237,19 +237,12 @@ void CModHandler::loadOneMod(std::string modName, const std::string & parent, co
|
||||
}
|
||||
}
|
||||
|
||||
void CModHandler::loadMods(bool onlyEssential)
|
||||
void CModHandler::loadMods()
|
||||
{
|
||||
JsonNode modConfig;
|
||||
|
||||
if(onlyEssential)
|
||||
{
|
||||
loadOneMod("vcmi", "", modConfig, true);//only vcmi and submods
|
||||
}
|
||||
else
|
||||
{
|
||||
modConfig = loadModSettings(JsonPath::builtin("config/modSettings.json"));
|
||||
loadMods("", "", modConfig["activeMods"], true);
|
||||
}
|
||||
modConfig = loadModSettings(JsonPath::builtin("config/modSettings.json"));
|
||||
loadMods("", "", modConfig["activeMods"], true);
|
||||
|
||||
coreMod = std::make_unique<CModInfo>(ModScope::scopeBuiltin(), modConfig[ModScope::scopeBuiltin()], JsonNode(JsonPath::builtin("config/gameConfig.json")));
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
|
||||
/// receives list of available mods and trying to load mod.json from all of them
|
||||
void initializeConfig();
|
||||
void loadMods(bool onlyEssential = false);
|
||||
void loadMods();
|
||||
void loadModFilesystems();
|
||||
|
||||
/// returns ID of mod that provides selected file resource
|
||||
|
@ -177,7 +177,7 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||
logGlobal->info("The log file will be saved to %s", logPath);
|
||||
|
||||
//init
|
||||
preinitDLL(::console, false, extractionOptions.extractArchives);
|
||||
preinitDLL(::console, extractionOptions.extractArchives);
|
||||
|
||||
// Initialize logging based on settings
|
||||
logConfig->configure();
|
||||
|
@ -1172,7 +1172,7 @@ int main(int argc, const char * argv[])
|
||||
|
||||
boost::program_options::variables_map opts;
|
||||
handleCommandOptions(argc, argv, opts);
|
||||
preinitDLL(console);
|
||||
preinitDLL(console, false);
|
||||
logConfig.configure();
|
||||
|
||||
loadDLLClasses();
|
||||
|
Loading…
Reference in New Issue
Block a user