HOPKINS: set _clearAnimation private, add functions to access it

This commit is contained in:
Strangerke 2013-03-24 10:56:58 +01:00
parent 568b860c8a
commit 91255b56ae
3 changed files with 13 additions and 10 deletions

View File

@ -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

View File

@ -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() {

View File

@ -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);