diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2016-04-04 07:32:15 -0400 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2016-04-04 07:32:15 -0400 |
commit | a45daeda3633bdf25267a0186b39618269dca970 (patch) | |
tree | dea5bfdbadadc6d7cbd51fb0c760e5a5760959fb /src/gameplay.cpp | |
parent | ba627aebb20e19b800133abe24fb7d9e650055c3 (diff) |
XML folder changing
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r-- | src/gameplay.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp index f398ca0..4aa751f 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -13,6 +13,8 @@ extern Menu *currentMenu; extern Menu pauseMenu; extern Menu optionsMenu; +extern std::string xmlFolder; + extern void mainLoop(void); // main.cpp extern std::vector<NPC *> AIpreaddr; // entities.cpp @@ -209,8 +211,7 @@ CONT: return 0; } -void commonPageFunc( Mob *callee ) -{ +void commonPageFunc( Mob *callee ){ static bool lock = false; if ( !lock ) { @@ -272,16 +273,21 @@ void initEverything(void){ * Read the XML directory into an array. */ - if(getdir("./xml/",xmlFiles)){ + C("Scanning XML directory"); + if(getdir(std::string("./"+xmlFolder).c_str(),xmlFiles)){ std::cout<<"Error reading XML files!!!1"<<std::endl; abort(); } + C("Done scanning XML directory"); /* * Sort the files alphabetically. */ + C("Sorting XML files alphabetically"); strVectorSortAlpha(&xmlFiles); + C("Dpne sorting XML files alphabetically"); + /* * Load the first file found as currentWorld. @@ -293,8 +299,10 @@ void initEverything(void){ /* * Read in the XML file. */ - + C("Setting current XML file"); + std::cout << "File to load: " << xmlFiles[i] << std::endl; currentWorld = loadWorldFromXML(xmlFiles[i]); + C("Done setting current XML file"); break; } } |