diff options
author | Strangerke | 2013-03-23 15:00:55 +0100 |
---|---|---|
committer | Strangerke | 2013-03-23 15:00:55 +0100 |
commit | 38a90947fe90aebfffed045d0c36ab3a11e74d84 (patch) | |
tree | 2b98cce1dabb5ba9ecd078caf9eeaa9eab755e50 /engines/hopkins | |
parent | a6a8f1afd862f8fa4ecf1f0a0b4ad5c53ec7c1b6 (diff) | |
download | scummvm-rg350-38a90947fe90aebfffed045d0c36ab3a11e74d84.tar.gz scummvm-rg350-38a90947fe90aebfffed045d0c36ab3a11e74d84.tar.bz2 scummvm-rg350-38a90947fe90aebfffed045d0c36ab3a11e74d84.zip |
HOPKINS: Remove duplicated code in AnimationManager.
"noColFl" is only 'true' in one animation of the full game, so the code after the check isn't used in the demo.
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/anim.cpp | 48 |
1 files changed, 15 insertions, 33 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 090117bf14..8967281640 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -660,40 +660,22 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui _vm->_graphicsManager->updateScreen(); } bool skipFl = false; - if (_vm->getIsDemo()) { - _vm->_eventsManager->_rateCounter = 0; - _vm->_eventsManager->_escKeyFl = false; - _vm->_soundManager->loadAnimSound(); - if (_vm->_globals->iRegul == 1) { - do { - if (_vm->shouldQuit() || (_vm->_eventsManager->_escKeyFl && !skipEscFl)) { - skipFl = true; - break; - } - - _vm->_eventsManager->_escKeyFl = false; - _vm->_eventsManager->refreshEvents(); - _vm->_soundManager->checkSoundEnd(); - } while (_vm->_eventsManager->_rateCounter < rate1); - } - } else { - if (noColFl) - _vm->_graphicsManager->fadeInDefaultLength(screenP); - _vm->_eventsManager->_rateCounter = 0; - _vm->_eventsManager->_escKeyFl = false; - _vm->_soundManager->loadAnimSound(); - if (_vm->_globals->iRegul == 1) { - do { - if (_vm->shouldQuit() || (_vm->_eventsManager->_escKeyFl && !skipEscFl)) { - skipFl = true; - break; - } + if (noColFl) + _vm->_graphicsManager->fadeInDefaultLength(screenP); + _vm->_eventsManager->_rateCounter = 0; + _vm->_eventsManager->_escKeyFl = false; + _vm->_soundManager->loadAnimSound(); + if (_vm->_globals->iRegul == 1) { + do { + if (_vm->shouldQuit() || (_vm->_eventsManager->_escKeyFl && !skipEscFl)) { + skipFl = true; + break; + } - _vm->_eventsManager->_escKeyFl = false; - _vm->_eventsManager->refreshEvents(); - _vm->_soundManager->checkSoundEnd(); - } while (_vm->_eventsManager->_rateCounter < rate1); - } + _vm->_eventsManager->_escKeyFl = false; + _vm->_eventsManager->refreshEvents(); + _vm->_soundManager->checkSoundEnd(); + } while (_vm->_eventsManager->_rateCounter < rate1); } _vm->_eventsManager->_rateCounter = 0; if (!skipFl) { |