diff options
author | Strangerke | 2013-01-27 14:32:05 +0100 |
---|---|---|
committer | Strangerke | 2013-01-27 14:32:05 +0100 |
commit | 68f5da137569bb954321bf28b1f2b48f7a870534 (patch) | |
tree | 923e17ed4db1852e1c8e14af22539dc21d822720 | |
parent | 50aa4cbc7378f6ec3535438554491de051b7d873 (diff) | |
download | scummvm-rg350-68f5da137569bb954321bf28b1f2b48f7a870534.tar.gz scummvm-rg350-68f5da137569bb954321bf28b1f2b48f7a870534.tar.bz2 scummvm-rg350-68f5da137569bb954321bf28b1f2b48f7a870534.zip |
HOPKINS: Move _maxLineIdx to LinesManager, remove a useless variable
-rw-r--r-- | engines/hopkins/globals.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 4 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 370 | ||||
-rw-r--r-- | engines/hopkins/lines.cpp | 9 | ||||
-rw-r--r-- | engines/hopkins/lines.h | 1 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 5 |
6 files changed, 158 insertions, 235 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index dfd270a7e1..37ff08a7e5 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -135,9 +135,7 @@ Globals::Globals() { PERSO = 0; _screenId = 0; _prevScreenId = 0; - _maxLineLength = 0; - Max_Perso_Y = 0; - Max_Propre = 0; + _characterMaxPosY = 0; NBBLOC = 0; _menuScrollType = 0; _menuScrollSpeed = 0; diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index a1688d07c8..eadabc411a 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -351,9 +351,7 @@ public: int _mapCarPosX, _mapCarPosY; int _screenId; int _prevScreenId; - int Max_Propre; - int _maxLineLength; - int Max_Perso_Y; + int _characterMaxPosY; bool _disableInventFl; bool NOMARCHE; int NBBLOC; diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 90978c1196..cba5693c45 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -188,9 +188,8 @@ bool HopkinsEngine::runWin95Demo() { switch (_globals._exitId) { case 1: - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 2, true); break; @@ -228,9 +227,8 @@ bool HopkinsEngine::runWin95Demo() { _graphicsManager.fadeOutLong(); _globals._saveData->_data[svField170] = 1; } - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 450; _objectsManager.PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); break; @@ -241,9 +239,8 @@ bool HopkinsEngine::runWin95Demo() { break; case 5: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 455; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 455; if (_globals._saveData->_data[svField80]) { if (_globals._saveData->_data[svField80] == 1) @@ -254,9 +251,8 @@ bool HopkinsEngine::runWin95Demo() { break; case 6: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 460; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 460; _objectsManager.PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); break; @@ -268,16 +264,14 @@ bool HopkinsEngine::runWin95Demo() { break; case 8: - _globals.Max_Propre = 15; - _globals._maxLineLength = 15; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 15; + _globals._characterMaxPosY = 450; _objectsManager.PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); break; case 9: - _globals.Max_Propre = 15; - _globals.Max_Perso_Y = 440; - _globals._maxLineLength = 20; + _globals._characterMaxPosY = 440; + _linesManager._maxLineIdx = 20; if (_globals._saveData->_data[svField225]) _objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); else @@ -289,16 +283,14 @@ bool HopkinsEngine::runWin95Demo() { break; case 11: - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 450; - _globals.Max_Propre = 15; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 450; _objectsManager.PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); break; case 12: - _globals.Max_Propre = 15; - _globals.Max_Perso_Y = 450; - _globals._maxLineLength = 20; + _globals._characterMaxPosY = 450; + _linesManager._maxLineIdx = 20; if (_globals._saveData->_data[svField225]) { if (_globals._language == LANG_FR) _graphicsManager.loadImage("ENDFR"); @@ -501,9 +493,8 @@ bool HopkinsEngine::runLinuxDemo() { break; case 1: - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true); break; @@ -544,9 +535,8 @@ bool HopkinsEngine::runLinuxDemo() { _globals._saveData->_data[svField170] = 1; } - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 450; _objectsManager.PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); break; @@ -557,9 +547,8 @@ bool HopkinsEngine::runLinuxDemo() { break; case 5: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 455; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 455; if (_globals._saveData->_data[svField80] == 1) _objectsManager.PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); else @@ -567,9 +556,8 @@ bool HopkinsEngine::runLinuxDemo() { break; case 6: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 460; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 460; _objectsManager.PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); break; @@ -581,16 +569,14 @@ bool HopkinsEngine::runLinuxDemo() { break; case 8: - _globals.Max_Propre = 15; - _globals._maxLineLength = 15; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 15; + _globals._characterMaxPosY = 450; _objectsManager.PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); break; case 9: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 440; if (!_globals._saveData->_data[svField225]) bombExplosion(); @@ -603,16 +589,14 @@ bool HopkinsEngine::runLinuxDemo() { break; case 11: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 450; _objectsManager.PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); break; case 12: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 450; if (_globals._saveData->_data[svField225]) _objectsManager.PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false); else @@ -620,16 +604,14 @@ bool HopkinsEngine::runLinuxDemo() { break; case 13: - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true); break; case 14: - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true); break; @@ -638,9 +620,8 @@ bool HopkinsEngine::runLinuxDemo() { break; case 16: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 450; if (_globals._saveData->_data[svField113] == 1) { _objectsManager.PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true); @@ -650,16 +631,14 @@ bool HopkinsEngine::runLinuxDemo() { break; case 25: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 445; _objectsManager.PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true); break; case 26: - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true); case 33: @@ -852,9 +831,8 @@ bool HopkinsEngine::runFull() { switch (_globals._exitId) { case 1: - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true); break; @@ -900,9 +878,8 @@ bool HopkinsEngine::runFull() { _graphicsManager.fadeOutLong(); _globals._saveData->_data[svField170] = 1; } - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 450; _objectsManager.PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); break; @@ -913,9 +890,8 @@ bool HopkinsEngine::runFull() { break; case 5: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 455; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 455; if (_globals._saveData->_data[svField80] == 1) _objectsManager.PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); else @@ -923,9 +899,8 @@ bool HopkinsEngine::runFull() { break; case 6: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 460; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 460; _objectsManager.PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); break; @@ -937,16 +912,14 @@ bool HopkinsEngine::runFull() { break; case 8: - _globals.Max_Propre = 15; - _globals._maxLineLength = 15; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 15; + _globals._characterMaxPosY = 450; _objectsManager.PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); break; case 9: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 440; if (_globals._saveData->_data[svField225]) _objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); else @@ -958,16 +931,14 @@ bool HopkinsEngine::runFull() { break; case 11: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 450; _objectsManager.PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); break; case 12: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 450; if (_globals._saveData->_data[svField225]) _objectsManager.PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false); else @@ -975,16 +946,14 @@ bool HopkinsEngine::runFull() { break; case 13: - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true); break; case 14: - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true); break; @@ -996,9 +965,8 @@ bool HopkinsEngine::runFull() { break; case 16: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 450; if (_globals._saveData->_data[svField113] == 1) _objectsManager.PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true); else @@ -1006,9 +974,8 @@ bool HopkinsEngine::runFull() { break; case 17: - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 440; if (_globals._saveData->_data[svField117] == 1) _objectsManager.PERSONAGE2("IM17", "IM17A", "ANIM17", "IM17", 11, true); else if (!_globals._saveData->_data[svField117]) @@ -1038,9 +1005,8 @@ bool HopkinsEngine::runFull() { break; case 18: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 450; if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) _objectsManager.PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 29, false); else @@ -1048,9 +1014,8 @@ bool HopkinsEngine::runFull() { break; case 19: - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 440; if (_globals._saveData->_data[svField123]) _objectsManager.PERSONAGE2("IM19", "IM19A", "ANIM19", "IM19", 6, true); else @@ -1058,9 +1023,8 @@ bool HopkinsEngine::runFull() { break; case 20: - _globals.Max_Propre = 8; - _globals._maxLineLength = 10; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 10; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM20", "IM20", "ANIM20", "IM20", 6, true); if (_globals._exitId == 17) { _globals.iRegul = 1; @@ -1080,23 +1044,20 @@ bool HopkinsEngine::runFull() { break; case 22: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 445; _objectsManager.PERSONAGE2("IM22", "IM22", "ANIM22", "IM22", 6, true); break; case 23: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM23", "IM23", "ANIM23", "IM23", 6, true); break; case 24: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 450; if (_globals._saveData->_data[svField181] == 1) _objectsManager.PERSONAGE2("IM24", "IM24A", "ANIM24", "IM24", 1, true); else @@ -1104,9 +1065,8 @@ bool HopkinsEngine::runFull() { break; case 25: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 445; if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) _objectsManager.PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true); else @@ -1114,9 +1074,8 @@ bool HopkinsEngine::runFull() { break; case 26: - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 435; if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) _objectsManager.PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true); else @@ -1124,9 +1083,8 @@ bool HopkinsEngine::runFull() { break; case 27: - _globals.Max_Propre = 10; - _globals._maxLineLength = 15; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 15; + _globals._characterMaxPosY = 440; if (_globals._saveData->_data[svField177] == 1) _objectsManager.PERSONAGE2("IM27", "IM27A", "ANIM27", "IM27", 27, true); else @@ -1134,9 +1092,8 @@ bool HopkinsEngine::runFull() { break; case 28: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 450; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 450; if (_globals._saveData->_data[svField166] != 1 || _globals._saveData->_data[svField167] != 1) _objectsManager.PERSONAGE2("IM28", "IM28", "ANIM28", "IM28", 1, false); else @@ -1144,16 +1101,14 @@ bool HopkinsEngine::runFull() { break; case 29: - _globals.Max_Propre = 60; - _globals._maxLineLength = 50; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 50; + _globals._characterMaxPosY = 445; _objectsManager.PERSONAGE2("IM29", "IM29", "ANIM29", "IM29", 1, true); break; case 30: - _globals.Max_Propre = 10; - _globals._maxLineLength = 15; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 15; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM30", "IM30", "ANIM30", "IM30", 24, false); break; @@ -1162,9 +1117,8 @@ bool HopkinsEngine::runFull() { break; case 32: - _globals.Max_Propre = 15; - _globals._maxLineLength = 20; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 20; + _globals._characterMaxPosY = 445; _objectsManager.PERSONAGE2("IM32", "IM32", "ANIM32", "IM32", 2, true); break; @@ -1183,9 +1137,8 @@ bool HopkinsEngine::runFull() { case 39: case 40: case 41: { - _globals.Max_Propre = 50; - _globals._maxLineLength = 40; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 40; + _globals._characterMaxPosY = 435; _globals._disableInventFl = false; _globals._forestFl = true; Common::String im = Common::String::format("IM%d", _globals._exitId); @@ -1209,65 +1162,56 @@ bool HopkinsEngine::runFull() { break; case 51: - _globals.Max_Propre = 20; - _globals._maxLineLength = 10; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 10; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM51", "IM51", "ANIM51", "IM51", 14, true); break; case 52: - _globals.Max_Propre = 15; - _globals._maxLineLength = 15; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 15; + _globals._characterMaxPosY = 445; _objectsManager.PERSONAGE2("IM52", "IM52", "ANIM52", "IM52", 14, true); break; case 54: - _globals.Max_Propre = 40; - _globals._maxLineLength = 30; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 30; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM54", "IM54", "ANIM54", "IM54", 14, true); break; case 55: - _globals.Max_Propre = 40; - _globals._maxLineLength = 30; - _globals.Max_Perso_Y = 460; + _linesManager._maxLineIdx = 30; + _globals._characterMaxPosY = 460; _objectsManager.PERSONAGE2("IM55", "IM55", "ANIM55", "IM55", 14, false); break; case 56: - _globals.Max_Propre = 40; - _globals._maxLineLength = 30; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 30; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM56", "IM56", "ANIM56", "IM56", 14, false); break; case 57: - _globals.Max_Propre = 40; - _globals._maxLineLength = 30; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 30; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM57", "IM57", "ANIM57", "IM57", 14, true); break; case 58: - _globals.Max_Propre = 40; - _globals._maxLineLength = 30; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 30; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM58", "IM58", "ANIM58", "IM58", 14, false); break; case 59: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 445; _objectsManager.PERSONAGE2("IM59", "IM59", "ANIM59", "IM59", 21, false); break; case 60: - _globals.Max_Propre = 40; - _globals._maxLineLength = 30; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 30; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM60", "IM60", "ANIM60", "IM60", 21, false); break; @@ -1278,79 +1222,68 @@ bool HopkinsEngine::runFull() { break; case 62: - _globals.Max_Propre = 8; - _globals._maxLineLength = 8; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 8; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM62", "IM62", NULL, "IM62", 21, false); break; case 63: - _globals.Max_Propre = 40; - _globals._maxLineLength = 30; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 30; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM63", "IM63", "ANIM63", "IM63", 21, false); break; case 64: - _globals.Max_Propre = 40; - _globals._maxLineLength = 30; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 30; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM64", "IM64", "ANIM64", "IM64", 21, true); break; case 65: - _globals.Max_Propre = 40; - _globals._maxLineLength = 30; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 30; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM65", "IM65", "ANIM65", "IM65", 21, false); break; case 66: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 445; _objectsManager.PERSONAGE2("IM66", "IM66", "ANIM66", "IM66", 21, false); break; case 67: - _globals.Max_Propre = 8; - _globals._maxLineLength = 8; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 8; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM67", "IM67", NULL, "IM67", 21, false); break; case 68: - _globals.Max_Propre = 8; - _globals._maxLineLength = 8; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 8; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM68", "IM68", "ANIM68", "IM68", 21, true); break; case 69: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 445; _objectsManager.PERSONAGE2("IM69", "IM69", "ANIM69", "IM69", 21, false); break; case 70: - _globals.Max_Propre = 8; - _globals._maxLineLength = 8; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 8; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM70", "IM70", NULL, "IM70", 21, false); break; case 71: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 445; _objectsManager.PERSONAGE2("IM71", "IM71", "ANIM71", "IM71", 21, false); break; case 73: - _globals.Max_Propre = 15; - _globals._maxLineLength = 15; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 15; + _globals._characterMaxPosY = 445; if (_globals._saveData->_data[svField318] == 1) _objectsManager.PERSONAGE2("IM73", "IM73A", "ANIM73", "IM73", 21, true); else @@ -1422,9 +1355,8 @@ bool HopkinsEngine::runFull() { break; case 93: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 445; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 445; if (_globals._saveData->_data[svField330]) { if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) _objectsManager.PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 29, true); @@ -1439,30 +1371,26 @@ bool HopkinsEngine::runFull() { break; case 94: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 440; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 440; _objectsManager.PERSONAGE2("IM94", "IM94", "ANIM94", "IM94", 19, true); break; case 95: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM95", "IM95", "ANIM95", "IM95", 19, false); break; case 96: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM96", "IM96", "ANIM96", "IM96", 19, false); break; case 97: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM97", "IM97", "ANIM97", "IM97", 19, false); if (_globals._exitId == 18) { _globals.iRegul = 1; @@ -1479,16 +1407,14 @@ bool HopkinsEngine::runFull() { break; case 98: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM98", "IM98", "ANIM98", "IM98", 19, true); break; case 99: - _globals.Max_Propre = 5; - _globals._maxLineLength = 5; - _globals.Max_Perso_Y = 435; + _linesManager._maxLineIdx = 5; + _globals._characterMaxPosY = 435; _objectsManager.PERSONAGE2("IM99", "IM99", "ANIM99", "IM99", 19, true); break; diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp index 91ab0580ca..cdf3fd0ce0 100644 --- a/engines/hopkins/lines.cpp +++ b/engines/hopkins/lines.cpp @@ -45,6 +45,7 @@ LinesManager::LinesManager() { NVPY = 0; _smoothMoveDirection = 0; _lastLine = 0; + _maxLineIdx = 0; } void LinesManager::setParent(HopkinsEngine *vm) { @@ -459,7 +460,7 @@ void LinesManager::initRoute() { _lastLine = lineIdx; for (int idx = 1; idx < MAX_LINES; idx++) { - if ((Ligne[idx]._lineDataEndIdx < _vm->_globals._maxLineLength) && (idx != _lastLine + 1)) { + if ((Ligne[idx]._lineDataEndIdx < _maxLineIdx) && (idx != _lastLine + 1)) { Ligne[idx].field6 = Ligne[idx - 1].field6; Ligne[idx].field8 = Ligne[idx - 1].field8; } @@ -1074,7 +1075,7 @@ LABEL_17: break; v75 = foundLineIdx; - if (_vm->_globals.Max_Perso_Y <= v35 || v71 <= v35) + if (_vm->_globals._characterMaxPosY <= v35 || v71 <= v35) break; } int v36 = a5; @@ -1246,8 +1247,8 @@ int16 *LinesManager::PARCOURS2(int fromX, int fromY, int destX, int destY) { clipDestY = 20; if (clipDestX > _vm->_graphicsManager._maxX - 10) clipDestX = _vm->_graphicsManager._maxX - 10; - if (clipDestY > _vm->_globals.Max_Perso_Y) - clipDestY = _vm->_globals.Max_Perso_Y; + if (clipDestY > _vm->_globals._characterMaxPosY) + clipDestY = _vm->_globals._characterMaxPosY; if (abs(fromX - clipDestX) <= 3 && abs(fromY - clipDestY) <= 3) return (int16 *)g_PTRNUL; diff --git a/engines/hopkins/lines.h b/engines/hopkins/lines.h index 5a7c68c3d7..de07848e2d 100644 --- a/engines/hopkins/lines.h +++ b/engines/hopkins/lines.h @@ -65,6 +65,7 @@ public: int NVPY; int _smoothMoveDirection; int _lastLine; + int _maxLineIdx; public: LinesManager(); void setParent(HopkinsEngine *vm); diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index b050b064cf..3b3567e2be 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -1844,9 +1844,8 @@ void ObjectsManager::CARRE_ZONE() { void ObjectsManager::PLAN_BETA() { _vm->_dialogsManager._inventFl = false; _vm->_eventsManager._gameKey = KEY_NONE; - _vm->_globals.Max_Propre = 1; - _vm->_globals._maxLineLength = 1; - _vm->_globals.Max_Perso_Y = 440; + _vm->_linesManager._maxLineIdx = 1; + _vm->_globals._characterMaxPosY = 440; _vm->_globals.PLAN_FLAG = true; _vm->_graphicsManager._noFadingFl = false; _vm->_globals.NOMARCHE = false; |