[Scummvm-cvs-logs] SF.net SVN: scummvm:[47215] scummvm/trunk/engines/draci

spalek at users.sourceforge.net spalek at users.sourceforge.net
Sun Jan 10 02:25:37 CET 2010


Revision: 47215
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47215&view=rev
Author:   spalek
Date:     2010-01-10 01:25:37 +0000 (Sun, 10 Jan 2010)

Log Message:
-----------
Handle properly shouldQuit()

Modified Paths:
--------------
    scummvm/trunk/engines/draci/draci.cpp
    scummvm/trunk/engines/draci/game.cpp
    scummvm/trunk/engines/draci/game.h

Modified: scummvm/trunk/engines/draci/draci.cpp
===================================================================
--- scummvm/trunk/engines/draci/draci.cpp	2010-01-09 23:01:38 UTC (rev 47214)
+++ scummvm/trunk/engines/draci/draci.cpp	2010-01-10 01:25:37 UTC (rev 47215)
@@ -223,11 +223,6 @@
 
 	while (_eventMan->pollEvent(event)) {
 		switch (event.type) {
-		case Common::EVENT_QUIT:
-		case Common::EVENT_RTL:
-			_game->setQuit(true);
-			_script->endCurrentProgram(true);
-			break;
 		case Common::EVENT_KEYDOWN:
 			switch (event.kbd.keycode) {
 			case Common::KEYCODE_RIGHT:
@@ -310,6 +305,12 @@
 			_mouse->handleEvent(event);
 		}
 	}
+
+	// Handle EVENT_QUIT and EVENT_RTL.
+	if (shouldQuit()) {
+		_game->setQuit(true);
+		_script->endCurrentProgram(true);
+	}
 }
 
 DraciEngine::~DraciEngine() {

Modified: scummvm/trunk/engines/draci/game.cpp
===================================================================
--- scummvm/trunk/engines/draci/game.cpp	2010-01-09 23:01:38 UTC (rev 47214)
+++ scummvm/trunk/engines/draci/game.cpp	2010-01-10 01:25:37 UTC (rev 47215)
@@ -158,7 +158,7 @@
 }
 
 void Game::start() {
-	while (!shouldQuit()) {
+	while (!gameShouldQuit()) {
 		// Reset the flag allowing to run the scripts.
 		_vm->_script->endCurrentProgram(false);
 
@@ -453,7 +453,7 @@
 	}
 
 	// This returns true if we got a signal to quit the game
-	if (shouldQuit()) {
+	if (gameShouldQuit()) {
 		setExitLoop(true);
 	}
 

Modified: scummvm/trunk/engines/draci/game.h
===================================================================
--- scummvm/trunk/engines/draci/game.h	2010-01-09 23:01:38 UTC (rev 47214)
+++ scummvm/trunk/engines/draci/game.h	2010-01-10 01:25:37 UTC (rev 47215)
@@ -278,7 +278,7 @@
 	LoopStatus getLoopStatus() const { return _loopStatus; }
 	LoopSubstatus getLoopSubstatus() const { return _loopSubstatus; }
 
-	bool shouldQuit() const { return _shouldQuit; }
+	bool gameShouldQuit() const { return _shouldQuit; }
 	void setQuit(bool quit) { _shouldQuit = quit; }
 	bool shouldExitLoop() const { return _shouldExitLoop; }
 	void setExitLoop(bool exit) { _shouldExitLoop = exit; }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list