LAB: Cleanup the way shouldQuit is called

This commit is contained in:
Strangerke 2015-12-24 01:21:40 +01:00
parent 997150e76e
commit 0bf89c1eec
5 changed files with 11 additions and 11 deletions

View File

@ -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) {

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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;
}