diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-04-04 07:32:55 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-04-04 07:32:55 -0400 |
commit | c74d256646cf0c438feee2ac703cc1f34b47b8ec (patch) | |
tree | af9ec2469bce263c53ce6adc8d9385750eab3ead /src/gameplay.cpp | |
parent | 260c617673ab332bf2a3531db45bd264668d1b98 (diff) | |
parent | a45daeda3633bdf25267a0186b39618269dca970 (diff) |
Merge branch 'master' of https://github.com/tcsullivan/gamedev
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; } } |