aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-04-06 07:40:28 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-04-06 07:40:28 -0400
commit345a0fe74704dec3eecbb77e4bb252b3d4dd4308 (patch)
tree772a0a0925195193f9152ecff259c9f27f13f413 /src/gameplay.cpp
parent3ca4cca09ed9a2b1028928dea98f19bd26ab3b2c (diff)
parent16920d744a2e638f564753f15f1269f51c131b6b (diff)
First world and style
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r--src/gameplay.cpp37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index 4aa751f..ce514a4 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -111,6 +111,13 @@ CONT:
}
/*
+ * Handle 'go to' thingy
+ */
+
+ if ( (oxml = exml->FirstChildElement("gotox")) )
+ speaker->targetx = atoi(oxml->GetText());
+
+ /*
* Handle dialog options.
*/
@@ -212,16 +219,19 @@ CONT:
}
void commonPageFunc( Mob *callee ){
- static bool lock = false;
-
- if ( !lock ) {
- lock = true;
+ //static bool lock = false;
+ /*if ( !lock ) {
+ lock = true;*/
+ if ( !ui::dialogBoxExists ) {
+ std::cout<<"begin\n";
ui::drawPage( callee->heyid );
- ui::waitForDialog();
+ while( ui::pageExists() );
+ std::cout<<"done\n";
+ //ui::waitForDialog();
- callee->alive = false;
- lock = false;
+ callee->health = 0;
+ //lock = false;
}
}
@@ -260,7 +270,7 @@ void commonTriggerFunc(Mob *callee){
ui::toggleBlackFast();
- callee->alive = false;
+ callee->health = 0;
lock = false;
}
}
@@ -273,21 +283,14 @@ void initEverything(void){
* Read the XML directory into an array.
*/
- 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");
+ if ( getdir( std::string("./" + xmlFolder).c_str(), xmlFiles ) )
+ UserError("Error reading XML files!!!");
/*
* Sort the files alphabetically.
*/
- C("Sorting XML files alphabetically");
strVectorSortAlpha(&xmlFiles);
- C("Dpne sorting XML files alphabetically");
-
/*
* Load the first file found as currentWorld.