diff options
author | Paul Gilbert | 2012-11-25 07:08:13 +1100 |
---|---|---|
committer | Paul Gilbert | 2012-11-25 07:08:13 +1100 |
commit | cc9a0bbb6d428391a507c71947ae616677153673 (patch) | |
tree | cf5c200c8ac79de68f9c9853bf8c2dcda8f6398b | |
parent | fd421b6bae804b29f605f4000bddf613abfd7c5d (diff) | |
download | scummvm-rg350-cc9a0bbb6d428391a507c71947ae616677153673.tar.gz scummvm-rg350-cc9a0bbb6d428391a507c71947ae616677153673.tar.bz2 scummvm-rg350-cc9a0bbb6d428391a507c71947ae616677153673.zip |
HOPKINS: Comments and parameter naming for CHANGE_TETE
-rw-r--r-- | engines/hopkins/objects.cpp | 10 | ||||
-rw-r--r-- | engines/hopkins/objects.h | 8 |
2 files changed, 12 insertions, 6 deletions
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index fc25712823..e87965ca65 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -3068,7 +3068,7 @@ void ObjectsManager::CLEAR_ECRAN() { } // Change Face/Head -void ObjectsManager::CHANGE_TETE(PlayerCharacter a1, PlayerCharacter a2) { +void ObjectsManager::CHANGE_TETE(PlayerCharacter oldCharacter, PlayerCharacter newCharacter) { CharacterLocation *loc; CH_TETE = 1; @@ -3077,7 +3077,7 @@ void ObjectsManager::CHANGE_TETE(PlayerCharacter a1, PlayerCharacter a2) { _vm->_globals.NOT_VERIF = 1; _vm->_globals.chemin = (int16 *)g_PTRNUL; - if (a1 == CHARACTER_SAMANTHA && !a2 && _vm->_globals.SAUVEGARDE->field370.location) { + if (oldCharacter == CHARACTER_SAMANTHA && !newCharacter && _vm->_globals.SAUVEGARDE->field370.location) { CH_TETE = 0; loc = &_vm->_globals.SAUVEGARDE->field380; loc->xp = XSPR(0); @@ -3103,7 +3103,7 @@ void ObjectsManager::CHANGE_TETE(PlayerCharacter a1, PlayerCharacter a2) { SPRITE(_vm->_globals.PERSO, loc->xp, loc->yp, 0, 64, loc->field4, 0, 34, 190); SPRITE_ON(0); _vm->_globals.HOPKINS_DATA(); - } else if (!a1 && a2 == CHARACTER_SAMANTHA && _vm->_globals.SAUVEGARDE->field380.location == _vm->_globals.ECRAN) { + } else if (!oldCharacter && newCharacter == CHARACTER_SAMANTHA && _vm->_globals.SAUVEGARDE->field380.location == _vm->_globals.ECRAN) { CH_TETE = 0; loc = &_vm->_globals.SAUVEGARDE->field370; loc->xp = XSPR(0); @@ -3127,7 +3127,7 @@ void ObjectsManager::CHANGE_TETE(PlayerCharacter a1, PlayerCharacter a2) { SPRITE_ON(0); _vm->_globals.HOPKINS_DATA(); } else { - switch (a1) { + switch (oldCharacter) { case CHARACTER_HOPKINS: loc = &_vm->_globals.SAUVEGARDE->field370; loc->xp = XSPR(0); @@ -3156,7 +3156,7 @@ void ObjectsManager::CHANGE_TETE(PlayerCharacter a1, PlayerCharacter a2) { break; } - switch (a2) { + switch (newCharacter) { case CHARACTER_HOPKINS: _vm->_globals.SAUVEGARDE->data[svField121] = 0; _vm->_globals.SAUVEGARDE->data[svField354] = 0; diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h index aec0ef1c4c..d38000aa43 100644 --- a/engines/hopkins/objects.h +++ b/engines/hopkins/objects.h @@ -189,7 +189,13 @@ public: void PARADISE(); void CLEAR_ECRAN(); - void CHANGE_TETE(PlayerCharacter a1, PlayerCharacter a2); + /** + * Change the currently active player + * @param oldCharacter Previously played character + * @param newCharacter New character to play + */ + void CHANGE_TETE(PlayerCharacter oldCharacter, PlayerCharacter newCharacter); + void VERIFTAILLE(); void PACOURS_PROPRE(int16 *a1); int16 *PARC_VOITURE(int a1, int a2, int a3, int a4); |