aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.cpp
diff options
context:
space:
mode:
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.