diff options
author | Paul Gilbert | 2013-03-25 09:18:13 -0400 |
---|---|---|
committer | Paul Gilbert | 2013-03-25 09:18:13 -0400 |
commit | 63b669cfc4ec0cae7be83949f98ee3fd48607f90 (patch) | |
tree | 26032d62f291a18008849b899342cb8471759245 /engines | |
parent | cfe42b15b1bc1ab74cdad90b7dcafe6f0859ff83 (diff) | |
download | scummvm-rg350-63b669cfc4ec0cae7be83949f98ee3fd48607f90.tar.gz scummvm-rg350-63b669cfc4ec0cae7be83949f98ee3fd48607f90.tar.bz2 scummvm-rg350-63b669cfc4ec0cae7be83949f98ee3fd48607f90.zip |
HOPKINS: Fix for not being able to quit during underater base entrance cutscene
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/events.cpp | 6 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 18 |
2 files changed, 13 insertions, 11 deletions
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 1f42bf120a..a73ce41a0b 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -420,11 +420,11 @@ void EventsManager::refreshScreenAndEvents() { bool externalLoopFl = false; do { while (!_vm->shouldQuit()) { - checkForNextFrameCounter(); + pollEvents(); bool innerLoopFl = false; - while (_breakoutFl || _vm->_globals->iRegul != 1) { - checkForNextFrameCounter(); + while (!_vm->shouldQuit() && (_breakoutFl || _vm->_globals->iRegul != 1)) { + pollEvents(); if (!_breakoutFl) { innerLoopFl = true; diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index a355226914..4051e5acf8 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -2039,7 +2039,7 @@ void HopkinsEngine::playUnderwaterBaseCutscene() { _graphicsManager->displayAllBob(); _objectsManager->loadLinkFile("IM92"); - for (int cpt = 0; cpt <= 4; cpt++) + for (int cpt = 0; cpt <= 4 && !shouldQuit(); cpt++) _eventsManager->refreshScreenAndEvents(); _graphicsManager->fadeInLong(); @@ -2047,14 +2047,16 @@ void HopkinsEngine::playUnderwaterBaseCutscene() { do _eventsManager->refreshScreenAndEvents(); - while (_objectsManager->getBobAnimDataIdx(8) != 22); + while (!shouldQuit() && _objectsManager->getBobAnimDataIdx(8) != 22); - _graphicsManager->fadeOutLong(); - _graphicsManager->endDisplayBob(); - _objectsManager->resetHidingItems(); - _globals->_disableInventFl = false; - _globals->_exitId = 93; - _globals->iRegul = 0; + if (!shouldQuit()) { + _graphicsManager->fadeOutLong(); + _graphicsManager->endDisplayBob(); + _objectsManager->resetHidingItems(); + _globals->_disableInventFl = false; + _globals->_exitId = 93; + _globals->iRegul = 0; + } } void HopkinsEngine::playEnding() { |