diff options
author | Strangerke | 2013-01-26 16:45:48 +0100 |
---|---|---|
committer | Strangerke | 2013-01-26 16:46:21 +0100 |
commit | e21fed17073d87f06fc549ad5fd5e4ebf06db5de (patch) | |
tree | ac15fe16e379acdd7ea82122abe6bddbc3b233d4 /engines/hopkins/script.cpp | |
parent | 8bbb9a2bbdfeff13e70888d64e86954e9f229a75 (diff) | |
download | scummvm-rg350-e21fed17073d87f06fc549ad5fd5e4ebf06db5de.tar.gz scummvm-rg350-e21fed17073d87f06fc549ad5fd5e4ebf06db5de.tar.bz2 scummvm-rg350-e21fed17073d87f06fc549ad5fd5e4ebf06db5de.zip |
HOPKINS: Simplify calls to PARCOURS2
Diffstat (limited to 'engines/hopkins/script.cpp')
-rw-r--r-- | engines/hopkins/script.cpp | 50 |
1 files changed, 14 insertions, 36 deletions
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index 2aa96c8145..85522a72f3 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -723,9 +723,7 @@ int ScriptManager::handleOpcode(byte *dataP) { case 46: { _vm->_globals.NOT_VERIF = true; _vm->_globals.chemin = (int16 *)g_PTRNUL; - int v13 = _vm->_objectsManager.getSpriteY(0); - int v14 = _vm->_objectsManager.getSpriteX(0); - _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v14, v13, 564, 420); + _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 564, 420); _vm->_objectsManager._zoneNum = -1; do { if (_vm->shouldQuit()) @@ -937,9 +935,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals._oldDirection = -1; _vm->_globals.Compteur = 0; _vm->_globals.chemin = (int16 *)g_PTRNUL; - int v16 = _vm->_objectsManager.getSpriteY(0); - int v17 = _vm->_objectsManager.getSpriteX(0); - _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v17, v16, 445, 332); + _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 445, 332); _vm->_globals.NOT_VERIF = true; do { if (_vm->shouldQuit()) @@ -1039,9 +1035,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals._oldDirection = -1; _vm->_globals.Compteur = 0; _vm->_globals.chemin = (int16 *)g_PTRNUL; - int v22 = _vm->_objectsManager.getSpriteY(0); - int v23 = _vm->_objectsManager.getSpriteX(0); - _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v23, v22, 119, 268); + _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 119, 268); _vm->_globals.NOT_VERIF = true; do { if (_vm->shouldQuit()) @@ -1358,19 +1352,13 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals.Compteur = 0; _vm->_globals.chemin = (int16 *)g_PTRNUL; if (_vm->_globals._saveData->_data[svField253] == 1) { - int v27 = _vm->_objectsManager.getSpriteY(0); - int v28 = _vm->_objectsManager.getSpriteX(0); - _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v28, v27, 201, 294); + _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 201, 294); } if (_vm->_globals._saveData->_data[svField253] == 2) { - int v29 = _vm->_objectsManager.getSpriteY(0); - int v30 = _vm->_objectsManager.getSpriteX(0); - _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v30, v29, 158, 338); + _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 158, 338); } if (_vm->_globals._saveData->_data[svField253] > 2) { - int v31 = _vm->_objectsManager.getSpriteY(0); - int v32 = _vm->_objectsManager.getSpriteX(0); - _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v32, v31, 211, 393); + _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 211, 393); } _vm->_globals.NOT_VERIF = true; do { @@ -1609,11 +1597,9 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager.g_old_x = _vm->_objectsManager.getSpriteX(0); _vm->_globals._oldDirection = -1; _vm->_globals.Compteur = 0; - _vm->_globals.chemin = (int16 *)g_PTRNUL; _vm->_globals.NOT_VERIF = true; - int v55 = _vm->_objectsManager.getSpriteY(0); - int v56 = _vm->_objectsManager.getSpriteX(0); - _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v56, v55, 361, 325); + _vm->_globals.chemin = (int16 *)g_PTRNUL; + _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 361, 325); _vm->_globals.NOT_VERIF = true; _vm->_objectsManager._zoneNum = -1; do { @@ -1639,11 +1625,9 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager.g_old_x = _vm->_objectsManager.getSpriteX(0); _vm->_globals._oldDirection = -1; _vm->_globals.Compteur = 0; - _vm->_globals.chemin = (int16 *)g_PTRNUL; _vm->_globals.NOT_VERIF = true; - int v57 = _vm->_objectsManager.getSpriteY(0); - int v58 = _vm->_objectsManager.getSpriteX(0); - _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v58, v57, 361, 325); + _vm->_globals.chemin = (int16 *)g_PTRNUL; + _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 361, 325); _vm->_globals.NOT_VERIF = true; _vm->_objectsManager._zoneNum = -1; do { @@ -1818,9 +1802,7 @@ int ScriptManager::handleOpcode(byte *dataP) { } _vm->_globals.NOT_VERIF = true; _vm->_globals.chemin = (int16 *)g_PTRNUL; - int v37 = _vm->_objectsManager.getSpriteY(0); - int v38 = _vm->_objectsManager.getSpriteX(0); - _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v38, v37, 330, 418); + _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 330, 418); _vm->_globals.NOT_VERIF = true; _vm->_objectsManager._zoneNum = 0; do { @@ -1851,9 +1833,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager.stopBobAnimation(1); _vm->_globals.chemin = (int16 *)g_PTRNUL; _vm->_globals.NOT_VERIF = true; - int v39 = _vm->_objectsManager.getSpriteY(0); - int v40 = _vm->_objectsManager.getSpriteX(0); - _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v40, v39, 330, 314); + _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 330, 314); _vm->_objectsManager._zoneNum = 0; _vm->_globals.NOT_VERIF = true; do { @@ -1949,11 +1929,9 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager.g_old_x = _vm->_objectsManager.getSpriteX(0); _vm->_globals._oldDirection = -1; _vm->_globals.Compteur = 0; - _vm->_globals.chemin = (int16 *)g_PTRNUL; _vm->_globals.NOT_VERIF = true; - int v43 = _vm->_objectsManager.getSpriteY(0); - int v44 = _vm->_objectsManager.getSpriteX(0); - _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(v44, v43, 488, 280); + _vm->_globals.chemin = (int16 *)g_PTRNUL; + _vm->_globals.chemin = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 488, 280); _vm->_globals.NOT_VERIF = true; do { if (_vm->shouldQuit()) |