aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-04-04 07:32:55 -0400
committerClyne Sullivan <tullivan99@gmail.com>2016-04-04 07:32:55 -0400
commitc74d256646cf0c438feee2ac703cc1f34b47b8ec (patch)
treeaf9ec2469bce263c53ce6adc8d9385750eab3ead /src/gameplay.cpp
parent260c617673ab332bf2a3531db45bd264668d1b98 (diff)
parenta45daeda3633bdf25267a0186b39618269dca970 (diff)
Merge branch 'master' of https://github.com/tcsullivan/gamedev
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r--src/gameplay.cpp16
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;
}
}