diff options
author | Paul Gilbert | 2012-09-23 21:05:55 +1000 |
---|---|---|
committer | Paul Gilbert | 2012-09-23 21:05:55 +1000 |
commit | 3fcff82dae63c3f45ad481c1038a7c7142b361c2 (patch) | |
tree | af69adaf396b0d9793d4f34a8b5964e56146a2c4 /engines/hopkins | |
parent | 4f40d98af0faa54922e1321157335001a3457145 (diff) | |
download | scummvm-rg350-3fcff82dae63c3f45ad481c1038a7c7142b361c2.tar.gz scummvm-rg350-3fcff82dae63c3f45ad481c1038a7c7142b361c2.tar.bz2 scummvm-rg350-3fcff82dae63c3f45ad481c1038a7c7142b361c2.zip |
HOPKINS: Added extra shouldQuit check to animation player
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/anim.cpp | 6 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/hopkins.h | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 665f5590e1..33717eeb2f 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -170,7 +170,7 @@ void AnimationManager::PLAY_ANM(const Common::String &filename, uint32 rate1, ui _vm->_eventsManager.CONTROLE_MES(); _vm->_soundManager.VERIF_SOUND(); - } while (_vm->_eventsManager.lItCounter < rate2); + } while (_vm->_eventsManager.lItCounter < rate2 && !_vm->shouldQuit()); } _vm->_eventsManager.lItCounter = 0; @@ -196,7 +196,7 @@ void AnimationManager::PLAY_ANM(const Common::String &filename, uint32 rate1, ui _vm->_graphicsManager.DD_VBL(); _vm->_soundManager.VERIF_SOUND(); } - } while (!doneFlag); + } while (!doneFlag && !_vm->shouldQuit()); if (_vm->_globals.iRegul != 1) { _vm->_eventsManager.lItCounter = 0; @@ -225,7 +225,7 @@ REDRAW_ANIM: _vm->_eventsManager.CONTROLE_MES(); _vm->_soundManager.VERIF_SOUND(); - } while (_vm->_eventsManager.lItCounter < rate3); + } while (_vm->_eventsManager.lItCounter < rate3 && !_vm->shouldQuit()); _vm->_eventsManager.lItCounter = 0; _vm->_soundManager.VERIF_SOUND(); diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 61fb368794..9ab4d4cf27 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -473,6 +473,10 @@ LABEL_128: return Common::kNoError; } +bool HopkinsEngine::shouldQuit() const { + return g_system->getEventManager()->shouldQuit(); +} + int HopkinsEngine::getRandomNumber(int maxNumber) { return _randomSource.getRandomNumber(maxNumber); } diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h index 062fc1e191..6e7c3db020 100644 --- a/engines/hopkins/hopkins.h +++ b/engines/hopkins/hopkins.h @@ -113,6 +113,7 @@ public: Common::Language getLanguage() const; uint16 getVersion() const; bool getIsDemo() const; + bool shouldQuit() const; int getRandomNumber(int maxNumber); |