diff options
author | Chuck Miller <shadowmil@gmail.com> | 2009-12-19 04:40:42 -0500 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2009-12-19 05:08:56 -0500 |
commit | cbc14c8a3c6614987d2331057e114d92336cbac0 (patch) | |
tree | a3693bd6ac6aca39a34a2d9a9f644873d63ecf32 /src/main.cpp | |
parent | 117cc13e863b788bfc8adef9468dba54c4909b9b (diff) | |
download | mana-cbc14c8a3c6614987d2331057e114d92336cbac0.tar.gz mana-cbc14c8a3c6614987d2331057e114d92336cbac0.tar.bz2 mana-cbc14c8a3c6614987d2331057e114d92336cbac0.tar.xz mana-cbc14c8a3c6614987d2331057e114d92336cbac0.zip |
Added support for resources.xml from update server... Also added option to download music optionally
I had to edit the XML wrapper a bit, basicilly its constructor can now take a optional
thrid arguement which will tell it to use a resman or open the file directly
Also I added fallback support for the old resouce2.txt so servers don't have to
upgrade if they do not want to
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/main.cpp b/src/main.cpp index 8caef783..cd5e7ba3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -627,27 +627,6 @@ static void parseOptions(int argc, char *argv[], Options &options) } } -/** - * Reads the file "{Updates Directory}/resources2.txt" and attempts to load - * each update mentioned in it. - */ -static void loadUpdates() -{ - if (updatesDir.empty()) return; - const std::string updatesFile = "/" + updatesDir + "/resources2.txt"; - ResourceManager *resman = ResourceManager::getInstance(); - std::vector<std::string> lines = resman->loadTextFile(updatesFile); - - for (unsigned int i = 0; i < lines.size(); ++i) - { - std::stringstream line(lines[i]); - std::string filename; - line >> filename; - resman->addToSearchPath(homeDir + "/" + updatesDir + "/" - + filename, false); - } -} - class AccountListener : public gcn::ActionListener { public: @@ -1041,11 +1020,7 @@ int main(int argc, char *argv[]) // we don't load any other files... if (options.dataPath.empty()) { - // Load the updates downloaded so far... - loadUpdates(); - - - // Also add customdata directory + // Add customdata directory ResourceManager::getInstance()->searchAndAddArchives( "customdata/", "zip", |