summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-01-04 02:20:38 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-01-04 02:20:38 +0000
commit4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac (patch)
tree0b18ed6970f8fdd6750459e6f9032e444d253580 /src/main.cpp
parente160ba567bf3d2ae915e67c12c13e213c1a32a62 (diff)
downloadmana-client-4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac.tar.gz
mana-client-4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac.tar.bz2
mana-client-4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac.tar.xz
mana-client-4eec29ac0f6a9b05562ac0fbe3d4e5d7e82deeac.zip
Merged 0.0 changes from revision 2898 to 2988 to trunk.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp20
1 files changed, 12 insertions, 8 deletions
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<std::string> 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()) {