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

spalek at users.sourceforge.net spalek at users.sourceforge.net
Wed Oct 28 01:04:59 CET 2009


Revision: 45452
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45452&view=rev
Author:   spalek
Date:     2009-10-28 00:04:59 +0000 (Wed, 28 Oct 2009)

Log Message:
-----------
Fix entering the same room when re-loading the game.

(Most objects were not loaded due to incorrect cleaning of a flag).  Also,
clean up accessing some boolean attributes.

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

Modified: scummvm/trunk/engines/draci/game.cpp
===================================================================
--- scummvm/trunk/engines/draci/game.cpp	2009-10-27 23:51:32 UTC (rev 45451)
+++ scummvm/trunk/engines/draci/game.cpp	2009-10-28 00:04:59 UTC (rev 45452)
@@ -146,10 +146,10 @@
 
 		// Whenever the top-level loop is entered, it should not finish unless
 		// the exit is triggered by a script
-		_shouldExitLoop = false;
+		const bool force_reload = shouldExitLoop() > 1;
+		setExitLoop(false);
 		_vm->_script->endCurrentProgram(false);
 
-		const bool force_reload = shouldExitLoop() > 1;
 		enterNewRoom(force_reload);
 
 		if (_vm->_script->shouldEndProgram()) {
@@ -162,8 +162,8 @@
 }
 
 void Game::init() {
-	_shouldQuit = false;
-	_shouldExitLoop = false;
+	setQuit(false);
+	setExitLoop(false);
 	_scheduledPalette = 0;
 	setLoopStatus(kStatusGate);
 	setLoopSubstatus(kSubstatusOrdinary);
@@ -256,7 +256,7 @@
 			}
 
 			if (_vm->_mouse->lButtonPressed() || _vm->_mouse->rButtonPressed()) {
-				_shouldExitLoop = true;
+				setExitLoop(true);
 				_vm->_mouse->lButtonSet(false);
 				_vm->_mouse->rButtonSet(false);
 			}
@@ -426,7 +426,7 @@
 				_vm->_mouse->rButtonPressed() ||
 				(_vm->_system->getMillis() - _speechTick) >= _speechDuration) {
 
-				_shouldExitLoop = true;
+				setExitLoop(true);
 				_vm->_mouse->lButtonSet(false);
 				_vm->_mouse->rButtonSet(false);
 			}
@@ -442,8 +442,8 @@
 		_vm->_system->delayMillis(20);
 
 		// HACK: Won't be needed once the game loop is implemented properly
-		_shouldExitLoop = _shouldExitLoop || (_newRoom != getRoomNum() &&
-		                  (_loopStatus == kStatusOrdinary || _loopStatus == kStatusGate));
+		setExitLoop(shouldExitLoop() || (_newRoom != getRoomNum() &&
+		                  (_loopStatus == kStatusOrdinary || _loopStatus == kStatusGate)));
 
 	} while (!shouldExitLoop());
 }
@@ -812,7 +812,7 @@
 
 	if (_dialogueLinesNum > 1) {
 		_vm->_mouse->cursorOn();
-		_shouldExitLoop = false;
+		setExitLoop(false);
 		loop();
 		_vm->_mouse->cursorOff();
 


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