[Scummvm-cvs-logs] scummvm master -> 6cab17c832d01bb7963040b99fcb9c4e546dd582

tramboi bertrand_augereau at yahoo.fr
Sun Nov 20 19:29:17 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6cab17c832 DREAMWEB: Accessor for kQuitrequested


Commit: 6cab17c832d01bb7963040b99fcb9c4e546dd582
    https://github.com/scummvm/scummvm/commit/6cab17c832d01bb7963040b99fcb9c4e546dd582
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-20T12:26:18-08:00

Commit Message:
DREAMWEB: Accessor for kQuitrequested

Changed paths:
    engines/dreamweb/monitor.cpp
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h



diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index c09b715..d0da5e3 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -81,7 +81,7 @@ void DreamGenContext::usemon() {
 		data.word(kMonadx) = di;
 		data.word(kMonady) = bx;
 		execcommand();
-		if (data.byte(kQuitrequested)) //TODO : Check why it crashes when put before the execcommand
+		if (quitRequested()) //TODO : Check why it crashes when put before the execcommand
 			break;
 	} while (al == 0);
 	getridoftemp();
@@ -117,7 +117,7 @@ void DreamGenContext::input() {
 		vsync();
 		delcurs();
 		readkey();
-		if (data.byte(kQuitrequested))
+		if (quitRequested())
 			return;
 		uint8 currentKey = data.byte(kCurrentkey);
 		if (currentKey == 0)
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 8a19122..d520307 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -100,7 +100,7 @@ void DreamGenContext::dreamweb() {
 			cls();
 			setmode();
 			decide();
-			if (data.byte(kQuitrequested))
+			if (quitRequested())
 				return; // exit game
 
 			if (data.byte(kGetback) == 4)
@@ -114,11 +114,11 @@ void DreamGenContext::dreamweb() {
 			// "playgame"
 
 			titles();
-			if (data.byte(kQuitrequested))
+			if (quitRequested())
 				return; // exit game
 			credits();
 
-			if (data.byte(kQuitrequested))
+			if (quitRequested())
 				return; // exit game
 
 			clearchanges();
@@ -146,12 +146,12 @@ void DreamGenContext::dreamweb() {
 		// main loop
 		while (true) {
 
-			if (data.byte(kQuitrequested))
+			if (quitRequested())
 				return; // exit game
 
 			screenupdate();
 
-			if (data.byte(kQuitrequested))
+			if (quitRequested())
 				return; // exit game
 
 			if (data.byte(kWongame) != 0) {
@@ -203,10 +203,14 @@ void DreamGenContext::dreamweb() {
 	}
 }
 
+bool DreamGenContext::quitRequested() {
+	return data.byte(kQuitrequested);
+}
+
 void DreamGenContext::screenupdate() {
 	newplace();
 	mainscreen();
-	if (data.byte(kQuitrequested))
+	if (quitRequested())
 		return;
 	animpointer();
 	showpointer();
@@ -1949,7 +1953,7 @@ void DreamGenContext::hangon(uint16 frameCount) {
 	while (frameCount) {
 		vsync();
 		--frameCount;
-		if (data.byte(kQuitrequested))
+		if (quitRequested())
 			break;
 	}
 }
@@ -1979,7 +1983,7 @@ void DreamGenContext::hangonp(uint16 count) {
 		showpointer();
 		vsync();
 		dumppointer();
-		if (data.byte(kQuitrequested))
+		if (quitRequested())
 			break;
 		if (data.word(kMousebutton) != 0 && data.word(kMousebutton) != data.word(kOldbutton))
 			break;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 27ed468..29f888c 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -19,7 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  */
-	void screenupdate();	
+	void screenupdate();
+	bool quitRequested();
 	void startup();
 	void startup1();
 	void switchryanon();






More information about the Scummvm-git-logs mailing list