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.
This commit is contained in:
Strangerke 2013-03-23 15:00:55 +01:00
parent a6a8f1afd8
commit 38a90947fe

View File

@ -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;
}
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);
}
} 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;
}
_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) {