aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2012-11-17 22:00:54 +1100
committerPaul Gilbert2012-11-17 22:00:54 +1100
commit5ae26a1910fef2163e8b1aad3cad2a0df5b02421 (patch)
tree18f65647b64555852720ffb4250a52db32b8bec7 /engines
parent928b1ae0d02daee9362f111d51ae81f0fc3b86f8 (diff)
downloadscummvm-rg350-5ae26a1910fef2163e8b1aad3cad2a0df5b02421.tar.gz
scummvm-rg350-5ae26a1910fef2163e8b1aad3cad2a0df5b02421.tar.bz2
scummvm-rg350-5ae26a1910fef2163e8b1aad3cad2a0df5b02421.zip
HOPKINS: Bugfixes for entering forest
Diffstat (limited to 'engines')
-rw-r--r--engines/hopkins/hopkins.cpp2
-rw-r--r--engines/hopkins/objects.cpp38
-rw-r--r--engines/hopkins/objects.h16
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 04464f5e28..e0b41a9978 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -5560,8 +5560,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;
@@ -5581,12 +5581,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)
@@ -5655,7 +5655,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);
@@ -5663,8 +5663,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;
@@ -5684,12 +5684,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()) {
@@ -5739,7 +5739,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;
@@ -5812,7 +5812,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 60ace316da..9fbc06c15b 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