diff options
author | Paul Gilbert | 2013-03-10 20:25:05 -0400 |
---|---|---|
committer | Paul Gilbert | 2013-03-10 20:25:05 -0400 |
commit | 2d83249ac2105ff9ce803becd4bb6f1688de3df8 (patch) | |
tree | 229373366a391d371085c2b2f3f99afe566c679e | |
parent | 3d06a93be163d9cc99d5c06036408e3020d5e76e (diff) | |
download | scummvm-rg350-2d83249ac2105ff9ce803becd4bb6f1688de3df8.tar.gz scummvm-rg350-2d83249ac2105ff9ce803becd4bb6f1688de3df8.tar.bz2 scummvm-rg350-2d83249ac2105ff9ce803becd4bb6f1688de3df8.zip |
HOPKINS: Clean up main game quit checks
-rw-r--r-- | engines/hopkins/hopkins.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index ff82d4130d..ce4f0f5049 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -172,7 +172,7 @@ bool HopkinsEngine::runWin95Demo() { } } - if (g_system->getEventManager()->shouldQuit()) + if (shouldQuit()) return false; switch (_globals._exitId) { @@ -452,14 +452,14 @@ bool HopkinsEngine::runLinuxDemo() { if (!_globals._exitId) { _globals._exitId = _menuManager.menu(); if (_globals._exitId == -1) { - if (!g_system->getEventManager()->shouldQuit()) + if (!shouldQuit()) endLinuxDemo(); _globals.PERSO = _globals.freeMemory(_globals.PERSO); restoreSystem(); } } - if (g_system->getEventManager()->shouldQuit()) + if (shouldQuit()) return false; switch (_globals._exitId) { @@ -790,8 +790,11 @@ bool HopkinsEngine::runFull() { _graphicsManager.fadeOutLong(); } - if (!_eventsManager._escKeyFl) + if (!_eventsManager._escKeyFl) { playIntro(); + if (shouldQuit()) + return false; + } if (getPlatform() != Common::kPlatformLinux) { _graphicsManager.fadeOutShort(); _graphicsManager.loadImage("H2"); @@ -819,7 +822,7 @@ bool HopkinsEngine::runFull() { } } - if (g_system->getEventManager()->shouldQuit()) + if (shouldQuit()) return false; switch (_globals._exitId) { @@ -1927,7 +1930,7 @@ void HopkinsEngine::endLinuxDemo() { if (_eventsManager.getMouseButton() == 1) mouseClicked = true; - } while (!mouseClicked && !g_system->getEventManager()->shouldQuit()); + } while (!mouseClicked && !shouldQuit()); // Original tried to open a web browser link here. Since ScummVM doesn't support // that, it's being skipped in favor of simply exiting @@ -2520,7 +2523,7 @@ void HopkinsEngine::displayCredits() { _globals._creditsEndX = -1; _globals._creditsStartY = -1; _globals._creditsEndY = -1; - } while ((_eventsManager.getMouseButton() != 1) && (!g_system->getEventManager()->shouldQuit())); + } while ((_eventsManager.getMouseButton() != 1) && (!shouldQuit())); _graphicsManager.fadeOutLong(); _globals.iRegul = 1; _eventsManager._mouseFl = true; @@ -2816,7 +2819,7 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi _linesManager.checkZone(); setSubmarineSprites(); _eventsManager.VBL(); - if (_globals._exitId || g_system->getEventManager()->shouldQuit()) + if (_globals._exitId || shouldQuit()) break; } |