aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index fad1315..ce1505d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -41,6 +41,7 @@ int main(int argc, char *argv[])
{
static bool worldReset = false, worldDontReallyRun = false;
std::string worldActuallyUseThisXMLFile;
+ std::string worldActuallyUseThisXMLFolder;
// handle command line args
if (argc > 1) {
@@ -53,6 +54,8 @@ int main(int argc, char *argv[])
worldDontReallyRun = true;
else if (s == "--xml" || s == "-x")
worldActuallyUseThisXMLFile = argv[i + 1];
+ else if (s == "--folder" || s == "-f")
+ worldActuallyUseThisXMLFolder = argv[i + 1];
}
}
@@ -69,6 +72,9 @@ int main(int argc, char *argv[])
game::briceLoad();
game::briceUpdate();
+ if (!worldActuallyUseThisXMLFolder.empty())
+ game::config::xmlFolder = worldActuallyUseThisXMLFolder;
+
// read in all XML file names in the folder
std::list<std::string> xmlFiles;
if (getdir(std::string("./" + game::config::xmlFolder), xmlFiles))