From 4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 4 Jan 2007 02:20:38 +0000 Subject: Merged 0.0 changes from revision 2898 to 2988 to trunk. --- src/main.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 90368b7d..8163cde3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -309,11 +309,6 @@ void init_engine() errorMessage = err; logger->log("Warning: %s", err); } - - // Load XML databases - EquipmentDB::load(); - ItemDB::load(); - MonsterDB::load(); } /** Clear the engine */ @@ -411,19 +406,22 @@ void parseOptions(int argc, char *argv[], Options &options) } /** - * Reads the file "updates/resources.txt" and attempts to load each update + * Reads the file "updates/resources2.txt" and attempts to load each update * mentioned in it. */ void loadUpdates() { - const std::string updatesFile = "updates/resources.txt"; + const std::string updatesFile = "updates/resources2.txt"; ResourceManager *resman = ResourceManager::getInstance(); std::vector lines = resman->loadTextFile(updatesFile); std::string homeDir = config.getValue("homeDir", ""); for (unsigned int i = 0; i < lines.size(); ++i) { - resman->addToSearchPath(homeDir + "/updates/" + lines[i], false); + std::stringstream line(lines[i]); + std::string filename; + line >> filename; + resman->addToSearchPath(homeDir + "/updates/" + filename, false); } } @@ -687,6 +685,12 @@ int main(int argc, char *argv[]) case STATE_LOGIN: logger->log("State: LOGIN"); + + // Load XML databases + EquipmentDB::load(); + ItemDB::load(); + MonsterDB::load(); + currentDialog = new LoginDialog(&loginData); // TODO: Restore autologin //if (!loginData.password.empty()) { -- cgit v1.2.3-70-g09d2