aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorStrangerke2015-12-24 01:21:40 +0100
committerStrangerke2015-12-24 01:21:40 +0100
commit0bf89c1eecee3df0e50010124522349ccdf8b641 (patch)
treea3a34d568a4ecae953711734c28e5b86bd536e86 /engines/lab
parent997150e76e562438f0d939f54fd1e3fb89b1e005 (diff)
downloadscummvm-rg350-0bf89c1eecee3df0e50010124522349ccdf8b641.tar.gz
scummvm-rg350-0bf89c1eecee3df0e50010124522349ccdf8b641.tar.bz2
scummvm-rg350-0bf89c1eecee3df0e50010124522349ccdf8b641.zip
LAB: Cleanup the way shouldQuit is called
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/engine.cpp10
-rw-r--r--engines/lab/intro.cpp4
-rw-r--r--engines/lab/map.cpp2
-rw-r--r--engines/lab/savegame.cpp2
-rw-r--r--engines/lab/special.cpp4
5 files changed, 11 insertions, 11 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index 3167222ae0..62d4da9aa1 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 d8612764e7..dbb37827e4 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 21b0804e66..12df8ca4d7 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 f70d73b75c..f75856ca6f 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 857b604f01..716628661c 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;
}