From c09e0c26eced6d65b54a922de93f102d4a064360 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 10 Apr 2013 13:26:26 +0200 Subject: HOPKINS: Remove some magic values used by _eventMode checks --- engines/hopkins/anim.cpp | 24 ++++++++++++------------ engines/hopkins/events.cpp | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 95384ebe2d..3364429723 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -98,7 +98,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui _vm->_events->_escKeyFl = false; _vm->_soundMan->loadAnimSound(); - if (_vm->_globals->_eventMode == 1) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) { // Do pre-animation delay do { if (_vm->_events->_escKeyFl) @@ -125,7 +125,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui f.read(screenP, READ_LE_UINT32(imageStr + 8)); - if (_vm->_globals->_eventMode == 1) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) { do { if (_vm->_events->_escKeyFl) break; @@ -147,7 +147,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui } } - if (_vm->_globals->_eventMode == 1 && !_vm->_events->_escKeyFl) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE && !_vm->_events->_escKeyFl) { // Do post-animation delay do { if (_vm->_events->_escKeyFl) @@ -247,7 +247,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u _vm->_events->_rateCounter = 0; _vm->_events->_escKeyFl = false; _vm->_soundMan->loadAnimSound(); - if (_vm->_globals->_eventMode == 1) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) { while (!_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate1) { _vm->_events->refreshEvents(); } @@ -272,7 +272,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u break; f.read(screenP, READ_LE_UINT32(imageStr + 8)); - if (_vm->_globals->_eventMode == 1) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) { while (!_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate2) { _vm->_events->refreshEvents(); _vm->_soundMan->checkSoundEnd(); @@ -288,7 +288,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u _vm->_soundMan->checkSoundEnd(); } - if (_vm->_globals->_eventMode == 1) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) { while (!_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate3) { _vm->_events->refreshEvents(); _vm->_soundMan->checkSoundEnd(); @@ -588,7 +588,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui _vm->_events->_rateCounter = 0; _vm->_events->_escKeyFl = false; _vm->_soundMan->loadAnimSound(); - if (_vm->_globals->_eventMode == 1) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) { do { if (_vm->shouldQuit() || (_vm->_events->_escKeyFl && !skipEscFl)) { skipFl = true; @@ -615,7 +615,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui break; f.read(screenP, READ_LE_UINT32(imageStr + 8)); - if (_vm->_globals->_eventMode == 1) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) { do { if (_vm->shouldQuit() || (_vm->_events->_escKeyFl && !skipEscFl)) { skipFl = true; @@ -641,7 +641,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui } } - if (_vm->_globals->_eventMode == 1 && !skipFl) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE && !skipFl) { do { if (_vm->shouldQuit() || (_vm->_events->_escKeyFl && !skipEscFl)) { skipFl = true; @@ -704,7 +704,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u _vm->_events->_rateCounter = 0; _vm->_events->_escKeyFl = false; _vm->_soundMan->loadAnimSound(); - if (_vm->_globals->_eventMode == 1) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) { do { _vm->_events->refreshEvents(); _vm->_soundMan->checkSoundEnd(); @@ -728,7 +728,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u break; f.read(screenP, READ_LE_UINT32(imageStr + 8)); - if (_vm->_globals->_eventMode == 1) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) { do { _vm->_events->refreshEvents(); } while (!_vm->shouldQuit() && !_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate2); @@ -744,7 +744,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u } } - if (_vm->_globals->_eventMode == 1) { + if (_vm->_globals->_eventMode == EVENTMODE_IGNORE) { // Wait for third rate delay do { _vm->_events->refreshEvents(); diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 211bf5693c..6c3b8fd05a 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -447,7 +447,7 @@ void EventsManager::refreshScreenAndEvents() { } if (externalLoopFl) break; - } while (!_vm->shouldQuit() && _vm->_globals->_eventMode == 3 && _rateCounter <= 15); + } while (!_vm->shouldQuit() && _vm->_globals->_eventMode == EVENTMODE_CREDITS && _rateCounter <= 15); _vm->_globals->_speed = 2; _rateCounter = 0; if (!_vm->_graphicsMan->_largeScreenFl || _vm->_graphicsMan->_scrollStatus == 1) { -- cgit v1.2.3