diff options
author | Strangerke | 2012-12-09 22:35:59 +0100 |
---|---|---|
committer | Strangerke | 2012-12-09 22:35:59 +0100 |
commit | 742b9e4750658615e57690aff228580edfd5c8b0 (patch) | |
tree | d70f874fd6ad3ccf36a787e895e4515246e6881e | |
parent | 867cbbf4ff6ddfca826724a7ff74f44a06e8d044 (diff) | |
download | scummvm-rg350-742b9e4750658615e57690aff228580edfd5c8b0.tar.gz scummvm-rg350-742b9e4750658615e57690aff228580edfd5c8b0.tar.bz2 scummvm-rg350-742b9e4750658615e57690aff228580edfd5c8b0.zip |
HOPKINS: Rename animationManager functions
-rw-r--r-- | engines/hopkins/anim.cpp | 83 | ||||
-rw-r--r-- | engines/hopkins/anim.h | 20 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 240 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 16 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 74 | ||||
-rw-r--r-- | engines/hopkins/sound.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/sound.h | 2 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 30 | ||||
-rw-r--r-- | engines/hopkins/talk.h | 4 |
9 files changed, 245 insertions, 226 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index dbd4289f36..441721e141 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -34,13 +34,15 @@ namespace Hopkins { AnimationManager::AnimationManager() { - CLS_ANM = false; + clearAnimationFl = false; NO_SEQ = false; NO_COUL = false; } -// Play Anim -void AnimationManager::PLAY_ANM(const Common::String &filename, uint32 rate1, uint32 rate2, uint32 rate3) { +/** + * Play Anim + */ +void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, uint32 rate2, uint32 rate3) { int v4; bool hasScreenCopy; byte *screenCopy = NULL; @@ -70,7 +72,7 @@ LABEL_2: f.skip(14); f.read(v10, nbytes); - if (CLS_ANM == true) { + if (clearAnimationFl == true) { _vm->_graphicsManager.DD_Lock(); _vm->_graphicsManager.Cls_Video(); _vm->_graphicsManager.DD_Unlock(); @@ -110,7 +112,7 @@ LABEL_2: while (!_vm->shouldQuit()) { if (_vm->_eventsManager.ESC_KEY == true) goto LABEL_58; - if (REDRAW_ANIM() == true) + if (redrawAnim() == true) break; _vm->_eventsManager.CONTROLE_MES(); if (_vm->_eventsManager.lItCounter >= rate1) @@ -132,7 +134,7 @@ LABEL_25: v13 = 0; while (!_vm->shouldQuit()) { ++v13; - _vm->_soundManager.PLAY_ANM_SOUND(v13); + _vm->_soundManager.playAnim_SOUND(v13); if (f.read(ptr, 16) != 16) v4 = -1; @@ -169,7 +171,7 @@ LABEL_49: if (v4 == -1) { if (_vm->_globals.iRegul == 1) { while (_vm->_eventsManager.ESC_KEY != true) { - if (REDRAW_ANIM() == true) + if (redrawAnim() == true) goto LABEL_53; _vm->_eventsManager.CONTROLE_MES(); _vm->_soundManager.VERIF_SOUND(); @@ -185,7 +187,7 @@ LABEL_57: } } while (!_vm->shouldQuit() && _vm->_eventsManager.ESC_KEY != true) { - if (REDRAW_ANIM() == true) { + if (redrawAnim() == true) { if (_vm->_graphicsManager.NOLOCK == true) break; _vm->_globals.dos_free2(ptr); @@ -243,8 +245,10 @@ LABEL_58: _vm->_graphicsManager.NOLOCK = false; } -// Play Anim 2 -void AnimationManager::PLAY_ANM2(const Common::String &filename, uint32 a2, uint32 a3, uint32 a4) { +/** + * Play Animation, type 2 + */ +void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint32 a3, uint32 a4) { int v5; int v8; byte *ptr; @@ -335,7 +339,7 @@ void AnimationManager::PLAY_ANM2(const Common::String &filename, uint32 a2, uint for (;;) { if (_vm->_eventsManager.ESC_KEY == true) goto LABEL_114; - if (REDRAW_ANIM() == true) + if (redrawAnim() == true) break; _vm->_eventsManager.CONTROLE_MES(); if (_vm->_eventsManager.lItCounter >= a2) @@ -405,7 +409,7 @@ LABEL_48: v15 = 0; for (;;) { ++v15; - _vm->_soundManager.PLAY_ANM_SOUND(v15); + _vm->_soundManager.playAnim_SOUND(v15); memset(&buf, 0, 6u); memset(v13, 0, 0x13u); @@ -444,7 +448,7 @@ LABEL_88: if (v5 == -1) { if (_vm->_globals.iRegul == 1) { while (_vm->_eventsManager.ESC_KEY != true) { - if (REDRAW_ANIM() == true) { + if (redrawAnim() == true) { if (_vm->_graphicsManager.NOLOCK == true) goto LABEL_114; if (v8 == 1) @@ -508,7 +512,7 @@ LABEL_88: } } while (_vm->_eventsManager.ESC_KEY != true) { - if (REDRAW_ANIM() == true) { + if (redrawAnim() == true) { if (_vm->_graphicsManager.NOLOCK == true) break; if (v8 == 1) @@ -667,12 +671,14 @@ LABEL_114: _vm->_graphicsManager.DD_VBL(); } -bool AnimationManager::REDRAW_ANIM() { +bool AnimationManager::redrawAnim() { return false; } -// Load Anim -void AnimationManager::CHARGE_ANIM(const Common::String &animName) { +/** + * Load Animation + */ +void AnimationManager::loadAnim(const Common::String &animName) { byte v20[15]; char header[10]; char filename1[15]; @@ -682,7 +688,7 @@ void AnimationManager::CHARGE_ANIM(const Common::String &animName) { char filename5[15]; char filename6[15]; - CLEAR_ANIM(); + clearAnim(); Common::String filename = animName + ".ANI"; _vm->_fileManager.constructFilename(_vm->_globals.HOPANIM, filename); @@ -714,7 +720,7 @@ void AnimationManager::CHARGE_ANIM(const Common::String &animName) { if (!f.exists(_vm->_globals.NFICHIER)) error("File not found"); - if (CHARGE_BANK_SPRITE1(idx, files[idx - 1])) + if (loadSpriteBank(idx, files[idx - 1])) error("File not compatible with this soft."); } } @@ -724,13 +730,16 @@ void AnimationManager::CHARGE_ANIM(const Common::String &animName) { f.close(); for (int idx = 1; idx <= 20; ++idx) { - RECHERCHE_ANIM(data, idx, nbytes); + searchAnim(data, idx, nbytes); } _vm->_globals.dos_free2(data); } -void AnimationManager::CLEAR_ANIM() { +/** + * Clear animation + */ +void AnimationManager::clearAnim() { for (int idx = 0; idx < 35; ++idx) { if (_vm->_globals.Bqe_Anim[idx].data != g_PTRNUL) _vm->_globals.Bqe_Anim[idx].data = _vm->_globals.dos_free2(_vm->_globals.Bqe_Anim[idx].data); @@ -747,8 +756,10 @@ void AnimationManager::CLEAR_ANIM() { } } -// Load Sprite Bank 1 -int AnimationManager::CHARGE_BANK_SPRITE1(int idx, const Common::String &filename) { +/** + * Load Sprite Bank + */ +int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) { byte *v3; byte *v4; byte *v13; @@ -839,8 +850,10 @@ int AnimationManager::CHARGE_BANK_SPRITE1(int idx, const Common::String &filenam return result; } -// Search Anim -void AnimationManager::RECHERCHE_ANIM(const byte *data, int animIndex, int count) { +/** + * Search Animation + */ +void AnimationManager::searchAnim(const byte *data, int animIndex, int count) { int v3; const byte *v5; int v6; @@ -933,7 +946,10 @@ void AnimationManager::RECHERCHE_ANIM(const byte *data, int animIndex, int count } while (v21 <= count && v3 != 1); } -void AnimationManager::PLAY_SEQ(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3) { +/** + * Play sequence + */ +void AnimationManager::playSequence(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3) { bool readError; int v7; byte *ptr = NULL; @@ -1042,7 +1058,7 @@ void AnimationManager::PLAY_SEQ(const Common::String &file, uint32 rate1, uint32 soundNumber = 0; do { ++soundNumber; - _vm->_soundManager.PLAY_ANM_SOUND(soundNumber); + _vm->_soundManager.playAnim_SOUND(soundNumber); memset(v10, 0, 0x13u); if (f.read(v10, 16) != 16) readError = true; @@ -1111,7 +1127,10 @@ LABEL_59: _vm->_globals.dos_free2(v10); } -void AnimationManager::PLAY_SEQ2(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3) { +/** + * Play Sequence type 2 + */ +void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3) { bool v4; int v7; byte *ptr = NULL; @@ -1183,7 +1202,7 @@ void AnimationManager::PLAY_SEQ2(const Common::String &file, uint32 rate1, uint3 while (!_vm->shouldQuit()) { if (_vm->_eventsManager.ESC_KEY == true) goto LABEL_54; - if (REDRAW_ANIM() == true) + if (redrawAnim() == true) break; _vm->_eventsManager.CONTROLE_MES(); _vm->_soundManager.VERIF_SOUND(); @@ -1203,7 +1222,7 @@ LABEL_23: v4 = false; v13 = 0; while (!_vm->shouldQuit()) { - _vm->_soundManager.PLAY_ANM_SOUND(v13++); + _vm->_soundManager.playAnim_SOUND(v13++); memset(v11, 0, 0x13u); if (f.read(v11, 16) != 16) @@ -1240,7 +1259,7 @@ LABEL_44: if (v4) { if (_vm->_globals.iRegul == 1) { while (_vm->_eventsManager.ESC_KEY != true) { - if (REDRAW_ANIM() == true) + if (redrawAnim() == true) goto LABEL_48; _vm->_eventsManager.CONTROLE_MES(); _vm->_soundManager.VERIF_SOUND(); @@ -1256,7 +1275,7 @@ LABEL_53: } while (_vm->_eventsManager.ESC_KEY != true) { _vm->_eventsManager.CONTROLE_MES(); - if (REDRAW_ANIM() == true) + if (redrawAnim() == true) goto LABEL_48; if (_vm->_eventsManager.lItCounter >= rate2) goto LABEL_33; diff --git a/engines/hopkins/anim.h b/engines/hopkins/anim.h index 316833c01c..8b7c9d7912 100644 --- a/engines/hopkins/anim.h +++ b/engines/hopkins/anim.h @@ -34,24 +34,24 @@ class HopkinsEngine; class AnimationManager { private: - int CHARGE_BANK_SPRITE1(int idx, const Common::String &filename); + int loadSpriteBank(int idx, const Common::String &filename); public: HopkinsEngine *_vm; - bool CLS_ANM; + bool clearAnimationFl; bool NO_SEQ; bool NO_COUL; public: AnimationManager(); void setParent(HopkinsEngine *vm) { _vm = vm; } - void PLAY_ANM(const Common::String &filename, uint32 rate, uint32 rate2, uint32 rate3); - void PLAY_ANM2(const Common::String &filename, uint32 a2, uint32 a3, uint32 a4); - bool REDRAW_ANIM(); - void CHARGE_ANIM(const Common::String &animName); - void CLEAR_ANIM(); - void RECHERCHE_ANIM(const byte *data, int animIndex, int count); - void PLAY_SEQ(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3); - void PLAY_SEQ2(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3); + void playAnim(const Common::String &filename, uint32 rate, uint32 rate2, uint32 rate3); + void playAnim2(const Common::String &filename, uint32 a2, uint32 a3, uint32 a4); + bool redrawAnim(); + void loadAnim(const Common::String &animName); + void clearAnim(); + void searchAnim(const byte *data, int animIndex, int count); + void playSequence(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3); + void playSequence2(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3); }; } // End of namespace Hopkins diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index b040cd712c..6b5350aed7 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -228,9 +228,9 @@ bool HopkinsEngine::runWin95Demo() { _graphicsManager.DD_UNLOCK(); _graphicsManager.Cls_Pal(); if (!_globals.CENSURE) - _animationManager.PLAY_ANM("BANQUE.ANM", 200, 28, 200); + _animationManager.playAnim("BANQUE.ANM", 200, 28, 200); else - _animationManager.PLAY_ANM("BANKUK.ANM", 200, 28, 200); + _animationManager.playAnim("BANKUK.ANM", 200, 28, 200); _soundManager.SPECIAL_SOUND = 0; _soundManager.DEL_SAMPLE(1); _soundManager.DEL_SAMPLE(2); @@ -415,7 +415,7 @@ bool HopkinsEngine::runWin95Demo() { _graphicsManager.Cls_Video(); _graphicsManager.DD_UNLOCK(); _graphicsManager.Cls_Pal(); - _animationManager.PLAY_ANM("JOUR1A.anm", 12, 12, 2000); + _animationManager.playAnim("JOUR1A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; break; @@ -442,7 +442,7 @@ bool HopkinsEngine::runWin95Demo() { _graphicsManager.Cls_Video(); _graphicsManager.DD_UNLOCK(); _graphicsManager.Cls_Pal(); - _animationManager.PLAY_ANM("JOUR4A.anm", 12, 12, 2000); + _animationManager.playAnim("JOUR4A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; break; @@ -470,7 +470,7 @@ bool HopkinsEngine::runLinuxDemo() { if (!_globals.internet) { _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("MP.ANM", 10, 16, 200); + _animationManager.playAnim("MP.ANM", 10, 16, 200); } _graphicsManager.LOAD_IMAGE("H2"); @@ -556,9 +556,9 @@ bool HopkinsEngine::runLinuxDemo() { _graphicsManager.FADE_LINUX = 2; if (!_globals.CENSURE) - _animationManager.PLAY_ANM("BANQUE.ANM", 200, 28, 200); + _animationManager.playAnim("BANQUE.ANM", 200, 28, 200); else - _animationManager.PLAY_ANM("BANKUK.ANM", 200, 28, 200); + _animationManager.playAnim("BANKUK.ANM", 200, 28, 200); _soundManager.SPECIAL_SOUND = 0; _soundManager.DEL_SAMPLE(1); _soundManager.DEL_SAMPLE(2); @@ -784,7 +784,7 @@ bool HopkinsEngine::runLinuxDemo() { _graphicsManager.DD_Unlock(); _graphicsManager.Cls_Pal(); _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("JOUR1A.anm", 12, 12, 2000); + _animationManager.playAnim("JOUR1A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; break; @@ -798,7 +798,7 @@ bool HopkinsEngine::runLinuxDemo() { _graphicsManager.DD_Unlock(); _graphicsManager.Cls_Pal(); _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("JOUR3A.anm", 12, 12, 2000); + _animationManager.playAnim("JOUR3A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; break; @@ -812,7 +812,7 @@ bool HopkinsEngine::runLinuxDemo() { _graphicsManager.DD_Unlock(); _graphicsManager.Cls_Pal(); _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("JOUR4A.anm", 12, 12, 2000); + _animationManager.playAnim("JOUR4A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; break; @@ -840,7 +840,7 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.DD_UNLOCK(); _graphicsManager.Cls_Pal(); - _animationManager.PLAY_ANM("MP.ANM", 10, 16, 200); + _animationManager.playAnim("MP.ANM", 10, 16, 200); _graphicsManager.FADE_OUTW(); if (!_eventsManager.ESC_KEY) INTRORUN(); @@ -899,9 +899,9 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.DD_UNLOCK(); _graphicsManager.Cls_Pal(); if (!_globals.CENSURE) - _animationManager.PLAY_ANM("BANQUE.ANM", 200, 28, 200); + _animationManager.playAnim("BANQUE.ANM", 200, 28, 200); else - _animationManager.PLAY_ANM("BANKUK.ANM", 200, 28, 200); + _animationManager.playAnim("BANKUK.ANM", 200, 28, 200); _soundManager.SPECIAL_SOUND = 0; _soundManager.DEL_SAMPLE(1); _soundManager.DEL_SAMPLE(2); @@ -1056,9 +1056,9 @@ bool HopkinsEngine::runWin95full() { _soundManager.WSOUND_OFF(); _soundManager.WSOUND(29); if (_globals.SVGA == 2) - _animationManager.PLAY_ANM("PURG1A.ANM", 12, 18, 50); + _animationManager.playAnim("PURG1A.ANM", 12, 18, 50); else if (_globals.SVGA == 1) - _animationManager.PLAY_ANM("PURG1.ANM", 12, 18, 50); + _animationManager.playAnim("PURG1.ANM", 12, 18, 50); _graphicsManager.FADE_OUTS(); _globals.iRegul = 0; } @@ -1099,9 +1099,9 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.Cls_Pal(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) - _animationManager.PLAY_ANM("PURG2A.ANM", 12, 18, 50); + _animationManager.playAnim("PURG2A.ANM", 12, 18, 50); else if (_globals.SVGA == 1) - _animationManager.PLAY_ANM("PURG2.ANM", 12, 18, 50); + _animationManager.playAnim("PURG2.ANM", 12, 18, 50); _graphicsManager.FADE_OUTS(); _globals.iRegul = 0; } @@ -1566,9 +1566,9 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.Cls_Pal(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) - _animationManager.PLAY_ANM("PURG1A.ANM", 12, 18, 50); + _animationManager.playAnim("PURG1A.ANM", 12, 18, 50); else if (_globals.SVGA == 1) - _animationManager.PLAY_ANM("PURG1.ANM", 12, 18, 50); + _animationManager.playAnim("PURG1.ANM", 12, 18, 50); _graphicsManager.FADE_OUTS(); _globals.iRegul = 0; } @@ -1643,7 +1643,7 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.Cls_Video(); _graphicsManager.DD_UNLOCK(); _graphicsManager.Cls_Pal(); - _animationManager.PLAY_ANM("JOUR1A.anm", 12, 12, 2000); + _animationManager.playAnim("JOUR1A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; break; @@ -1655,7 +1655,7 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.Cls_Video(); _graphicsManager.DD_UNLOCK(); _graphicsManager.Cls_Pal(); - _animationManager.PLAY_ANM("JOUR3A.anm", 12, 12, 2000); + _animationManager.playAnim("JOUR3A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; break; @@ -1667,7 +1667,7 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.Cls_Video(); _graphicsManager.DD_UNLOCK(); _graphicsManager.Cls_Pal(); - _animationManager.PLAY_ANM("JOUR4A.anm", 12, 12, 2000); + _animationManager.playAnim("JOUR4A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; break; @@ -1779,9 +1779,9 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.Cls_Pal(); _graphicsManager.FADE_LINUX = 2; if (!_globals.CENSURE) - _animationManager.PLAY_ANM("BANQUE.ANM", 200, 28, 200); + _animationManager.playAnim("BANQUE.ANM", 200, 28, 200); else - _animationManager.PLAY_ANM("BANKUK.ANM", 200, 28, 200); + _animationManager.playAnim("BANKUK.ANM", 200, 28, 200); _soundManager.SPECIAL_SOUND = 0; _soundManager.DEL_SAMPLE(1); _soundManager.DEL_SAMPLE(2); @@ -1935,9 +1935,9 @@ bool HopkinsEngine::runLinuxFull() { _soundManager.WSOUND(29); _graphicsManager.FADE_LINUX = 2; if (_globals.SVGA == 2) - _animationManager.PLAY_ANM("PURG1A.ANM", 12, 18, 50); + _animationManager.playAnim("PURG1A.ANM", 12, 18, 50); else if (_globals.SVGA == 1) - _animationManager.PLAY_ANM("PURG1.ANM", 12, 18, 50); + _animationManager.playAnim("PURG1.ANM", 12, 18, 50); _globals.iRegul = 0; } break; @@ -1978,9 +1978,9 @@ bool HopkinsEngine::runLinuxFull() { _soundManager.WSOUND(6); _graphicsManager.FADE_LINUX = 2; if (_globals.SVGA == 2) - _animationManager.PLAY_ANM("PURG2A.ANM", 12, 18, 50); + _animationManager.playAnim("PURG2A.ANM", 12, 18, 50); else if (_globals.SVGA == 1) - _animationManager.PLAY_ANM("PURG2.ANM", 12, 18, 50); + _animationManager.playAnim("PURG2.ANM", 12, 18, 50); _globals.iRegul = 0; } break; @@ -2445,9 +2445,9 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.Cls_Pal(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) - _animationManager.PLAY_ANM("PURG1A.ANM", 12, 18, 50); + _animationManager.playAnim("PURG1A.ANM", 12, 18, 50); else if (_globals.SVGA == 1) - _animationManager.PLAY_ANM("PURG1.ANM", 12, 18, 50); + _animationManager.playAnim("PURG1.ANM", 12, 18, 50); _graphicsManager.FADE_OUTS(); _globals.iRegul = 0; } @@ -2534,7 +2534,7 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.DD_Unlock(); _graphicsManager.Cls_Pal(); _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("JOUR1A.anm", 12, 12, 2000); + _animationManager.playAnim("JOUR1A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; break; @@ -2547,7 +2547,7 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.DD_Unlock(); _graphicsManager.Cls_Pal(); _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("JOUR3A.anm", 12, 12, 2000); + _animationManager.playAnim("JOUR3A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; break; @@ -2560,7 +2560,7 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.DD_Unlock(); _graphicsManager.Cls_Pal(); _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("JOUR4A.anm", 12, 12, 2000); + _animationManager.playAnim("JOUR4A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; break; @@ -2704,15 +2704,15 @@ void HopkinsEngine::INTRORUN() { _globals.iRegul = 1; _eventsManager.VBL(); _soundManager.WSOUND(16); - _animationManager.CLS_ANM = true; - _animationManager.PLAY_ANM("J1.anm", 12, 12, 50); + _animationManager.clearAnimationFl = true; + _animationManager.playAnim("J1.anm", 12, 12, 50); if (!_eventsManager.ESC_KEY) { _soundManager.VOICE_MIX(1, 3); - _animationManager.PLAY_ANM("J2.anm", 12, 12, 50); + _animationManager.playAnim("J2.anm", 12, 12, 50); if (!_eventsManager.ESC_KEY) { _soundManager.VOICE_MIX(2, 3); - _animationManager.PLAY_ANM("J3.anm", 12, 12, 50); + _animationManager.playAnim("J3.anm", 12, 12, 50); if (!_eventsManager.ESC_KEY) { _soundManager.VOICE_MIX(3, 3); @@ -2765,7 +2765,7 @@ void HopkinsEngine::INTRORUN() { _graphicsManager.no_scroll = 0; _graphicsManager.LOAD_IMAGE("intro2"); _graphicsManager.SCROLL_ECRAN(0); - _animationManager.CHARGE_ANIM("INTRO2"); + _animationManager.loadAnim("INTRO2"); _graphicsManager.VISU_ALL(); _soundManager.WSOUND(23); _objectsManager.BOBANIM_OFF(3); @@ -2803,7 +2803,7 @@ void HopkinsEngine::INTRORUN() { _soundManager.SPECIAL_SOUND = 5; _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("ELEC.ANM", 10, 26, 200); + _animationManager.playAnim("ELEC.ANM", 10, 26, 200); if (shouldQuit()) return; @@ -2812,7 +2812,7 @@ void HopkinsEngine::INTRORUN() { if (!_eventsManager.ESC_KEY) { _graphicsManager.LOAD_IMAGE("intro2"); _graphicsManager.SCROLL_ECRAN(0); - _animationManager.CHARGE_ANIM("INTRO2"); + _animationManager.loadAnim("INTRO2"); _graphicsManager.VISU_ALL(); _soundManager.WSOUND(23); _objectsManager.BOBANIM_OFF(3); @@ -2896,29 +2896,29 @@ void HopkinsEngine::INTRORUN() { _graphicsManager.FADE_OUTW(); _graphicsManager.FIN_VISU(); - _animationManager.CLS_ANM = true; + _animationManager.clearAnimationFl = true; _soundManager.WSOUND(3); _soundManager.SPECIAL_SOUND = 1; - _animationManager.PLAY_ANM("INTRO1.anm", 10, 24, 18); + _animationManager.playAnim("INTRO1.anm", 10, 24, 18); if (shouldQuit()) return; _soundManager.SPECIAL_SOUND = 0; if (!_eventsManager.ESC_KEY) { - _animationManager.PLAY_ANM("INTRO2.anm", 10, 24, 18); + _animationManager.playAnim("INTRO2.anm", 10, 24, 18); if (shouldQuit()) return; if (!_eventsManager.ESC_KEY) { - _animationManager.PLAY_ANM("INTRO3.anm", 10, 24, 200); + _animationManager.playAnim("INTRO3.anm", 10, 24, 200); if (shouldQuit()) return; if (!_eventsManager.ESC_KEY) { - _animationManager.CLS_ANM = false; + _animationManager.clearAnimationFl = false; _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("J4.anm", 12, 12, 1000); + _animationManager.playAnim("J4.anm", 12, 12, 1000); } } } @@ -2987,13 +2987,13 @@ void HopkinsEngine::BOOM() { _soundManager.SPECIAL_SOUND = 199; _graphicsManager.FADE_LINUX = 2; if (_globals.SVGA == 1) - _animationManager.PLAY_ANM("BOMBE2.ANM", 50, 14, 500); + _animationManager.playAnim("BOMBE2.ANM", 50, 14, 500); else if (_globals.SVGA == 2) - _animationManager.PLAY_ANM("BOMBE2A.ANM", 50, 14, 500); + _animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500); _soundManager.SPECIAL_SOUND = 0; _graphicsManager.LOAD_IMAGE("IM15"); - _animationManager.CHARGE_ANIM("ANIM15"); + _animationManager.loadAnim("ANIM15"); _graphicsManager.VISU_ALL(); _objectsManager.BOBANIM_OFF(7); _globals.BPP_NOAFF = true; @@ -3069,7 +3069,7 @@ void HopkinsEngine::INCENDIE() { _globals.DESACTIVE_INVENT = true; _globals.iRegul = 1; _graphicsManager.LOAD_IMAGE("IM71"); - _animationManager.CHARGE_ANIM("ANIM71"); + _animationManager.loadAnim("ANIM71"); _graphicsManager.SETCOLOR3(252, 100, 100, 100); _graphicsManager.SETCOLOR3(253, 100, 100, 100); _graphicsManager.SETCOLOR3(251, 100, 100, 100); @@ -3107,65 +3107,65 @@ void HopkinsEngine::BASE() { _graphicsManager.Cls_Video(); _graphicsManager.DD_Unlock(); _graphicsManager.Cls_Pal(); - _animationManager.CLS_ANM = true; + _animationManager.clearAnimationFl = true; _soundManager.WSOUND(25); if (_globals.SVGA == 1) { - _animationManager.PLAY_ANM("base00.anm", 10, 18, 18); + _animationManager.playAnim("base00.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base05.anm", 10, 18, 18); + _animationManager.playAnim("base05.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base10.anm", 10, 18, 18); + _animationManager.playAnim("base10.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base20.anm", 10, 18, 18); + _animationManager.playAnim("base20.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base30.anm", 10, 18, 18); + _animationManager.playAnim("base30.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base40.anm", 10, 18, 18); + _animationManager.playAnim("base40.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base50.anm", 10, 18, 18); + _animationManager.playAnim("base50.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("OC00.anm", 10, 18, 18); + _animationManager.playAnim("OC00.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("OC05.anm", 10, 18, 18); + _animationManager.playAnim("OC05.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("OC10.anm", 10, 18, 18); + _animationManager.playAnim("OC10.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("OC20.anm", 10, 18, 18); + _animationManager.playAnim("OC20.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) { _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("OC30.anm", 10, 18, 18); + _animationManager.playAnim("OC30.anm", 10, 18, 18); } } else if (_globals.SVGA == 2) { - _animationManager.PLAY_ANM("base00a.anm", 10, 18, 18); + _animationManager.playAnim("base00a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base05a.anm", 10, 18, 18); + _animationManager.playAnim("base05a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base10a.anm", 10, 18, 18); + _animationManager.playAnim("base10a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base20a.anm", 10, 18, 18); + _animationManager.playAnim("base20a.anm", 10, 18, 18); // CHECKME: The original code was doing the opposite test, which looks like a bug. if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base30a.anm", 10, 18, 18); + _animationManager.playAnim("base30a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base40a.anm", 10, 18, 18); + _animationManager.playAnim("base40a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("base50a.anm", 10, 18, 18); + _animationManager.playAnim("base50a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("OC00a.anm", 10, 18, 18); + _animationManager.playAnim("OC00a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("OC05a.anm", 10, 18, 18); + _animationManager.playAnim("OC05a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("OC10a.anm", 10, 18, 18); + _animationManager.playAnim("OC10a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("OC20a.anm", 10, 18, 18); + _animationManager.playAnim("OC20a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) { _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("OC30a.anm", 10, 18, 18); + _animationManager.playAnim("OC30a.anm", 10, 18, 18); } } _eventsManager.ESC_KEY = false; - _animationManager.CLS_ANM = false; + _animationManager.clearAnimationFl = false; _globals.SORTIE = 85; } @@ -3180,10 +3180,10 @@ void HopkinsEngine::BASED() { _globals.DESACTIVE_INVENT = true; _animationManager.NO_COUL = true; _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_SEQ("abase.seq", 50, 15, 50); + _animationManager.playSequence("abase.seq", 50, 15, 50); _animationManager.NO_COUL = false; _graphicsManager.LOAD_IMAGE("IM92"); - _animationManager.CHARGE_ANIM("ANIM92"); + _animationManager.loadAnim("ANIM92"); _graphicsManager.VISU_ALL(); _objectsManager.INILINK("IM92"); _globals.BPP_NOAFF = true; @@ -3222,7 +3222,7 @@ void HopkinsEngine::JOUE_FIN() { _globals.AFFIVBL = false; _soundManager.CHARGE_SAMPLE(1, "SOUND90.WAV"); _graphicsManager.LOAD_IMAGE("IM100"); - _animationManager.CHARGE_ANIM("ANIM100"); + _animationManager.loadAnim("ANIM100"); _graphicsManager.VISU_ALL(); _eventsManager.MOUSE_ON(); _objectsManager.BOBANIM_OFF(7); @@ -3292,7 +3292,7 @@ void HopkinsEngine::JOUE_FIN() { _soundManager.SPECIAL_SOUND = 200; _soundManager.VBL_MERDE = true; _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("BERM.ANM", 100, 24, 300); + _animationManager.playAnim("BERM.ANM", 100, 24, 300); _graphicsManager.FIN_VISU(); _soundManager.DEL_SAMPLE(1); _graphicsManager.LOAD_IMAGE("PLAN3"); @@ -3309,17 +3309,17 @@ void HopkinsEngine::JOUE_FIN() { _globals.iRegul = 1; _soundManager.SPECIAL_SOUND = 0; _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("JOUR2A.anm", 12, 12, 1000); + _animationManager.playAnim("JOUR2A.anm", 12, 12, 1000); _soundManager.WSOUND(11); _graphicsManager.DD_Lock(); _graphicsManager.Cls_Video(); _graphicsManager.DD_Unlock(); _graphicsManager.Cls_Pal(); - _animationManager.PLAY_ANM("FF1a.anm", 18, 18, 9); - _animationManager.PLAY_ANM("FF1a.anm", 9, 18, 9); - _animationManager.PLAY_ANM("FF1a.anm", 9, 18, 18); - _animationManager.PLAY_ANM("FF1a.anm", 9, 18, 9); - _animationManager.PLAY_ANM("FF2a.anm", 24, 24, 100); + _animationManager.playAnim("FF1a.anm", 18, 18, 9); + _animationManager.playAnim("FF1a.anm", 9, 18, 9); + _animationManager.playAnim("FF1a.anm", 9, 18, 18); + _animationManager.playAnim("FF1a.anm", 9, 18, 9); + _animationManager.playAnim("FF2a.anm", 24, 24, 100); Credits(); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -3328,7 +3328,7 @@ void HopkinsEngine::JOUE_FIN() { } else { _soundManager.SPECIAL_SOUND = 200; _soundManager.VBL_MERDE = true; - _animationManager.PLAY_ANM2("BERM.ANM", 100, 24, 300); + _animationManager.playAnim2("BERM.ANM", 100, 24, 300); _objectsManager.BOBANIM_OFF(7); _objectsManager.BOBANIM_ON(8); _globals.NOPARLE = true; @@ -3353,7 +3353,7 @@ void HopkinsEngine::JOUE_FIN() { _soundManager.SPECIAL_SOUND = 0; _dialogsManager.VIRE_INVENT = false; _globals.DESACTIVE_INVENT = false; - _animationManager.PLAY_ANM("JOUR4A.anm", 12, 12, 1000); + _animationManager.playAnim("JOUR4A.anm", 12, 12, 1000); _globals.iRegul = 0; _globals.SORTIE = 300; } @@ -3372,75 +3372,75 @@ void HopkinsEngine::AVION() { _graphicsManager.DD_Unlock(); _graphicsManager.Cls_Pal(); - _animationManager.CLS_ANM = false; + _animationManager.clearAnimationFl = false; if (_globals.SVGA == 1) { - _animationManager.PLAY_ANM("aerop00.anm", 10, 18, 18); + _animationManager.playAnim("aerop00.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop10.anm", 10, 18, 18); + _animationManager.playAnim("aerop10.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop20.anm", 10, 18, 18); + _animationManager.playAnim("aerop20.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop30.anm", 10, 18, 18); + _animationManager.playAnim("aerop30.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop40.anm", 10, 18, 18); + _animationManager.playAnim("aerop40.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop50.anm", 10, 18, 18); + _animationManager.playAnim("aerop50.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop60.anm", 10, 18, 18); + _animationManager.playAnim("aerop60.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop70.anm", 10, 18, 18); + _animationManager.playAnim("aerop70.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans00.anm", 10, 18, 18); + _animationManager.playAnim("trans00.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans10.anm", 10, 18, 18); + _animationManager.playAnim("trans10.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans15.anm", 10, 18, 18); + _animationManager.playAnim("trans15.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans20.anm", 10, 18, 18); + _animationManager.playAnim("trans20.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans30.anm", 10, 18, 18); + _animationManager.playAnim("trans30.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans40.anm", 10, 18, 18); + _animationManager.playAnim("trans40.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) { _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("PARA00.anm", 9, 9, 9); + _animationManager.playAnim("PARA00.anm", 9, 9, 9); } } else if (_globals.SVGA == 2) { - _animationManager.PLAY_ANM("aerop00a.anm", 10, 18, 18); + _animationManager.playAnim("aerop00a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("serop10a.anm", 10, 18, 18); + _animationManager.playAnim("serop10a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop20a.anm", 10, 18, 18); + _animationManager.playAnim("aerop20a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop30a.anm", 10, 18, 18); + _animationManager.playAnim("aerop30a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop40a.anm", 10, 18, 18); + _animationManager.playAnim("aerop40a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop50a.anm", 10, 18, 18); + _animationManager.playAnim("aerop50a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop60a.anm", 10, 18, 18); + _animationManager.playAnim("aerop60a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("aerop70a.anm", 10, 18, 18); + _animationManager.playAnim("aerop70a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans00a.anm", 10, 18, 18); + _animationManager.playAnim("trans00a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans10a.anm", 10, 18, 18); + _animationManager.playAnim("trans10a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans15a.anm", 10, 18, 18); + _animationManager.playAnim("trans15a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans20a.anm", 10, 18, 18); + _animationManager.playAnim("trans20a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans30a.anm", 10, 18, 18); + _animationManager.playAnim("trans30a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) - _animationManager.PLAY_ANM("trans40a.anm", 10, 18, 18); + _animationManager.playAnim("trans40a.anm", 10, 18, 18); if (!_eventsManager.ESC_KEY) { _graphicsManager.FADE_LINUX = 2; - _animationManager.PLAY_ANM("PARA00a.anm", 9, 9, 9); + _animationManager.playAnim("PARA00a.anm", 9, 9, 9); } } _eventsManager.ESC_KEY = 0; - _animationManager.CLS_ANM = 0; + _animationManager.clearAnimationFl = false; } int HopkinsEngine::PWBASE() { diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index e0fc5fd3ec..e7d4822098 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -2572,7 +2572,7 @@ void ObjectsManager::PLAN_BETA() { CHARGE_ZONE("PLAN.ZO2"); _vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "VOITURE.SPR"); sprite_ptr = _vm->_fileManager.loadFile(_vm->_globals.NFICHIER); - _vm->_animationManager.CHARGE_ANIM("PLAN"); + _vm->_animationManager.loadAnim("PLAN"); _vm->_graphicsManager.VISU_ALL(); _vm->_graphicsManager.INI_ECRAN2("PLAN"); v2 = 0; @@ -2978,7 +2978,7 @@ void ObjectsManager::CLEAR_ECRAN() { _vm->_fontManager.TEXTE_OFF(5); _vm->_fontManager.TEXTE_OFF(9); _vm->_globals.CLEAR_VBOB(); - _vm->_animationManager.CLEAR_ANIM(); + _vm->_animationManager.clearAnim(); _vm->_linesManager.CLEAR_ZONE(); _vm->_linesManager.RESET_OBSTACLE(); _vm->_globals.RESET_CACHE(); @@ -4205,8 +4205,8 @@ void ObjectsManager::SPECIAL_JEU() { _vm->_soundManager.SPECIAL_SOUND = 198; PERSO_ON = true; _vm->_animationManager.NO_SEQ = true; - _vm->_animationManager.CLS_ANM = false; - _vm->_animationManager.PLAY_ANM("otage.ANM", 1, 24, 500); + _vm->_animationManager.clearAnimationFl = false; + _vm->_animationManager.playAnim("otage.ANM", 1, 24, 500); _vm->_animationManager.NO_SEQ = false; _vm->_soundManager.SPECIAL_SOUND = 0; _vm->_globals.NECESSAIRE = true; @@ -5460,7 +5460,7 @@ void ObjectsManager::TEST_FORET(int a1, int a2, int a3, int a4, int a5, int a6) } if (_vm->_globals.SAUVEGARDE->data[v6] == 3) { _vm->_graphicsManager.FADE_LINUX = 2; - _vm->_animationManager.PLAY_ANM("CREVE2.ANM", 100, 24, 500); + _vm->_animationManager.playAnim("CREVE2.ANM", 100, 24, 500); _vm->_globals.SORTIE = 150; _vm->_graphicsManager.NOFADE = true; BOB_OFF(1); @@ -5517,7 +5517,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo if (!linkFile.empty()) INILINK(linkFile); if (!animFile.empty()) - _vm->_animationManager.CHARGE_ANIM(animFile); + _vm->_animationManager.loadAnim(animFile); _vm->_graphicsManager.VISU_ALL(); if (!s4.empty()) { if (!_vm->_globals.NOSPRECRAN) @@ -5546,7 +5546,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo _vm->_globals.BPP_NOAFF = false; _vm->_graphicsManager.FADE_INW(); if (_vm->_globals.ECRAN == 61) { - _vm->_animationManager.PLAY_SEQ("OUVRE.SEQ", 10, 4, 10); + _vm->_animationManager.playSequence("OUVRE.SEQ", 10, 4, 10); BOBANIM_OFF(3); _vm->_globals.NOT_VERIF = 1; g_old_x = XSPR(0); @@ -5620,7 +5620,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm if (!linkFile.empty()) INILINK(linkFile); if (!animFile.empty()) { - _vm->_animationManager.CHARGE_ANIM(animFile); + _vm->_animationManager.loadAnim(animFile); _vm->_graphicsManager.VISU_ALL(); } if (!s4.empty()) { diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index e9eca6cb5d..4d4c0e27be 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -553,9 +553,9 @@ LABEL_1141: _vm->_graphicsManager.FADE_LINUX = 2; _vm->_graphicsManager.FADESPD = 1; if (_vm->_globals.SVGA == 2) - _vm->_animationManager.PLAY_ANM("BOMBE1A.ANM", 100, 18, 100); + _vm->_animationManager.playAnim("BOMBE1A.ANM", 100, 18, 100); else if (_vm->_globals.SVGA == 1) - _vm->_animationManager.PLAY_ANM("BOMBE1.ANM", 100, 18, 100); + _vm->_animationManager.playAnim("BOMBE1.ANM", 100, 18, 100); } _vm->_graphicsManager.LOAD_IMAGE("BOMBEB"); _vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100); @@ -585,9 +585,9 @@ LABEL_1141: _vm->_soundManager.SPECIAL_SOUND = 199; _vm->_graphicsManager.FADE_LINUX = 2; if (_vm->_globals.SVGA == 1) - _vm->_animationManager.PLAY_ANM("BOMBE2.ANM", 50, 14, 500); + _vm->_animationManager.playAnim("BOMBE2.ANM", 50, 14, 500); else if (_vm->_globals.SVGA == 2) - _vm->_animationManager.PLAY_ANM("BOMBE2A.ANM", 50, 14, 500); + _vm->_animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500); _vm->_soundManager.SPECIAL_SOUND = 0; memset(_vm->_graphicsManager.VESA_BUFFER, 0, 0x96000u); _vm->_graphicsManager.NOFADE = true; @@ -600,9 +600,9 @@ LABEL_1141: _vm->_objectsManager.OPTI_ONE(1, 0, 16, 4); _vm->_soundManager.SPECIAL_SOUND = 199; if (_vm->_globals.SVGA == 1) - _vm->_animationManager.PLAY_ANM("BOMBE2.ANM", 50, 14, 500); + _vm->_animationManager.playAnim("BOMBE2.ANM", 50, 14, 500); else if (_vm->_globals.SVGA == 2) - _vm->_animationManager.PLAY_ANM("BOMBE2A.ANM", 50, 14, 500); + _vm->_animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500); _vm->_soundManager.SPECIAL_SOUND = 0; _vm->_graphicsManager.NOFADE = true; memset(_vm->_graphicsManager.VESA_BUFFER, 0, 0x96000u); @@ -617,9 +617,9 @@ LABEL_1141: _vm->_soundManager.SPECIAL_SOUND = 199; _vm->_graphicsManager.FADE_LINUX = 2; if (_vm->_globals.SVGA == 1) - _vm->_animationManager.PLAY_ANM("BOMBE2.ANM", 50, 14, 500); + _vm->_animationManager.playAnim("BOMBE2.ANM", 50, 14, 500); else if (_vm->_globals.SVGA == 2) - _vm->_animationManager.PLAY_ANM("BOMBE2A.ANM", 50, 14, 500); + _vm->_animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500); _vm->_soundManager.SPECIAL_SOUND = 0; _vm->_graphicsManager.NOFADE = true; memset(_vm->_graphicsManager.VESA_BUFFER, 0, 0x96000u); @@ -632,9 +632,9 @@ LABEL_1141: _vm->_objectsManager.OPTI_ONE(6, 0, 16, 4); if ((_vm->getPlatform() != Common::kPlatformWindows) || !_vm->getIsDemo()) { if (_vm->_globals.SVGA == 1) - _vm->_animationManager.PLAY_ANM("BOMBE3.ANM", 50, 14, 500); + _vm->_animationManager.playAnim("BOMBE3.ANM", 50, 14, 500); else if (_vm->_globals.SVGA == 2) - _vm->_animationManager.PLAY_ANM("BOMBE3A.ANM", 50, 14, 500); + _vm->_animationManager.playAnim("BOMBE3A.ANM", 50, 14, 500); memset(_vm->_graphicsManager.VESA_BUFFER, 0, 0x96000u); } _vm->_globals.SORTIE = 6; @@ -643,7 +643,7 @@ LABEL_1141: if (!_vm->_globals.internet) { memcpy(_vm->_graphicsManager.OLD_PAL, _vm->_graphicsManager.Palette, 0x301u); v1 = _vm->_graphicsManager.OLD_PAL[769]; - _vm->_animationManager.PLAY_ANM2("PLAN.ANM", 50, 10, 800); + _vm->_animationManager.playAnim2("PLAN.ANM", 50, 10, 800); } _vm->_globals.NBBLOC = 0; } @@ -705,10 +705,10 @@ LABEL_1141: } else { _vm->_soundManager.PLAY_SOUND("SOUND17.WAV"); _vm->_graphicsManager.FADE_LINUX = 2; - _vm->_animationManager.PLAY_SEQ2("HELICO.SEQ", 10, 4, 10); + _vm->_animationManager.playSequence2("HELICO.SEQ", 10, 4, 10); } - _vm->_animationManager.CHARGE_ANIM("otage"); + _vm->_animationManager.loadAnim("otage"); _vm->_graphicsManager.LOAD_IMAGE("IM05"); _vm->_graphicsManager.VISU_ALL(); @@ -734,10 +734,10 @@ LABEL_1141: if (!_vm->_globals.CENSURE) { _vm->_soundManager.SPECIAL_SOUND = 16; _vm->_graphicsManager.FADE_LINUX = 2; - _vm->_animationManager.PLAY_ANM("EGORGE.ANM", 50, 28, 500); + _vm->_animationManager.playAnim("EGORGE.ANM", 50, 28, 500); _vm->_soundManager.SPECIAL_SOUND = 0; } - _vm->_animationManager.CHARGE_ANIM("ASCEN"); + _vm->_animationManager.loadAnim("ASCEN"); _vm->_eventsManager.MOUSE_OFF(); _vm->_graphicsManager.LOAD_IMAGE("ASCEN"); _vm->_graphicsManager.VISU_ALL(); @@ -760,7 +760,7 @@ LABEL_1141: _vm->_soundManager.SPECIAL_SOUND = 14; _vm->_graphicsManager.FADE_LINUX = 2; - _vm->_animationManager.PLAY_SEQ2("ASSOM.SEQ", 10, 4, 500); + _vm->_animationManager.playSequence2("ASSOM.SEQ", 10, 4, 500); _vm->_soundManager.SPECIAL_SOUND = 0; if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo()) @@ -787,7 +787,7 @@ LABEL_1141: } if (v76 == 37) { _vm->_graphicsManager.FADE_LINUX = 2; - _vm->_animationManager.PLAY_SEQ2("corde.SEQ", 32, 32, 100); + _vm->_animationManager.playSequence2("corde.SEQ", 32, 32, 100); _vm->_graphicsManager.NOFADE = true; } if (v76 == 38) { @@ -795,10 +795,10 @@ LABEL_1141: _vm->_soundManager.CHARGE_SAMPLE(2, "SOUND42.WAV"); _vm->_soundManager.CHARGE_SAMPLE(3, "SOUND41.WAV"); _vm->_soundManager.SPECIAL_SOUND = 17; - _vm->_animationManager.PLAY_SEQ("grenade.SEQ", 1, 32, 100); + _vm->_animationManager.playSequence("grenade.SEQ", 1, 32, 100); _vm->_soundManager.SPECIAL_SOUND = 0; _vm->_graphicsManager.FADE_LINUX = 2; - _vm->_animationManager.PLAY_ANM("CREVE17.ANM", 24, 24, 200); + _vm->_animationManager.playAnim("CREVE17.ANM", 24, 24, 200); _vm->_soundManager.DEL_SAMPLE(1); _vm->_soundManager.DEL_SAMPLE(2); _vm->_soundManager.DEL_SAMPLE(3); @@ -1229,11 +1229,11 @@ LABEL_1141: if (v76 == 90) { _vm->_soundManager.PLAY_SOUND("SOUND52.WAV"); if (!_vm->_globals.SAUVEGARDE->data[svField186]) { - _vm->_animationManager.PLAY_SEQ("CIB5A.SEQ", 1, 12, 1); + _vm->_animationManager.playSequence("CIB5A.SEQ", 1, 12, 1); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 155, 29, 0); } if (_vm->_globals.SAUVEGARDE->data[svField186] == 1) { - _vm->_animationManager.PLAY_SEQ("CIB5C.SEQ", 1, 12, 1); + _vm->_animationManager.playSequence("CIB5C.SEQ", 1, 12, 1); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 155, 29, 0); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 329, 87, 2); } @@ -1241,11 +1241,11 @@ LABEL_1141: if (v76 == 91) { _vm->_soundManager.PLAY_SOUND("SOUND52.WAV"); if (!_vm->_globals.SAUVEGARDE->data[svField186]) { - _vm->_animationManager.PLAY_SEQ("CIB5B.SEQ", 1, 12, 1); + _vm->_animationManager.playSequence("CIB5B.SEQ", 1, 12, 1); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 155, 29, 5); } if (_vm->_globals.SAUVEGARDE->data[svField186] == 1) { - _vm->_animationManager.PLAY_SEQ("CIB5D.SEQ", 1, 12, 1); + _vm->_animationManager.playSequence("CIB5D.SEQ", 1, 12, 1); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 155, 29, 5); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 283, 160, 6); } @@ -1253,11 +1253,11 @@ LABEL_1141: if (v76 == 92) { _vm->_soundManager.PLAY_SOUND("SOUND52.WAV"); if (!_vm->_globals.SAUVEGARDE->data[svField184]) { - _vm->_animationManager.PLAY_SEQ("CIB6A.SEQ", 1, 12, 1); + _vm->_animationManager.playSequence("CIB6A.SEQ", 1, 12, 1); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 155, 29, 0); } if (_vm->_globals.SAUVEGARDE->data[svField184] == 1) { - _vm->_animationManager.PLAY_SEQ("CIB6C.SEQ", 1, 12, 1); + _vm->_animationManager.playSequence("CIB6C.SEQ", 1, 12, 1); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 155, 29, 0); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 293, 139, 3); } @@ -1265,11 +1265,11 @@ LABEL_1141: if (v76 == 93) { _vm->_soundManager.PLAY_SOUND("SOUND52.WAV"); if (!_vm->_globals.SAUVEGARDE->data[svField184]) { - _vm->_animationManager.PLAY_SEQ("CIB6B.SEQ", 1, 12, 1); + _vm->_animationManager.playSequence("CIB6B.SEQ", 1, 12, 1); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 155, 29, 5); } if (_vm->_globals.SAUVEGARDE->data[svField184] == 1) { - _vm->_animationManager.PLAY_SEQ("CIB6D.SEQ", 1, 12, 1); + _vm->_animationManager.playSequence("CIB6D.SEQ", 1, 12, 1); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 155, 29, 5); _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 283, 161, 8); } @@ -1478,7 +1478,7 @@ LABEL_1141: if (v76 == 210) { _vm->_animationManager.NO_SEQ = true; _vm->_soundManager.SPECIAL_SOUND = 210; - _vm->_animationManager.PLAY_SEQ2("SECRET1.SEQ", 1, 12, 1); + _vm->_animationManager.playSequence2("SECRET1.SEQ", 1, 12, 1); _vm->_soundManager.SPECIAL_SOUND = 0; _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 192, 152, 0); _vm->_objectsManager.BOBANIM_ON(9); @@ -1500,7 +1500,7 @@ LABEL_1141: _vm->_animationManager.NO_SEQ = true; _vm->_globals.NO_VISU = false; _vm->_soundManager.SPECIAL_SOUND = 211; - _vm->_animationManager.PLAY_SEQ("SECRET2.SEQ", 1, 12, 100); + _vm->_animationManager.playSequence("SECRET2.SEQ", 1, 12, 100); _vm->_soundManager.SPECIAL_SOUND = 0; _vm->_animationManager.NO_SEQ = false; _vm->_graphicsManager.NOFADE = true; @@ -1525,7 +1525,7 @@ LABEL_1141: if (_vm->_globals.SAUVEGARDE->data[svField6] != _vm->_globals.SAUVEGARDE->data[svField401]) { _vm->_soundManager.SPECIAL_SOUND = 208; _vm->_eventsManager.NOESC = true; - _vm->_animationManager.PLAY_SEQ("SORT.SEQ", 10, 4, 10); + _vm->_animationManager.playSequence("SORT.SEQ", 10, 4, 10); _vm->_eventsManager.NOESC = false; _vm->_soundManager.SPECIAL_SOUND = 0; } @@ -1702,7 +1702,7 @@ LABEL_1141: } if (v76 == 229) { _vm->_soundManager.SPECIAL_SOUND = 229; - _vm->_animationManager.PLAY_SEQ("MUR.SEQ", 1, 12, 1); + _vm->_animationManager.playSequence("MUR.SEQ", 1, 12, 1); _vm->_soundManager.SPECIAL_SOUND = 0; _vm->_graphicsManager.AFFICHE_SPEED(_vm->_globals.SPRITE_ECRAN, 340, 157, 2); } @@ -1997,7 +1997,7 @@ LABEL_1141: _vm->_fontManager.TEXTE_OFF(9); _vm->_graphicsManager.FIN_VISU(); _vm->_graphicsManager.LOAD_IMAGE("IM20f"); - _vm->_animationManager.CHARGE_ANIM("ANIM20f"); + _vm->_animationManager.loadAnim("ANIM20f"); _vm->_graphicsManager.VISU_ALL(); _vm->_eventsManager.MOUSE_OFF(); _vm->_graphicsManager.FADE_INW(); @@ -2093,9 +2093,9 @@ LABEL_1141: _vm->_talkManager.PARLER_PERSO("tourist1.pe2"); _vm->_globals.NOPARLE = false; if (_vm->_globals.SVGA == 1) - _vm->_animationManager.PLAY_ANM2("T421.ANM", 100, 14, 500); + _vm->_animationManager.playAnim2("T421.ANM", 100, 14, 500); else if (_vm->_globals.SVGA == 2) - _vm->_animationManager.PLAY_ANM2("T421a.ANM", 100, 14, 500); + _vm->_animationManager.playAnim2("T421a.ANM", 100, 14, 500); _vm->_eventsManager.VBL(); _vm->_eventsManager.VBL(); _vm->_eventsManager.VBL(); @@ -2157,7 +2157,7 @@ LABEL_1141: _vm->_soundManager.PLAY_SOUND("SOUND88.WAV"); if (_vm->_globals.SAUVEGARDE->data[svField341] == 2) { _vm->_animationManager.NO_SEQ = true; - _vm->_animationManager.PLAY_SEQ("RESU.SEQ", 2, 24, 2); + _vm->_animationManager.playSequence("RESU.SEQ", 2, 24, 2); _vm->_animationManager.NO_SEQ = false; } else { _vm->_objectsManager.OPTI_ONE(7, 0, 14, 0); @@ -2166,7 +2166,7 @@ LABEL_1141: if (v76 == 242) { _vm->_soundManager.PLAY_SOUND("SOUND87.WAV"); _vm->_animationManager.NO_SEQ = true; - _vm->_animationManager.PLAY_SEQ("RESUF.SEQ", 1, 24, 1); + _vm->_animationManager.playSequence("RESUF.SEQ", 1, 24, 1); _vm->_animationManager.NO_SEQ = false; CharacterLocation *v53 = &_vm->_globals.SAUVEGARDE->samantha; v53->xp = 404; @@ -2202,7 +2202,7 @@ LABEL_1141: _vm->_objectsManager.PERSO_ON = true; _vm->_graphicsManager.NB_SCREEN(); _vm->_animationManager.NO_SEQ = true; - _vm->_animationManager.PLAY_SEQ2("TUNNEL.SEQ", 1, 18, 20); + _vm->_animationManager.playSequence2("TUNNEL.SEQ", 1, 18, 20); _vm->_animationManager.NO_SEQ = false; _vm->_graphicsManager.NOFADE = true; _vm->_graphicsManager.FADE_OUTW(); diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index 6c01051d60..d42590f593 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -166,7 +166,7 @@ void SoundManager::LOAD_ANM_SOUND() { } } -void SoundManager::PLAY_ANM_SOUND(int soundNumber) { +void SoundManager::playAnim_SOUND(int soundNumber) { if (!_vm->_globals.CENSURE && SPECIAL_SOUND == 2) { switch (soundNumber) { case 20: diff --git a/engines/hopkins/sound.h b/engines/hopkins/sound.h index 84bae1deca..206bea89e3 100644 --- a/engines/hopkins/sound.h +++ b/engines/hopkins/sound.h @@ -142,7 +142,7 @@ public: void WSOUND_INIT(); void VERIF_SOUND(); void LOAD_ANM_SOUND(); - void PLAY_ANM_SOUND(int soundNumber); + void playAnim_SOUND(int soundNumber); void LOAD_WAV(const Common::String &file, int wavIndex); void WSOUND(int soundNumber); void WSOUND_OFF(); diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 5cb1147169..8aa3fcd090 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -140,7 +140,7 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) { v7 = DIALOGUE_REP(v6++); while (v7 != -1); } - CLEAR_ANIM_PERSO(); + clearCharacterAnim(); _vm->_globals.NOPARLE = false; _vm->_globals.NECESSAIRE = true; BUFFERPERSO = _vm->_globals.LIBERE_FICHIER(BUFFERPERSO); @@ -832,37 +832,37 @@ void TalkManager::ANIM_PERSO_INIT() { v1 = BUFFERPERSO + 110; v2 = (int16)READ_LE_UINT16((uint16 *)BUFFERPERSO + 43); if (v2) - RECHERCHE_ANIM_PERSO(21, (BUFFERPERSO + 110), v2, TAILLEPERSO); + searchCharacterAnim(21, (BUFFERPERSO + 110), v2, TAILLEPERSO); v4 = (int16)READ_LE_UINT16((uint16 *)v0 + 44); if (v4) - RECHERCHE_ANIM_PERSO(22, v1, v4, TAILLEPERSO); + searchCharacterAnim(22, v1, v4, TAILLEPERSO); v5 = (int16)READ_LE_UINT16((uint16 *)v0 + 45); if (v5) - RECHERCHE_ANIM_PERSO(23, v1, v5, TAILLEPERSO); + searchCharacterAnim(23, v1, v5, TAILLEPERSO); v6 = (int16)READ_LE_UINT16((uint16 *)v0 + 46); if (v6) - RECHERCHE_ANIM_PERSO(24, v1, v6, TAILLEPERSO); + searchCharacterAnim(24, v1, v6, TAILLEPERSO); v7 = (int16)READ_LE_UINT16((uint16 *)v0 + 47); if (v7) - RECHERCHE_ANIM_PERSO(25, v1, v7, TAILLEPERSO); + searchCharacterAnim(25, v1, v7, TAILLEPERSO); v8 = (int16)READ_LE_UINT16((uint16 *)v0 + 48); if (v8) - RECHERCHE_ANIM_PERSO(26, v1, v8, TAILLEPERSO); + searchCharacterAnim(26, v1, v8, TAILLEPERSO); v9 = (int16)READ_LE_UINT16((uint16 *)v0 + 49); if (v9) - RECHERCHE_ANIM_PERSO(27, v1, v9, TAILLEPERSO); + searchCharacterAnim(27, v1, v9, TAILLEPERSO); v10 = (int16)READ_LE_UINT16((uint16 *)v0 + 50); if (v10) - RECHERCHE_ANIM_PERSO(28, v1, v10, TAILLEPERSO); + searchCharacterAnim(28, v1, v10, TAILLEPERSO); v11 = (int16)READ_LE_UINT16((uint16 *)v0 + 51); if (v11) - RECHERCHE_ANIM_PERSO(29, v1, v11, TAILLEPERSO); + searchCharacterAnim(29, v1, v11, TAILLEPERSO); v12 = (int16)READ_LE_UINT16((uint16 *)v0 + 52); if (v12) - RECHERCHE_ANIM_PERSO(30, v1, v12, TAILLEPERSO); + searchCharacterAnim(30, v1, v12, TAILLEPERSO); } -void TalkManager::CLEAR_ANIM_PERSO() { +void TalkManager::clearCharacterAnim() { for (int idx = 21; idx <= 34; ++idx) { if (_vm->_globals.Bqe_Anim[idx].data != g_PTRNUL) _vm->_globals.Bqe_Anim[idx].data = _vm->_globals.dos_free2(_vm->_globals.Bqe_Anim[idx].data); @@ -872,7 +872,7 @@ void TalkManager::CLEAR_ANIM_PERSO() { } } -bool TalkManager::RECHERCHE_ANIM_PERSO(int a1, const byte *bufPerso, int a3, int a4) { +bool TalkManager::searchCharacterAnim(int a1, const byte *bufPerso, int a3, int a4) { bool result; const byte *v5; int v6; @@ -1291,8 +1291,8 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) { } while (!_vm->_globals.SORTIE); FIN_VISU_PARLE(); FIN_VISU_WAIT(); - CLEAR_ANIM_PERSO(); - CLEAR_ANIM_PERSO(); + clearCharacterAnim(); + clearCharacterAnim(); _vm->_globals.NOPARLE = false; _vm->_globals.NECESSAIRE = true; BUFFERPERSO = _vm->_globals.LIBERE_FICHIER(BUFFERPERSO); diff --git a/engines/hopkins/talk.h b/engines/hopkins/talk.h index 3c13bf81d4..3b0ec674ff 100644 --- a/engines/hopkins/talk.h +++ b/engines/hopkins/talk.h @@ -63,8 +63,8 @@ public: void BOB_VISU_PARLE(int idx); void CHERCHE_ANIM0(int a1, int a2); void ANIM_PERSO_INIT(); - void CLEAR_ANIM_PERSO(); - bool RECHERCHE_ANIM_PERSO(int a1, const byte *a2, int a3, int a4); + void clearCharacterAnim(); + bool searchCharacterAnim(int a1, const byte *a2, int a3, int a4); void REPONSE(int a1, int a2); void REPONSE2(int a1, int a2); void OBJET_VIVANT(const Common::String &a2); |