aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorStrangerke2013-03-24 10:56:58 +0100
committerStrangerke2013-03-24 10:56:58 +0100
commit91255b56aed3c216185c82127ef084671caee726 (patch)
tree83554971d59b21df5901919b869d354451eee3f2 /engines/hopkins
parent568b860c8a76f397bd09cf64723b2818b4ade2e1 (diff)
downloadscummvm-rg350-91255b56aed3c216185c82127ef084671caee726.tar.gz
scummvm-rg350-91255b56aed3c216185c82127ef084671caee726.tar.bz2
scummvm-rg350-91255b56aed3c216185c82127ef084671caee726.zip
HOPKINS: set _clearAnimation private, add functions to access it
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/anim.h7
-rw-r--r--engines/hopkins/hopkins.cpp14
-rw-r--r--engines/hopkins/objects.cpp2
3 files changed, 13 insertions, 10 deletions
diff --git a/engines/hopkins/anim.h b/engines/hopkins/anim.h
index 93c8339baa..39727fe68f 100644
--- a/engines/hopkins/anim.h
+++ b/engines/hopkins/anim.h
@@ -34,14 +34,14 @@ class HopkinsEngine;
class AnimationManager {
private:
+ bool _clearAnimationFl;
+
HopkinsEngine *_vm;
int loadSpriteBank(int idx, const Common::String &filename);
void searchAnim(const byte *data, int animIndex, int count);
public:
- bool _clearAnimationFl;
-
AnimationManager(HopkinsEngine *vm);
void loadAnim(const Common::String &animName);
@@ -50,6 +50,9 @@ public:
void playAnim2(const Common::String &filename, uint32 rate1, uint32 rate2, uint32 rate3);
void playSequence(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipEscFl, bool skipSeqFl, bool noColFl = false);
void playSequence2(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl = false);
+
+ void setClearAnimFlag() { _clearAnimationFl = true; }
+ void unsetClearAnimFlag() { _clearAnimationFl = false; }
};
} // End of namespace Hopkins
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index 0b57405394..ecf95294ea 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -1622,7 +1622,7 @@ void HopkinsEngine::playIntro() {
_globals->iRegul = 1;
_eventsManager->refreshScreenAndEvents();
_soundManager->playSound(16);
- _animationManager->_clearAnimationFl = true;
+ _animationManager->setClearAnimFlag();
_animationManager->playAnim("J1.anm", 12, 12, 50);
if (shouldQuit() || _eventsManager->_escKeyFl)
return;
@@ -1804,7 +1804,7 @@ void HopkinsEngine::playIntro() {
_graphicsManager->fadeOutLong();
_graphicsManager->endDisplayBob();
- _animationManager->_clearAnimationFl = true;
+ _animationManager->setClearAnimFlag();
_soundManager->playSound(3);
_soundManager->_specialSoundNum = 1;
_animationManager->playAnim("INTRO1.anm", 10, 24, 18);
@@ -1820,8 +1820,8 @@ void HopkinsEngine::playIntro() {
if (shouldQuit() || _eventsManager->_escKeyFl)
return;
- _animationManager->_clearAnimationFl = false;
_graphicsManager->FADE_LINUX = 2;
+ _animationManager->unsetClearAnimFlag();
_animationManager->playAnim("J4.anm", 12, 12, 1000);
break;
}
@@ -1990,8 +1990,8 @@ void HopkinsEngine::playSubmarineCutscene() {
_graphicsManager->clearScreen();
_graphicsManager->unlockScreen();
_graphicsManager->clearPalette();
- _animationManager->_clearAnimationFl = true;
_soundManager->playSound(25);
+ _animationManager->setClearAnimFlag();
_animationManager->playAnim("base00a.anm", 10, 18, 18);
if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("base05a.anm", 10, 18, 18);
@@ -2020,7 +2020,7 @@ void HopkinsEngine::playSubmarineCutscene() {
}
_eventsManager->_escKeyFl = false;
- _animationManager->_clearAnimationFl = false;
+ _animationManager->unsetClearAnimFlag();
_globals->_exitId = 85;
}
@@ -2216,7 +2216,7 @@ void HopkinsEngine::playPlaneCutscene() {
_graphicsManager->unlockScreen();
_graphicsManager->clearPalette();
- _animationManager->_clearAnimationFl = false;
+ _animationManager->unsetClearAnimFlag();
_animationManager->playAnim("aerop00a.anm", 10, 18, 18);
if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("serop10a.anm", 10, 18, 18);
@@ -2250,7 +2250,7 @@ void HopkinsEngine::playPlaneCutscene() {
}
_eventsManager->_escKeyFl = false;
- _animationManager->_clearAnimationFl = false;
+ _animationManager->unsetClearAnimFlag();
}
void HopkinsEngine::loadBaseMap() {
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index 44d1bc5c00..df4a6b0854 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -2587,7 +2587,7 @@ void ObjectsManager::handleSpecialGames() {
_vm->_graphicsManager->NB_SCREEN(true);
_vm->_soundManager->_specialSoundNum = 198;
PERSO_ON = true;
- _vm->_animationManager->_clearAnimationFl = false;
+ _vm->_animationManager->unsetClearAnimFlag();
_vm->_animationManager->playAnim("otage.ANM", 1, 24, 500, true);
_vm->_soundManager->_specialSoundNum = 0;
_vm->_graphicsManager->NB_SCREEN(false);