[Scummvm-cvs-logs] scummvm master -> 0bf89c1eecee3df0e50010124522349ccdf8b641

Strangerke Strangerke at scummvm.org
Thu Dec 24 01:27:15 CET 2015


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:
0bf89c1eec LAB: Cleanup the way shouldQuit is called


Commit: 0bf89c1eecee3df0e50010124522349ccdf8b641
    https://github.com/scummvm/scummvm/commit/0bf89c1eecee3df0e50010124522349ccdf8b641
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-12-24T01:21:40+01:00

Commit Message:
LAB: Cleanup the way shouldQuit is called

Changed paths:
    engines/lab/engine.cpp
    engines/lab/intro.cpp
    engines/lab/map.cpp
    engines/lab/savegame.cpp
    engines/lab/special.cpp



diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index 3167222..62d4da9 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -179,7 +179,7 @@ void LabEngine::eatMessages() {
 
 	do {
 		msg = _event->getMsg();
-	} while (msg && !g_engine->shouldQuit());
+	} while (msg && !shouldQuit());
 }
 
 bool LabEngine::doCloseUp(CloseDataPtr closePtr) {
@@ -426,7 +426,7 @@ void LabEngine::mainGameLoop() {
 		_system->delayMillis(10);
 
 		if (gotMessage) {
-			if (_quitLab || g_engine->shouldQuit()) {
+			if (_quitLab || shouldQuit()) {
 				_anim->stopDiff();
 				break;
 			}
@@ -496,7 +496,7 @@ void LabEngine::mainGameLoop() {
 		updateMusicAndEvents();
 		interfaceOn();
 		IntuiMessage *curMsg = _event->getMsg();
-		if (g_engine->shouldQuit()) {
+		if (shouldQuit()) {
 			_quitLab = true;
 			return;
 		}
@@ -578,7 +578,7 @@ bool LabEngine::fromCrumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Commo
 
 	_anim->_doBlack = false;
 
-	if (g_engine->shouldQuit())
+	if (shouldQuit())
 		return false;
 
 	if ((msgClass == kMessageRawKey) && !_graphics->_longWinInFront) {
@@ -727,7 +727,7 @@ bool LabEngine::processKey(IntuiMessage *curMsg, uint32 &msgClass, uint16 &quali
 			updateMusicAndEvents();
 			curMsg = _event->getMsg();
 
-			if (g_engine->shouldQuit())
+			if (shouldQuit())
 				return false;
 
 			if (!curMsg) {
diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp
index d861276..dbb3782 100644
--- a/engines/lab/intro.cpp
+++ b/engines/lab/intro.cpp
@@ -49,7 +49,7 @@ void Intro::introEatMessages() {
 	while (1) {
 		IntuiMessage *msg = _vm->_event->getMsg();
 
-		if (g_engine->shouldQuit()) {
+		if (_vm->shouldQuit()) {
 			_quitIntro = true;
 			return;
 		}
@@ -118,7 +118,7 @@ void Intro::doPictText(const Common::String filename, TextFont *msgFont, bool is
 		}
 
 		IntuiMessage *msg = _vm->_event->getMsg();
-		if (g_engine->shouldQuit()) {
+		if (_vm->shouldQuit()) {
 			_quitIntro = true;
 			return;
 		}
diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp
index 21b0804..12df8ca 100644
--- a/engines/lab/map.cpp
+++ b/engines/lab/map.cpp
@@ -399,7 +399,7 @@ void LabEngine::processMap(uint16 curRoom) {
 		// Make sure we check the music at least after every message
 		updateMusicAndEvents();
 		IntuiMessage *msg = _event->getMsg();
-		if (g_engine->shouldQuit()) {
+		if (shouldQuit()) {
 			_quitLab = true;
 			return;
 		}
diff --git a/engines/lab/savegame.cpp b/engines/lab/savegame.cpp
index f70d73b..f75856c 100644
--- a/engines/lab/savegame.cpp
+++ b/engines/lab/savegame.cpp
@@ -69,7 +69,7 @@ void LabEngine::writeSaveGameHeader(Common::OutSaveFile *out, const Common::Stri
 
 	uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
 	uint16 saveTime = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF);
-	uint32 playTime = g_engine->getTotalPlayTime() / 1000;
+	uint32 playTime = getTotalPlayTime() / 1000;
 
 	out->writeUint32BE(saveDate);
 	out->writeUint16BE(saveTime);
diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp
index 857b604..7166286 100644
--- a/engines/lab/special.cpp
+++ b/engines/lab/special.cpp
@@ -227,7 +227,7 @@ void LabEngine::processJournal() {
 		// Make sure we check the music at least after every message
 		updateMusicAndEvents();
 		IntuiMessage *msg = _event->getMsg();
-		if (g_engine->shouldQuit()) {
+		if (shouldQuit()) {
 			_quitLab = true;
 			return;
 		}
@@ -379,7 +379,7 @@ void LabEngine::processMonitor(const char *ntext, TextFont *monitorFont, bool is
 		// Make sure we check the music at least after every message
 		updateMusicAndEvents();
 		IntuiMessage *msg = _event->getMsg();
-		if (g_engine->shouldQuit()) {
+		if (shouldQuit()) {
 			_quitLab = true;
 			return;
 		}






More information about the Scummvm-git-logs mailing list