diff options
-rw-r--r-- | engines/hopkins/hopkins.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 38 | ||||
-rw-r--r-- | engines/hopkins/objects.h | 16 |
3 files changed, 32 insertions, 24 deletions
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index d19d074634..a513be7889 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -932,7 +932,7 @@ LABEL_140: _globals.DESACTIVE_INVENT = false; _globals.FORET = 1; _globals.NOSPRECRAN = true; - Common::String im = "IM" + _globals.SORTIE; + Common::String im = Common::String::format("IM%d", _globals.SORTIE); _soundManager.WSOUND(13); if (_globals.FORETSPR == g_PTRNUL) { _fileManager.CONSTRUIT_SYSTEM("HOPDEG.SPR"); diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 1aaed5a997..a553f02fae 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -5562,8 +5562,8 @@ void ObjectsManager::BLOQUE_ANIMX(int idx, int a2) { _vm->_globals.BL_ANIM[idx].v2 = a2; } -void ObjectsManager::PERSONAGE(const Common::String &s1, const Common::String &s2, const Common::String &s3, - const Common::String &s4, int v) { +void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Common::String &linkFile, + const Common::String &animFile, const Common::String &s4, int v) { int v5; int v6; int v7; @@ -5583,12 +5583,12 @@ void ObjectsManager::PERSONAGE(const Common::String &s1, const Common::String &s _vm->_globals.SORTIE = 0; _vm->_globals.AFFLI = false; _vm->_globals.AFFIVBL = false; - if (!s1.empty()) - _vm->_graphicsManager.LOAD_IMAGE(s1); - if (!s2.empty()) - INILINK(s2); - if (!s3.empty()) - _vm->_animationManager.CHARGE_ANIM(s3); + if (!backgroundFile.empty()) + _vm->_graphicsManager.LOAD_IMAGE(backgroundFile); + if (!linkFile.empty()) + INILINK(linkFile); + if (!animFile.empty()) + _vm->_animationManager.CHARGE_ANIM(animFile); _vm->_graphicsManager.VISU_ALL(); if (!s4.empty()) { if (!_vm->_globals.NOSPRECRAN) @@ -5657,7 +5657,7 @@ void ObjectsManager::PERSONAGE(const Common::String &s1, const Common::String &s return; _vm->_graphicsManager.FADE_OUTW(); - if (!s3.empty()) + if (!animFile.empty()) _vm->_graphicsManager.FIN_VISU(); if (_vm->_globals.ECRAN == 61) SPRITE_OFF(0); @@ -5665,8 +5665,8 @@ void ObjectsManager::PERSONAGE(const Common::String &s1, const Common::String &s _vm->_globals.iRegul = 0; } -void ObjectsManager::PERSONAGE2(const Common::String &s1, const Common::String &s2, const Common::String &s3, - const Common::String &s4, int v) { +void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Common::String &linkFile, + const Common::String &animFile, const Common::String &s4, int v) { int mouseButtons; bool breakFlag; int xp, yp; @@ -5686,12 +5686,12 @@ void ObjectsManager::PERSONAGE2(const Common::String &s1, const Common::String & _vm->_globals.NOT_VERIF = 1; _vm->_soundManager.WSOUND(v); _vm->_globals.iRegul = 1; - if (!s1.empty()) - _vm->_graphicsManager.LOAD_IMAGE(s1); - if (!s2.empty()) - INILINK(s2); - if (!s3.empty()) { - _vm->_animationManager.CHARGE_ANIM(s3); + if (!backgroundFile.empty()) + _vm->_graphicsManager.LOAD_IMAGE(backgroundFile); + if (!linkFile.empty()) + INILINK(linkFile); + if (!animFile.empty()) { + _vm->_animationManager.CHARGE_ANIM(animFile); _vm->_graphicsManager.VISU_ALL(); } if (!s4.empty()) { @@ -5741,7 +5741,7 @@ LABEL_70: _vm->_globals.CACHE_ON(); _vm->_globals.chemin = (int16 *)g_PTRNUL; VERIFTAILLE(); - SPECIAL_INI(s2); + SPECIAL_INI(linkFile); _vm->_eventsManager.souris_n = 4; g_old_x = PERX; g_old_y = PERY; @@ -5814,7 +5814,7 @@ LABEL_70: SPRITE_OFF(1); DEUXPERSO = false; } - if (!s3.empty()) + if (!animFile.empty()) _vm->_graphicsManager.FIN_VISU(); CLEAR_ECRAN(); } else { diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h index 0af22a8483..f8d959c7fa 100644 --- a/engines/hopkins/objects.h +++ b/engines/hopkins/objects.h @@ -237,10 +237,18 @@ public: void SPACTION1(byte *a1, const Common::String &a2, int a3, int a4, int a5); void TEST_FORET(int a1, int a2, int a3, int a4, int a5, int a6); void BLOQUE_ANIMX(int idx, int a2); - void PERSONAGE(const Common::String &s1, const Common::String &s2, const Common::String &s3, - const Common::String &s4, int v); - void PERSONAGE2(const Common::String &s1, const Common::String &s2, const Common::String &s3, - const Common::String &s4, int v); + + /** + * Game scene control method + */ + void PERSONAGE(const Common::String &backgroundFile, const Common::String &linkFile, + const Common::String &animFile, const Common::String &s4, int v); + + /** + * Game scene control method + */ + void PERSONAGE2(const Common::String &backgroundFile, const Common::String &linkFile, + const Common::String &animFile, const Common::String &s4, int v); }; } // End of namespace Hopkins |