aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hopkins/dialogs.cpp2
-rw-r--r--engines/hopkins/globals.cpp2
-rw-r--r--engines/hopkins/hopkins.cpp165
-rw-r--r--engines/hopkins/hopkins.h2
-rw-r--r--engines/hopkins/lines.cpp38
-rw-r--r--engines/hopkins/lines.h3
-rw-r--r--engines/hopkins/objects.cpp426
-rw-r--r--engines/hopkins/script.cpp66
-rw-r--r--engines/hopkins/talk.cpp22
9 files changed, 361 insertions, 365 deletions
diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp
index cc064dc201..d189736ddf 100644
--- a/engines/hopkins/dialogs.cpp
+++ b/engines/hopkins/dialogs.cpp
@@ -394,7 +394,7 @@ void DialogsManager::showInventory() {
int mousePosY = _vm->_eventsManager->getMouseY();
int mouseButton = _vm->_eventsManager->getMouseButton();
int oldInventoryItem = newInventoryItem;
- newInventoryItem = _vm->_linesManager.checkInventoryHotspots(mousePosX, mousePosY);
+ newInventoryItem = _vm->_linesManager->checkInventoryHotspots(mousePosX, mousePosY);
if (newInventoryItem != oldInventoryItem)
_vm->_objectsManager.initBorder(newInventoryItem);
if (_vm->_eventsManager->_mouseCursorId != 1 && _vm->_eventsManager->_mouseCursorId != 2 && _vm->_eventsManager->_mouseCursorId != 3 && _vm->_eventsManager->_mouseCursorId != 16) {
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp
index fb0dbf36c4..3d82081d29 100644
--- a/engines/hopkins/globals.cpp
+++ b/engines/hopkins/globals.cpp
@@ -246,7 +246,7 @@ void Globals::clearAll() {
_saveData = (Savegame *)g_PTRNUL;
_vm->_objectsManager._curObjectIndex = 0;
- _vm->_linesManager.clearAll();
+ _vm->_linesManager->clearAll();
_vm->_objectsManager.clearAll();
_saveData = (Savegame *)malloc(sizeof(Savegame));
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index a0eb41c6e9..b86ac10e7f 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -49,8 +49,8 @@ HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDe
_fontManager = new FontManager(this);
_globals = new Globals(this);
_graphicsManager = new GraphicsManager(this);
+ _linesManager = new LinesManager(this);
- _linesManager.setParent(this);
_menuManager.setParent(this);
_objectsManager.setParent(this);
_saveLoadManager.setParent(this);
@@ -60,6 +60,7 @@ HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDe
}
HopkinsEngine::~HopkinsEngine() {
+ delete _linesManager;
delete _graphicsManager;
delete _globals;
delete _fontManager;
@@ -187,7 +188,7 @@ bool HopkinsEngine::runWin95Demo() {
switch (_globals->_exitId) {
case 1:
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 2, true);
break;
@@ -226,7 +227,7 @@ bool HopkinsEngine::runWin95Demo() {
_graphicsManager->fadeOutLong();
_globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1;
}
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 450;
_objectsManager.PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false);
break;
@@ -238,7 +239,7 @@ bool HopkinsEngine::runWin95Demo() {
break;
case 5:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 455;
if (_globals->_saveData->_data[svFreedHostageFl]) {
@@ -250,7 +251,7 @@ bool HopkinsEngine::runWin95Demo() {
break;
case 6:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 460;
_objectsManager.PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true);
break;
@@ -263,14 +264,14 @@ bool HopkinsEngine::runWin95Demo() {
break;
case 8:
- _linesManager.setMaxLineIdx(15);
+ _linesManager->setMaxLineIdx(15);
_globals->_characterMaxPosY = 450;
_objectsManager.PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true);
break;
case 9:
_globals->_characterMaxPosY = 440;
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
if (_globals->_saveData->_data[svBombDisarmedFl])
_objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
else
@@ -282,14 +283,14 @@ bool HopkinsEngine::runWin95Demo() {
break;
case 11:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 450;
_objectsManager.PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false);
break;
case 12:
_globals->_characterMaxPosY = 450;
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
if (_globals->_saveData->_data[svBombDisarmedFl]) {
if (_globals->_language == LANG_FR)
_graphicsManager->loadImage("ENDFR");
@@ -492,7 +493,7 @@ bool HopkinsEngine::runLinuxDemo() {
break;
case 1:
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true);
break;
@@ -534,7 +535,7 @@ bool HopkinsEngine::runLinuxDemo() {
_globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1;
}
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 450;
_objectsManager.PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false);
break;
@@ -546,7 +547,7 @@ bool HopkinsEngine::runLinuxDemo() {
break;
case 5:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 455;
if (_globals->_saveData->_data[svFreedHostageFl] == 1)
_objectsManager.PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false);
@@ -555,7 +556,7 @@ bool HopkinsEngine::runLinuxDemo() {
break;
case 6:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 460;
_objectsManager.PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true);
break;
@@ -568,13 +569,13 @@ bool HopkinsEngine::runLinuxDemo() {
break;
case 8:
- _linesManager.setMaxLineIdx(15);
+ _linesManager->setMaxLineIdx(15);
_globals->_characterMaxPosY = 450;
_objectsManager.PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true);
break;
case 9:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 440;
if (!_globals->_saveData->_data[svBombDisarmedFl])
@@ -588,13 +589,13 @@ bool HopkinsEngine::runLinuxDemo() {
break;
case 11:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 450;
_objectsManager.PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false);
break;
case 12:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 450;
if (_globals->_saveData->_data[svBombDisarmedFl])
_objectsManager.PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false);
@@ -603,13 +604,13 @@ bool HopkinsEngine::runLinuxDemo() {
break;
case 13:
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true);
break;
case 14:
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true);
break;
@@ -619,7 +620,7 @@ bool HopkinsEngine::runLinuxDemo() {
break;
case 16:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 450;
if (_globals->_saveData->_data[svForestAvailableFl] == 1) {
@@ -630,13 +631,13 @@ bool HopkinsEngine::runLinuxDemo() {
break;
case 25:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 445;
_objectsManager.PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true);
break;
case 26:
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true);
@@ -837,7 +838,7 @@ bool HopkinsEngine::runFull() {
switch (_globals->_exitId) {
case 1:
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true);
break;
@@ -892,7 +893,7 @@ bool HopkinsEngine::runFull() {
_globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1;
}
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 450;
_objectsManager.PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false);
break;
@@ -904,7 +905,7 @@ bool HopkinsEngine::runFull() {
break;
case 5:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 455;
if (_globals->_saveData->_data[svFreedHostageFl] == 1)
_objectsManager.PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false);
@@ -913,7 +914,7 @@ bool HopkinsEngine::runFull() {
break;
case 6:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 460;
_objectsManager.PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true);
break;
@@ -926,13 +927,13 @@ bool HopkinsEngine::runFull() {
break;
case 8:
- _linesManager.setMaxLineIdx(15);
+ _linesManager->setMaxLineIdx(15);
_globals->_characterMaxPosY = 450;
_objectsManager.PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true);
break;
case 9:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 440;
if (_globals->_saveData->_data[svBombDisarmedFl])
_objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true);
@@ -945,13 +946,13 @@ bool HopkinsEngine::runFull() {
break;
case 11:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 450;
_objectsManager.PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false);
break;
case 12:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 450;
if (_globals->_saveData->_data[svBombDisarmedFl])
_objectsManager.PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false);
@@ -960,13 +961,13 @@ bool HopkinsEngine::runFull() {
break;
case 13:
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true);
break;
case 14:
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true);
break;
@@ -979,7 +980,7 @@ bool HopkinsEngine::runFull() {
break;
case 16:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 450;
if (_globals->_saveData->_data[svForestAvailableFl] == 1)
_objectsManager.PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true);
@@ -988,7 +989,7 @@ bool HopkinsEngine::runFull() {
break;
case 17:
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 440;
if (_globals->_saveData->_data[svHutBurningFl] == 1)
_objectsManager.PERSONAGE2("IM17", "IM17A", "ANIM17", "IM17", 11, true);
@@ -1019,7 +1020,7 @@ bool HopkinsEngine::runFull() {
break;
case 18:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 450;
if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
_objectsManager.PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 29, false);
@@ -1028,7 +1029,7 @@ bool HopkinsEngine::runFull() {
break;
case 19:
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 440;
if (_globals->_saveData->_data[svHeavenGuardGoneFl])
_objectsManager.PERSONAGE2("IM19", "IM19A", "ANIM19", "IM19", 6, true);
@@ -1037,7 +1038,7 @@ bool HopkinsEngine::runFull() {
break;
case 20:
- _linesManager.setMaxLineIdx(10);
+ _linesManager->setMaxLineIdx(10);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM20", "IM20", "ANIM20", "IM20", 6, true);
if (_globals->_exitId == 17) {
@@ -1058,19 +1059,19 @@ bool HopkinsEngine::runFull() {
break;
case 22:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 445;
_objectsManager.PERSONAGE2("IM22", "IM22", "ANIM22", "IM22", 6, true);
break;
case 23:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM23", "IM23", "ANIM23", "IM23", 6, true);
break;
case 24:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 450;
if (_globals->_saveData->_data[svCinemaDogGoneFl] == 1)
_objectsManager.PERSONAGE2("IM24", "IM24A", "ANIM24", "IM24", 1, true);
@@ -1079,7 +1080,7 @@ bool HopkinsEngine::runFull() {
break;
case 25:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 445;
if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
_objectsManager.PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true);
@@ -1088,7 +1089,7 @@ bool HopkinsEngine::runFull() {
break;
case 26:
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 435;
if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
_objectsManager.PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true);
@@ -1097,7 +1098,7 @@ bool HopkinsEngine::runFull() {
break;
case 27:
- _linesManager.setMaxLineIdx(15);
+ _linesManager->setMaxLineIdx(15);
_globals->_characterMaxPosY = 440;
if (_globals->_saveData->_data[svPoolDogGoneFl] == 1)
_objectsManager.PERSONAGE2("IM27", "IM27A", "ANIM27", "IM27", 27, true);
@@ -1106,7 +1107,7 @@ bool HopkinsEngine::runFull() {
break;
case 28:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 450;
if (_globals->_saveData->_data[svCinemaCurtainCond1] != 1 || _globals->_saveData->_data[svCinemaCurtainCond2] != 1)
_objectsManager.PERSONAGE2("IM28", "IM28", "ANIM28", "IM28", 1, false);
@@ -1115,13 +1116,13 @@ bool HopkinsEngine::runFull() {
break;
case 29:
- _linesManager.setMaxLineIdx(50);
+ _linesManager->setMaxLineIdx(50);
_globals->_characterMaxPosY = 445;
_objectsManager.PERSONAGE2("IM29", "IM29", "ANIM29", "IM29", 1, true);
break;
case 30:
- _linesManager.setMaxLineIdx(15);
+ _linesManager->setMaxLineIdx(15);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM30", "IM30", "ANIM30", "IM30", 24, false);
break;
@@ -1131,7 +1132,7 @@ bool HopkinsEngine::runFull() {
break;
case 32:
- _linesManager.setMaxLineIdx(20);
+ _linesManager->setMaxLineIdx(20);
_globals->_characterMaxPosY = 445;
_objectsManager.PERSONAGE2("IM32", "IM32", "ANIM32", "IM32", 2, true);
break;
@@ -1151,7 +1152,7 @@ bool HopkinsEngine::runFull() {
case 39:
case 40:
case 41: {
- _linesManager.setMaxLineIdx(40);
+ _linesManager->setMaxLineIdx(40);
_globals->_characterMaxPosY = 435;
_globals->_disableInventFl = false;
_objectsManager._forestFl = true;
@@ -1176,55 +1177,55 @@ bool HopkinsEngine::runFull() {
break;
case 51:
- _linesManager.setMaxLineIdx(10);
+ _linesManager->setMaxLineIdx(10);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM51", "IM51", "ANIM51", "IM51", 14, true);
break;
case 52:
- _linesManager.setMaxLineIdx(15);
+ _linesManager->setMaxLineIdx(15);
_globals->_characterMaxPosY = 445;
_objectsManager.PERSONAGE2("IM52", "IM52", "ANIM52", "IM52", 14, true);
break;
case 54:
- _linesManager.setMaxLineIdx(30);
+ _linesManager->setMaxLineIdx(30);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM54", "IM54", "ANIM54", "IM54", 14, true);
break;
case 55:
- _linesManager.setMaxLineIdx(30);
+ _linesManager->setMaxLineIdx(30);
_globals->_characterMaxPosY = 460;
_objectsManager.PERSONAGE2("IM55", "IM55", "ANIM55", "IM55", 14, false);
break;
case 56:
- _linesManager.setMaxLineIdx(30);
+ _linesManager->setMaxLineIdx(30);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM56", "IM56", "ANIM56", "IM56", 14, false);
break;
case 57:
- _linesManager.setMaxLineIdx(30);
+ _linesManager->setMaxLineIdx(30);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM57", "IM57", "ANIM57", "IM57", 14, true);
break;
case 58:
- _linesManager.setMaxLineIdx(30);
+ _linesManager->setMaxLineIdx(30);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM58", "IM58", "ANIM58", "IM58", 14, false);
break;
case 59:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 445;
_objectsManager.PERSONAGE2("IM59", "IM59", "ANIM59", "IM59", 21, false);
break;
case 60:
- _linesManager.setMaxLineIdx(30);
+ _linesManager->setMaxLineIdx(30);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM60", "IM60", "ANIM60", "IM60", 21, false);
break;
@@ -1236,67 +1237,67 @@ bool HopkinsEngine::runFull() {
break;
case 62:
- _linesManager.setMaxLineIdx(8);
+ _linesManager->setMaxLineIdx(8);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM62", "IM62", NULL, "IM62", 21, false);
break;
case 63:
- _linesManager.setMaxLineIdx(30);
+ _linesManager->setMaxLineIdx(30);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM63", "IM63", "ANIM63", "IM63", 21, false);
break;
case 64:
- _linesManager.setMaxLineIdx(30);
+ _linesManager->setMaxLineIdx(30);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM64", "IM64", "ANIM64", "IM64", 21, true);
break;
case 65:
- _linesManager.setMaxLineIdx(30);
+ _linesManager->setMaxLineIdx(30);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM65", "IM65", "ANIM65", "IM65", 21, false);
break;
case 66:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 445;
_objectsManager.PERSONAGE2("IM66", "IM66", "ANIM66", "IM66", 21, false);
break;
case 67:
- _linesManager.setMaxLineIdx(8);
+ _linesManager->setMaxLineIdx(8);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM67", "IM67", NULL, "IM67", 21, false);
break;
case 68:
- _linesManager.setMaxLineIdx(8);
+ _linesManager->setMaxLineIdx(8);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM68", "IM68", "ANIM68", "IM68", 21, true);
break;
case 69:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 445;
_objectsManager.PERSONAGE2("IM69", "IM69", "ANIM69", "IM69", 21, false);
break;
case 70:
- _linesManager.setMaxLineIdx(8);
+ _linesManager->setMaxLineIdx(8);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM70", "IM70", NULL, "IM70", 21, false);
break;
case 71:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 445;
_objectsManager.PERSONAGE2("IM71", "IM71", "ANIM71", "IM71", 21, false);
break;
case 73:
- _linesManager.setMaxLineIdx(15);
+ _linesManager->setMaxLineIdx(15);
_globals->_characterMaxPosY = 445;
if (_globals->_saveData->_data[svSecondElevatorAvailableFl] == 1)
_objectsManager.PERSONAGE2("IM73", "IM73A", "ANIM73", "IM73", 21, true);
@@ -1369,7 +1370,7 @@ bool HopkinsEngine::runFull() {
break;
case 93:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 445;
if (_globals->_saveData->_data[svEscapeLeftJailFl]) {
if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
@@ -1385,25 +1386,25 @@ bool HopkinsEngine::runFull() {
break;
case 94:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 440;
_objectsManager.PERSONAGE2("IM94", "IM94", "ANIM94", "IM94", 19, true);
break;
case 95:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM95", "IM95", "ANIM95", "IM95", 19, false);
break;
case 96:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM96", "IM96", "ANIM96", "IM96", 19, false);
break;
case 97:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM97", "IM97", "ANIM97", "IM97", 19, false);
if (_globals->_exitId == 18) {
@@ -1421,13 +1422,13 @@ bool HopkinsEngine::runFull() {
break;
case 98:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM98", "IM98", "ANIM98", "IM98", 19, true);
break;
case 99:
- _linesManager.setMaxLineIdx(5);
+ _linesManager->setMaxLineIdx(5);
_globals->_characterMaxPosY = 435;
_objectsManager.PERSONAGE2("IM99", "IM99", "ANIM99", "IM99", 19, true);
break;
@@ -2062,7 +2063,7 @@ void HopkinsEngine::playEnding() {
_globals->_cityMapEnabledFl = false;
_globals->iRegul = 1;
_soundManager.playSound(26);
- _linesManager._route = (RouteItem *)g_PTRNUL;
+ _linesManager->_route = (RouteItem *)g_PTRNUL;
_globals->_freezeCharacterFl = true;
_globals->_exitId = 0;
_soundManager.loadSample(1, "SOUND90.WAV");
@@ -2768,13 +2769,13 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi
_objectsManager.loadLinkFile("ocean");
if (!exit1)
- _linesManager.disableZone(1);
+ _linesManager->disableZone(1);
if (!exit2)
- _linesManager.disableZone(2);
+ _linesManager->disableZone(2);
if (!exit3)
- _linesManager.disableZone(3);
+ _linesManager->disableZone(3);
if (!exit4)
- _linesManager.disableZone(4);
+ _linesManager->disableZone(4);
if (!_globals->_oceanDirection)
_globals->_oceanDirection = defaultDirection;
@@ -2806,7 +2807,7 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi
_graphicsManager->SETCOLOR3(251, 100, 100, 100);
_graphicsManager->SETCOLOR3(254, 0, 0, 0);
_objectsManager.animateSprite(0);
- _linesManager._route = (RouteItem *)g_PTRNUL;
+ _linesManager->_route = (RouteItem *)g_PTRNUL;
_eventsManager->mouseOn();
_eventsManager->changeMouseCursor(4);
@@ -2822,7 +2823,7 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi
int mouseButton = _eventsManager->getMouseButton();
if (mouseButton && mouseButton == 1)
handleOceanMouseEvents();
- _linesManager.checkZone();
+ _linesManager->checkZone();
setSubmarineSprites();
_eventsManager->refreshScreenAndEvents();
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
index 3349f5d5ce..1a3f60c80f 100644
--- a/engines/hopkins/hopkins.h
+++ b/engines/hopkins/hopkins.h
@@ -151,8 +151,8 @@ public:
FontManager *_fontManager;
Globals *_globals;
GraphicsManager *_graphicsManager;
+ LinesManager *_linesManager;
- LinesManager _linesManager;
MenuManager _menuManager;
ObjectsManager _objectsManager;
SaveLoadManager _saveLoadManager;
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
index 816f4f855e..476477b573 100644
--- a/engines/hopkins/lines.cpp
+++ b/engines/hopkins/lines.cpp
@@ -30,26 +30,9 @@
namespace Hopkins {
+LinesManager::LinesManager(HopkinsEngine *vm) {
+ _vm = vm;
-int LigneItem::appendToRouteInc(int from, int to, RouteItem *route, int index) {
- if (to == -1)
- to = _lineDataEndIdx;
-
- for (int i = from; i < to; ++i)
- route[index++].set(_lineData[2*i], _lineData[2*i+1], _directionRouteInc);
- return index;
-}
-int LigneItem::appendToRouteDec(int from, int to, RouteItem *route, int index) {
- if (from == -1)
- from = _lineDataEndIdx - 1;
-
- for (int i = from; i > to; --i)
- route[index++].set(_lineData[2*i], _lineData[2*i+1], _directionRouteDec);
- return index;
-}
-
-
-LinesManager::LinesManager() {
for (int i = 0; i < MAX_LINES; ++i) {
Common::fill((byte *)&_zoneLine[i], (byte *)&_zoneLine[i] + sizeof(LigneZoneItem), 0);
Common::fill((byte *)&_lineItem[i], (byte *)&_lineItem[i] + sizeof(LigneItem), 0);
@@ -100,8 +83,21 @@ LinesManager::~LinesManager() {
_vm->_globals->freeMemory((byte *) _testRoute2);
}
-void LinesManager::setParent(HopkinsEngine *vm) {
- _vm = vm;
+int LigneItem::appendToRouteInc(int from, int to, RouteItem *route, int index) {
+ if (to == -1)
+ to = _lineDataEndIdx;
+
+ for (int i = from; i < to; ++i)
+ route[index++].set(_lineData[2*i], _lineData[2*i+1], _directionRouteInc);
+ return index;
+}
+int LigneItem::appendToRouteDec(int from, int to, RouteItem *route, int index) {
+ if (from == -1)
+ from = _lineDataEndIdx - 1;
+
+ for (int i = from; i > to; --i)
+ route[index++].set(_lineData[2*i], _lineData[2*i+1], _directionRouteDec);
+ return index;
}
/**
diff --git a/engines/hopkins/lines.h b/engines/hopkins/lines.h
index 5d31aa6fd6..79dde89f6a 100644
--- a/engines/hopkins/lines.h
+++ b/engines/hopkins/lines.h
@@ -157,9 +157,8 @@ public:
bool BOBZONE_FLAG[105];
ZonePItem ZONEP[106];
- LinesManager();
+ LinesManager(HopkinsEngine *vm);
~LinesManager();
- void setParent(HopkinsEngine *vm);
void clearAll();
void setMaxLineIdx(int idx);
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index c9f04e0eb5..362c9fe4b8 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -1256,7 +1256,7 @@ void ObjectsManager::setFlipSprite(int idx, bool flipFl) {
}
void ObjectsManager::GOHOME() {
- if (_vm->_linesManager._route == (RouteItem *)g_PTRNUL)
+ if (_vm->_linesManager->_route == (RouteItem *)g_PTRNUL)
return;
if (_vm->_globals->Compteur > 1) {
@@ -1274,10 +1274,10 @@ void ObjectsManager::GOHOME() {
_vm->_globals->Compteur = 0;
if (_vm->_globals->_oldDirection == DIR_NONE) {
computeAndSetSpriteSize();
- newPosX = _vm->_linesManager._route->_x;
- newPosY = _vm->_linesManager._route->_y;
- newDirection = _vm->_linesManager._route->_dir;
- _vm->_linesManager._route++;
+ newPosX = _vm->_linesManager->_route->_x;
+ newPosY = _vm->_linesManager->_route->_y;
+ newDirection = _vm->_linesManager->_route->_dir;
+ _vm->_linesManager->_route++;
if (newPosX != -1 || newPosY != -1) {
_vm->_globals->_oldDirection = newDirection;
@@ -1293,21 +1293,21 @@ void ObjectsManager::GOHOME() {
zoneId = _vm->_globals->_saveData->_data[svLastZoneNum];
else
zoneId = _zoneNum;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
computeAndSetSpriteSize();
setFlipSprite(0, false);
_vm->_globals->Compteur = 0;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
_vm->_globals->_oldDirection = DIR_NONE;
if (zoneId > 0) {
- if (_vm->_linesManager.ZONEP[zoneId]._destX && _vm->_linesManager.ZONEP[zoneId]._destY && _vm->_linesManager.ZONEP[zoneId]._destY != 31) {
- if (_vm->_linesManager.ZONEP[zoneId]._spriteIndex == -1) {
- _vm->_linesManager.ZONEP[zoneId]._destX = 0;
- _vm->_linesManager.ZONEP[zoneId]._destY = 0;
- _vm->_linesManager.ZONEP[zoneId]._spriteIndex = 0;
+ if (_vm->_linesManager->ZONEP[zoneId]._destX && _vm->_linesManager->ZONEP[zoneId]._destY && _vm->_linesManager->ZONEP[zoneId]._destY != 31) {
+ if (_vm->_linesManager->ZONEP[zoneId]._spriteIndex == -1) {
+ _vm->_linesManager->ZONEP[zoneId]._destX = 0;
+ _vm->_linesManager->ZONEP[zoneId]._destY = 0;
+ _vm->_linesManager->ZONEP[zoneId]._spriteIndex = 0;
} else {
- setSpriteIndex(0, _vm->_linesManager.ZONEP[zoneId]._spriteIndex);
- _vm->_globals->_actionDirection = _vm->_linesManager.ZONEP[zoneId]._spriteIndex - 59;
+ setSpriteIndex(0, _vm->_linesManager->ZONEP[zoneId]._spriteIndex);
+ _vm->_globals->_actionDirection = _vm->_linesManager->ZONEP[zoneId]._spriteIndex - 59;
}
}
}
@@ -1500,10 +1500,10 @@ void ObjectsManager::GOHOME() {
}
bool loopCond = false;
do {
- newPosX = _vm->_linesManager._route->_x;
- newPosY = _vm->_linesManager._route->_y;
- newDirection = (Directions)_vm->_linesManager._route->_dir;
- _vm->_linesManager._route++;
+ newPosX = _vm->_linesManager->_route->_x;
+ newPosY = _vm->_linesManager->_route->_y;
+ newDirection = (Directions)_vm->_linesManager->_route->_dir;
+ _vm->_linesManager->_route++;
if (newPosX == -1 && newPosY == -1) {
int zoneId;
@@ -1513,7 +1513,7 @@ void ObjectsManager::GOHOME() {
zoneId = _zoneNum;
setSpriteIndex(0, _vm->_globals->_oldDirection + 59);
_vm->_globals->_actionDirection = DIR_NONE;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
computeAndSetSpriteSize();
setFlipSprite(0, false);
_vm->_globals->Compteur = 0;
@@ -1522,14 +1522,14 @@ void ObjectsManager::GOHOME() {
_oldCharacterPosY = getSpriteY(0);
if (zoneId > 0) {
- if (_vm->_linesManager.ZONEP[zoneId]._destX && _vm->_linesManager.ZONEP[zoneId]._destY && _vm->_linesManager.ZONEP[zoneId]._destY != 31) {
- if ( _vm->_linesManager.ZONEP[zoneId]._spriteIndex == -1) {
- _vm->_linesManager.ZONEP[zoneId]._destX = 0;
- _vm->_linesManager.ZONEP[zoneId]._destY = 0;
- _vm->_linesManager.ZONEP[zoneId]._spriteIndex = 0;
+ if (_vm->_linesManager->ZONEP[zoneId]._destX && _vm->_linesManager->ZONEP[zoneId]._destY && _vm->_linesManager->ZONEP[zoneId]._destY != 31) {
+ if ( _vm->_linesManager->ZONEP[zoneId]._spriteIndex == -1) {
+ _vm->_linesManager->ZONEP[zoneId]._destX = 0;
+ _vm->_linesManager->ZONEP[zoneId]._destY = 0;
+ _vm->_linesManager->ZONEP[zoneId]._spriteIndex = 0;
} else {
- setSpriteIndex(0, _vm->_linesManager.ZONEP[zoneId]._spriteIndex);
- _vm->_globals->_actionDirection = _vm->_linesManager.ZONEP[zoneId]._spriteIndex - 59;
+ setSpriteIndex(0, _vm->_linesManager->ZONEP[zoneId]._spriteIndex);
+ _vm->_globals->_actionDirection = _vm->_linesManager->ZONEP[zoneId]._spriteIndex - 59;
}
}
}
@@ -1573,7 +1573,7 @@ void ObjectsManager::GOHOME() {
}
void ObjectsManager::GOHOME2() {
- if (_vm->_linesManager._route == (RouteItem *)g_PTRNUL)
+ if (_vm->_linesManager->_route == (RouteItem *)g_PTRNUL)
return;
int realSpeed = 2;
@@ -1585,10 +1585,10 @@ void ObjectsManager::GOHOME2() {
int countColisionPixel = 0;
for (;;) {
- int nexPosX = _vm->_linesManager._route->_x;
- int newPosY = _vm->_linesManager._route->_y;
- Directions newDirection = (Directions)_vm->_linesManager._route->_dir;
- _vm->_linesManager._route++;
+ int nexPosX = _vm->_linesManager->_route->_x;
+ int newPosY = _vm->_linesManager->_route->_y;
+ Directions newDirection = (Directions)_vm->_linesManager->_route->_dir;
+ _vm->_linesManager->_route++;
if ((nexPosX == -1) && (newPosY == -1))
break;
@@ -1636,7 +1636,7 @@ void ObjectsManager::GOHOME2() {
break;
}
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
}
/**
@@ -1644,21 +1644,21 @@ void ObjectsManager::GOHOME2() {
*/
void ObjectsManager::loadZone(const Common::String &file) {
for (int i = 1; i <= 100; i++) {
- _vm->_linesManager.ZONEP[i]._destX = 0;
- _vm->_linesManager.ZONEP[i]._destY = 0;
- _vm->_linesManager.ZONEP[i]._spriteIndex = 0;
- _vm->_linesManager.ZONEP[i]._verbFl1 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl2 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl3 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl4 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl5 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl6 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl7 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl8 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl9 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl10 = 0;
- _vm->_linesManager.ZONEP[i]._messageId = 0;
- _vm->_linesManager.ZONEP[i]._enabledFl = false;
+ _vm->_linesManager->ZONEP[i]._destX = 0;
+ _vm->_linesManager->ZONEP[i]._destY = 0;
+ _vm->_linesManager->ZONEP[i]._spriteIndex = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl1 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl2 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl3 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl4 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl5 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl6 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl7 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl8 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl9 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl10 = 0;
+ _vm->_linesManager->ZONEP[i]._messageId = 0;
+ _vm->_linesManager->ZONEP[i]._enabledFl = false;
}
Common::File f;
@@ -1672,54 +1672,54 @@ void ObjectsManager::loadZone(const Common::String &file) {
do {
bobZoneIdx = READ_LE_INT16((uint16 *)ptr + bufId);
if (bobZoneIdx != -1) {
- _vm->_linesManager.addZoneLine(
+ _vm->_linesManager->addZoneLine(
zoneLineIdx,
READ_LE_UINT16((uint16 *)ptr + bufId + 1),
READ_LE_UINT16((uint16 *)ptr + bufId + 2),
READ_LE_UINT16((uint16 *)ptr + bufId + 3),
READ_LE_UINT16((uint16 *)ptr + bufId + 4),
bobZoneIdx);
- _vm->_linesManager.ZONEP[bobZoneIdx]._enabledFl = true;
+ _vm->_linesManager->ZONEP[bobZoneIdx]._enabledFl = true;
}
bufId += 5;
++zoneLineIdx;
} while (bobZoneIdx != -1);
for (int i = 1; i <= 100; i++) {
- _vm->_linesManager.ZONEP[i]._destX = READ_LE_INT16((uint16 *)ptr + bufId);
- _vm->_linesManager.ZONEP[i]._destY = READ_LE_INT16((uint16 *)ptr + bufId + 1);
- _vm->_linesManager.ZONEP[i]._spriteIndex = READ_LE_INT16((uint16 *)ptr + bufId + 2);
+ _vm->_linesManager->ZONEP[i]._destX = READ_LE_INT16((uint16 *)ptr + bufId);
+ _vm->_linesManager->ZONEP[i]._destY = READ_LE_INT16((uint16 *)ptr + bufId + 1);
+ _vm->_linesManager->ZONEP[i]._spriteIndex = READ_LE_INT16((uint16 *)ptr + bufId + 2);
bufId += 3;
}
byte *verbData = (ptr + 10 * zoneLineIdx + 606);
bufId = 0;
for (int i = 1; i <= 100; i++) {
- _vm->_linesManager.ZONEP[i]._verbFl1 = verbData[bufId];
- _vm->_linesManager.ZONEP[i]._verbFl2 = verbData[bufId + 1];
- _vm->_linesManager.ZONEP[i]._verbFl3 = verbData[bufId + 2];
- _vm->_linesManager.ZONEP[i]._verbFl4 = verbData[bufId + 3];
- _vm->_linesManager.ZONEP[i]._verbFl5 = verbData[bufId + 4];
- _vm->_linesManager.ZONEP[i]._verbFl6 = verbData[bufId + 5];
- _vm->_linesManager.ZONEP[i]._verbFl7 = verbData[bufId + 6];
- _vm->_linesManager.ZONEP[i]._verbFl8 = verbData[bufId + 7];
- _vm->_linesManager.ZONEP[i]._verbFl9 = verbData[bufId + 8];
- _vm->_linesManager.ZONEP[i]._verbFl10 = verbData[bufId + 9];
+ _vm->_linesManager->ZONEP[i]._verbFl1 = verbData[bufId];
+ _vm->_linesManager->ZONEP[i]._verbFl2 = verbData[bufId + 1];
+ _vm->_linesManager->ZONEP[i]._verbFl3 = verbData[bufId + 2];
+ _vm->_linesManager->ZONEP[i]._verbFl4 = verbData[bufId + 3];
+ _vm->_linesManager->ZONEP[i]._verbFl5 = verbData[bufId + 4];
+ _vm->_linesManager->ZONEP[i]._verbFl6 = verbData[bufId + 5];
+ _vm->_linesManager->ZONEP[i]._verbFl7 = verbData[bufId + 6];
+ _vm->_linesManager->ZONEP[i]._verbFl8 = verbData[bufId + 7];
+ _vm->_linesManager->ZONEP[i]._verbFl9 = verbData[bufId + 8];
+ _vm->_linesManager->ZONEP[i]._verbFl10 = verbData[bufId + 9];
bufId += 10;
}
verbData += 1010;
for (int i = 0; i < 100; i++)
- _vm->_linesManager.ZONEP[i + 1]._messageId = READ_LE_UINT16(verbData + 2 * i);
+ _vm->_linesManager->ZONEP[i + 1]._messageId = READ_LE_UINT16(verbData + 2 * i);
_vm->_globals->freeMemory(ptr);
- _vm->_linesManager.CARRE_ZONE();
+ _vm->_linesManager->CARRE_ZONE();
}
void ObjectsManager::handleCityMap() {
_vm->_dialogsManager->_inventFl = false;
_vm->_eventsManager->_gameKey = KEY_NONE;
- _vm->_linesManager.setMaxLineIdx(1);
+ _vm->_linesManager->setMaxLineIdx(1);
_vm->_globals->_characterMaxPosY = 440;
_vm->_globals->_cityMapEnabledFl = true;
_vm->_graphicsManager->_noFadingFl = false;
@@ -1730,7 +1730,7 @@ void ObjectsManager::handleCityMap() {
_vm->_soundManager.playSound(31);
_vm->_globals->iRegul = 1;
_vm->_graphicsManager->loadImage("PLAN");
- _vm->_linesManager.loadLines("PLAN.OB2");
+ _vm->_linesManager->loadLines("PLAN.OB2");
_vm->_globals->loadHidingItems("PLAN.CA2");
loadZone("PLAN.ZO2");
_spritePtr = _vm->_fileManager->loadFile("VOITURE.SPR");
@@ -1753,7 +1753,7 @@ void ObjectsManager::handleCityMap() {
_vm->_graphicsManager->scrollScreen(getSpriteX(0) - 320);
_vm->_graphicsManager->_scrollOffset = getSpriteX(0) - 320;
animateSprite(0);
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
_vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100);
_vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100);
_vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100);
@@ -1792,10 +1792,10 @@ void ObjectsManager::handleCityMap() {
handleLeftButton();
}
- _vm->_linesManager.checkZone();
+ _vm->_linesManager->checkZone();
GOHOME2();
- if (_vm->_linesManager._route == (RouteItem *)g_PTRNUL && _vm->_globals->_actionMoveTo)
+ if (_vm->_linesManager->_route == (RouteItem *)g_PTRNUL && _vm->_globals->_actionMoveTo)
PARADISE();
_vm->_eventsManager->refreshScreenAndEvents();
@@ -1860,20 +1860,20 @@ void ObjectsManager::handleLeftButton() {
}
}
if (_vm->_globals->_cityMapEnabledFl && _vm->_globals->_actionMoveTo) {
- _vm->_linesManager.checkZone();
+ _vm->_linesManager->checkZone();
if (_zoneNum <= 0)
return;
int routeIdx = 0;
do {
- _vm->_linesManager._testRoute2[routeIdx] = _vm->_linesManager._route[routeIdx];
+ _vm->_linesManager->_testRoute2[routeIdx] = _vm->_linesManager->_route[routeIdx];
++routeIdx;
- } while (_vm->_linesManager._route[routeIdx]._x != -1);
+ } while (_vm->_linesManager->_route[routeIdx]._x != -1);
- _vm->_linesManager._testRoute2[routeIdx].invalidate();
+ _vm->_linesManager->_testRoute2[routeIdx].invalidate();
}
if (_vm->_globals->_actionMoveTo) {
- _vm->_linesManager.checkZone();
+ _vm->_linesManager->checkZone();
_vm->_globals->_actionMoveTo = false;
_vm->_globals->_saveData->_data[svLastMouseCursor] = 0;
_vm->_globals->_saveData->_data[svLastZoneNum] = 0;
@@ -1882,54 +1882,54 @@ void ObjectsManager::handleLeftButton() {
if (_vm->_globals->_cityMapEnabledFl && (_vm->_eventsManager->_mouseCursorId != 4 || _zoneNum <= 0))
return;
if (_zoneNum != -1 && _zoneNum != 0) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._destX && _vm->_linesManager.ZONEP[_zoneNum]._destY && _vm->_linesManager.ZONEP[_zoneNum]._destY != 31) {
- destX = _vm->_linesManager.ZONEP[_zoneNum]._destX;
- destY = _vm->_linesManager.ZONEP[_zoneNum]._destY;
+ if (_vm->_linesManager->ZONEP[_zoneNum]._destX && _vm->_linesManager->ZONEP[_zoneNum]._destY && _vm->_linesManager->ZONEP[_zoneNum]._destY != 31) {
+ destX = _vm->_linesManager->ZONEP[_zoneNum]._destX;
+ destY = _vm->_linesManager->ZONEP[_zoneNum]._destY;
}
}
_vm->_globals->_actionMoveTo = false;
- RouteItem *oldRoute = _vm->_linesManager._route;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ RouteItem *oldRoute = _vm->_linesManager->_route;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
if (_forestFl && _zoneNum >= 20 && _zoneNum <= 23) {
if (getSpriteY(0) > 374 && getSpriteY(0) <= 410) {
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
setSpriteIndex(0, _vm->_globals->_oldDirectionSpriteIdx);
_vm->_globals->_actionDirection = DIR_NONE;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
computeAndSetSpriteSize();
setFlipSprite(0, false);
_vm->_globals->Compteur = 0;
_vm->_globals->_oldDirection = DIR_NONE;
} else {
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(getSpriteX(0), getSpriteY(0), getSpriteX(0), 390);
- if (_vm->_linesManager._route != (RouteItem *)g_PTRNUL)
- _vm->_linesManager.PACOURS_PROPRE(_vm->_linesManager._route);
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(getSpriteX(0), getSpriteY(0), getSpriteX(0), 390);
+ if (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL)
+ _vm->_linesManager->PACOURS_PROPRE(_vm->_linesManager->_route);
_oldCharacterPosX = getSpriteX(0);
_oldCharacterPosY = getSpriteY(0);
_vm->_globals->Compteur = 0;
- if (_vm->_linesManager._route != (RouteItem *)g_PTRNUL || oldRoute == _vm->_linesManager._route) {
+ if (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL || oldRoute == _vm->_linesManager->_route) {
_vm->_globals->_oldDirection = DIR_NONE;
} else {
- _vm->_linesManager._route = oldRoute;
+ _vm->_linesManager->_route = oldRoute;
}
}
} else {
if (!_vm->_globals->_freezeCharacterFl && !_vm->_globals->_cityMapEnabledFl) {
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(getSpriteX(0), getSpriteY(0), destX, destY);
- if (_vm->_linesManager._route != (RouteItem *)g_PTRNUL)
- _vm->_linesManager.PACOURS_PROPRE(_vm->_linesManager._route);
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(getSpriteX(0), getSpriteY(0), destX, destY);
+ if (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL)
+ _vm->_linesManager->PACOURS_PROPRE(_vm->_linesManager->_route);
_oldCharacterPosX = getSpriteX(0);
_oldCharacterPosY = getSpriteY(0);
_vm->_globals->Compteur = 0;
- if (_vm->_linesManager._route != (RouteItem *)g_PTRNUL || oldRoute == _vm->_linesManager._route)
+ if (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL || oldRoute == _vm->_linesManager->_route)
_vm->_globals->_oldDirection = DIR_NONE;
else
- _vm->_linesManager._route = oldRoute;
+ _vm->_linesManager->_route = oldRoute;
}
}
if (!_vm->_globals->_freezeCharacterFl && _vm->_globals->_cityMapEnabledFl)
- _vm->_linesManager._route = _vm->_linesManager.cityMapCarRoute(getSpriteX(0), getSpriteY(0), destX, destY);
+ _vm->_linesManager->_route = _vm->_linesManager->cityMapCarRoute(getSpriteX(0), getSpriteY(0), destX, destY);
if (_zoneNum != -1 && _zoneNum != 0) {
if (_vm->_eventsManager->_mouseCursorId == 23)
@@ -1949,7 +1949,7 @@ void ObjectsManager::handleLeftButton() {
&& _curObjectIndex == 20 && _zoneNum == 12
&& _vm->_eventsManager->_mouseCursorId == 23) {
// Special case for throwing darts at the switch in Purgatory - the player shouldn't move
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
getSpriteX(0);
getSpriteY(0);
}
@@ -2009,7 +2009,7 @@ void ObjectsManager::PARADISE() {
_vm->_talkManager.REPONSE2(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]);
}
_vm->_eventsManager->changeMouseCursor(4);
- if (_zoneNum != -1 && _zoneNum != 0 && !_vm->_linesManager.ZONEP[_zoneNum]._enabledFl) {
+ if (_zoneNum != -1 && _zoneNum != 0 && !_vm->_linesManager->ZONEP[_zoneNum]._enabledFl) {
_zoneNum = -1;
_forceZoneFl = true;
}
@@ -2052,21 +2052,21 @@ void ObjectsManager::clearScreen() {
_vm->_fontManager->hideText(9);
_vm->_globals->clearVBob();
_vm->_animationManager->clearAnim();
- _vm->_linesManager.clearAllZones();
- _vm->_linesManager.resetLines();
+ _vm->_linesManager->clearAllZones();
+ _vm->_linesManager->resetLines();
_vm->_globals->resetHidingItems();
for (int i = 0; i <= 48; i++) {
- _vm->_linesManager.BOBZONE[i] = 0;
- _vm->_linesManager.BOBZONE_FLAG[i] = false;
+ _vm->_linesManager->BOBZONE[i] = 0;
+ _vm->_linesManager->BOBZONE_FLAG[i] = false;
}
_vm->_eventsManager->_mouseCursorId = 4;
_verb = 4;
_zoneNum = 0;
_forceZoneFl = true;
- _vm->_linesManager.resetLinesNumb();
- _vm->_linesManager.resetLastLine();
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->resetLinesNumb();
+ _vm->_linesManager->resetLastLine();
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
_vm->_globals->_answerBuffer = _vm->_globals->freeMemory(_vm->_globals->_answerBuffer);
_vm->_globals->SPRITE_ECRAN = _vm->_globals->freeMemory(_vm->_globals->SPRITE_ECRAN);
_vm->_eventsManager->_startPos.x = 0;
@@ -2076,7 +2076,7 @@ void ObjectsManager::clearScreen() {
_vm->_globals->_actionMoveTo = false;
_forceZoneFl = true;
_changeVerbFl = false;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
_vm->_globals->_oldDirection = DIR_NONE;
_vm->_graphicsManager->resetDirtyRects();
}
@@ -2093,7 +2093,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha
_vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, 532, 25, 65, 40, _vm->_graphicsManager->_vesaBuffer, 532, 25);
_vm->_graphicsManager->addDirtyRect(532, 25, 597, 65);
_vm->_globals->_checkDistanceFl = true;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
if (oldCharacter == CHARACTER_SAMANTHA && newCharacter == CHARACTER_HOPKINS
&& _vm->_globals->_saveData->_realHopkins._location == _vm->_globals->_screenId) {
@@ -2228,139 +2228,139 @@ void ObjectsManager::nextVerbIcon() {
if (_vm->_eventsManager->_mouseCursorId == 5 || _vm->_eventsManager->_mouseCursorId == 6) {
_vm->_eventsManager->_mouseCursorId = 6;
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl1 == 1)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl1 == 1)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 7) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl2 == 1)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl2 == 1)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 8) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl3 == 1)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl3 == 1)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 9) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl4 == 1)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl4 == 1)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 10) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl5 == 1)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl5 == 1)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 11) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl6 == 1)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl6 == 1)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 12) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl7 == 1)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl7 == 1)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 13) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl8 == 1)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl8 == 1)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 14) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl9 == 1)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl9 == 1)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 15) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl10 == 1)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl10 == 1)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 16) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl1 == 2)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl1 == 2)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 17) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl4 == 2)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl4 == 2)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 18) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl5 == 2)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl5 == 2)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 19) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl6 == 2)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl6 == 2)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 20) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl7 == 2)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl7 == 2)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 21) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl10 == 2)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl10 == 2)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 22) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl8 == 2)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl8 == 2)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 23) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl3 == 2)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl3 == 2)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 24) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl4 == 3)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl4 == 3)
return;
++_vm->_eventsManager->_mouseCursorId;
}
if (_vm->_eventsManager->_mouseCursorId == 25) {
- if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl9 == 2)
+ if (_vm->_linesManager->ZONEP[_zoneNum]._verbFl9 == 2)
return;
}
_vm->_eventsManager->_mouseCursorId = 4;
@@ -2663,14 +2663,14 @@ void ObjectsManager::handleSpecialGames() {
setBobAnimDataIdx(5, 0);
setBobAnimation(6);
_vm->_globals->_saveData->_data[svField261] = 2;
- _vm->_linesManager.disableZone(15);
+ _vm->_linesManager->disableZone(15);
_vm->_soundManager.playSoundFile("SOUND75.WAV");
}
if (_vm->_globals->_saveData->_data[svField261] == 2 && getBobAnimDataIdx(6) == 6) {
stopBobAnimation(6);
setBobAnimDataIdx(6, 0);
setBobAnimation(7);
- _vm->_linesManager.enableZone(14);
+ _vm->_linesManager->enableZone(14);
_vm->_globals->_saveData->_data[svField261] = 3;
}
_vm->_globals->_disableInventFl = false;
@@ -3099,18 +3099,18 @@ void ObjectsManager::loadLinkFile(const Common::String &file) {
}
}
- _vm->_linesManager.resetLines();
+ _vm->_linesManager->resetLines();
for (size_t idx = 0; idx < nbytes - 3; idx++) {
if (READ_BE_UINT24(&ptr[idx]) == MKTAG24('O', 'B', '2')) {
byte *curDataPtr = &ptr[idx + 4];
int lineDataIdx = 0;
int curLineIdx = 0;
- _vm->_linesManager.resetLinesNumb();
+ _vm->_linesManager->resetLinesNumb();
Directions curDirection;
do {
curDirection = (Directions)READ_LE_INT16(curDataPtr + 2 * lineDataIdx);
if (curDirection != DIR_NONE) {
- _vm->_linesManager.addLine(
+ _vm->_linesManager->addLine(
curLineIdx,
curDirection,
READ_LE_INT16(curDataPtr + 2 * lineDataIdx + 2),
@@ -3121,7 +3121,7 @@ void ObjectsManager::loadLinkFile(const Common::String &file) {
lineDataIdx += 5;
++curLineIdx;
} while (curDirection != DIR_NONE);
- _vm->_linesManager.initRoute();
+ _vm->_linesManager->initRoute();
}
}
@@ -3131,34 +3131,34 @@ void ObjectsManager::loadLinkFile(const Common::String &file) {
byte *curDataPtr = &ptr[idx + 4];
int curDataIdx = 0;
for (int i = 1; i <= 100; i++) {
- _vm->_linesManager.ZONEP[i]._destX = 0;
- _vm->_linesManager.ZONEP[i]._destY = 0;
- _vm->_linesManager.ZONEP[i]._spriteIndex = 0;
- _vm->_linesManager.ZONEP[i]._verbFl1 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl2 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl3 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl4 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl5 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl6 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl7 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl8 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl9 = 0;
- _vm->_linesManager.ZONEP[i]._verbFl10 = 0;
- _vm->_linesManager.ZONEP[i]._messageId = 0;
+ _vm->_linesManager->ZONEP[i]._destX = 0;
+ _vm->_linesManager->ZONEP[i]._destY = 0;
+ _vm->_linesManager->ZONEP[i]._spriteIndex = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl1 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl2 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl3 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl4 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl5 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl6 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl7 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl8 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl9 = 0;
+ _vm->_linesManager->ZONEP[i]._verbFl10 = 0;
+ _vm->_linesManager->ZONEP[i]._messageId = 0;
}
int curLineIdx = 0;
for (;;) {
int bobZoneId = READ_LE_INT16(curDataPtr + 2 * curDataIdx);
if (bobZoneId != -1) {
- _vm->_linesManager.addZoneLine(
+ _vm->_linesManager->addZoneLine(
curLineIdx,
READ_LE_INT16(curDataPtr + 2 * curDataIdx + 2),
READ_LE_INT16(curDataPtr + 2 * curDataIdx + 4),
READ_LE_INT16(curDataPtr + 2 * curDataIdx + 6),
READ_LE_INT16(curDataPtr + 2 * curDataIdx + 8),
bobZoneId);
- _vm->_linesManager.ZONEP[bobZoneId]._enabledFl = true;
+ _vm->_linesManager->ZONEP[bobZoneId]._enabledFl = true;
}
curDataIdx += 5;
++curLineIdx;
@@ -3166,32 +3166,32 @@ void ObjectsManager::loadLinkFile(const Common::String &file) {
break;
}
for (int i = 1; i <= 100; i++) {
- _vm->_linesManager.ZONEP[i]._destX = READ_LE_INT16(curDataPtr + 2 * curDataIdx);
- _vm->_linesManager.ZONEP[i]._destY = READ_LE_INT16(curDataPtr + 2 * curDataIdx + 2);
- _vm->_linesManager.ZONEP[i]._spriteIndex = READ_LE_INT16(curDataPtr + 2 * curDataIdx + 4);
+ _vm->_linesManager->ZONEP[i]._destX = READ_LE_INT16(curDataPtr + 2 * curDataIdx);
+ _vm->_linesManager->ZONEP[i]._destY = READ_LE_INT16(curDataPtr + 2 * curDataIdx + 2);
+ _vm->_linesManager->ZONEP[i]._spriteIndex = READ_LE_INT16(curDataPtr + 2 * curDataIdx + 4);
curDataIdx += 3;
}
byte *verbData = ptr + idx + (10 * curLineIdx + 606) + 4;
for (int i = 1; i <= 100; i++) {
int j = (i - 1) * 10;
- _vm->_linesManager.ZONEP[i]._verbFl1 = verbData[j];
- _vm->_linesManager.ZONEP[i]._verbFl2 = verbData[j + 1];
- _vm->_linesManager.ZONEP[i]._verbFl3 = verbData[j + 2];
- _vm->_linesManager.ZONEP[i]._verbFl4 = verbData[j + 3];
- _vm->_linesManager.ZONEP[i]._verbFl5 = verbData[j + 4];
- _vm->_linesManager.ZONEP[i]._verbFl6 = verbData[j + 5];
- _vm->_linesManager.ZONEP[i]._verbFl7 = verbData[j + 6];
- _vm->_linesManager.ZONEP[i]._verbFl8 = verbData[j + 7];
- _vm->_linesManager.ZONEP[i]._verbFl9 = verbData[j + 8];
- _vm->_linesManager.ZONEP[i]._verbFl10 = verbData[j + 9];
+ _vm->_linesManager->ZONEP[i]._verbFl1 = verbData[j];
+ _vm->_linesManager->ZONEP[i]._verbFl2 = verbData[j + 1];
+ _vm->_linesManager->ZONEP[i]._verbFl3 = verbData[j + 2];
+ _vm->_linesManager->ZONEP[i]._verbFl4 = verbData[j + 3];
+ _vm->_linesManager->ZONEP[i]._verbFl5 = verbData[j + 4];
+ _vm->_linesManager->ZONEP[i]._verbFl6 = verbData[j + 5];
+ _vm->_linesManager->ZONEP[i]._verbFl7 = verbData[j + 6];
+ _vm->_linesManager->ZONEP[i]._verbFl8 = verbData[j + 7];
+ _vm->_linesManager->ZONEP[i]._verbFl9 = verbData[j + 8];
+ _vm->_linesManager->ZONEP[i]._verbFl10 = verbData[j + 9];
}
int dep = 1010;
for (int i = 1; i <= 100; i++) {
- _vm->_linesManager.ZONEP[i]._messageId = READ_LE_INT16(verbData + dep);
+ _vm->_linesManager->ZONEP[i]._messageId = READ_LE_INT16(verbData + dep);
dep += 2;
}
- _vm->_linesManager.CARRE_ZONE();
+ _vm->_linesManager->CARRE_ZONE();
}
}
}
@@ -3262,22 +3262,22 @@ void ObjectsManager::sceneSpecialIni() {
case 39:
case 40:
case 41:
- _vm->_linesManager.BOBZONE[20] = 1;
- _vm->_linesManager.BOBZONE[21] = 2;
- _vm->_linesManager.BOBZONE[22] = 3;
- _vm->_linesManager.BOBZONE[23] = 4;
- _vm->_linesManager.BOBZONE_FLAG[20] = true;
- _vm->_linesManager.BOBZONE_FLAG[21] = true;
- _vm->_linesManager.BOBZONE_FLAG[22] = true;
- _vm->_linesManager.BOBZONE_FLAG[23] = true;
+ _vm->_linesManager->BOBZONE[20] = 1;
+ _vm->_linesManager->BOBZONE[21] = 2;
+ _vm->_linesManager->BOBZONE[22] = 3;
+ _vm->_linesManager->BOBZONE[23] = 4;
+ _vm->_linesManager->BOBZONE_FLAG[20] = true;
+ _vm->_linesManager->BOBZONE_FLAG[21] = true;
+ _vm->_linesManager->BOBZONE_FLAG[22] = true;
+ _vm->_linesManager->BOBZONE_FLAG[23] = true;
enableVerb(20, 5);
enableVerb(21, 5);
enableVerb(22, 5);
enableVerb(23, 5);
- _vm->_linesManager.ZONEP[20]._messageId = 30;
- _vm->_linesManager.ZONEP[21]._messageId = 30;
- _vm->_linesManager.ZONEP[22]._messageId = 30;
- _vm->_linesManager.ZONEP[23]._messageId = 30;
+ _vm->_linesManager->ZONEP[20]._messageId = 30;
+ _vm->_linesManager->ZONEP[21]._messageId = 30;
+ _vm->_linesManager->ZONEP[22]._messageId = 30;
+ _vm->_linesManager->ZONEP[23]._messageId = 30;
for (int i = svField200; i <= svField214; i++) {
if (_vm->_globals->_saveData->_data[i] != 2)
_vm->_globals->_saveData->_data[i] = 0;
@@ -3335,42 +3335,42 @@ void ObjectsManager::disableVerb(int idx, int a2) {
switch (a2) {
case 6:
case 16:
- _vm->_linesManager.ZONEP[idx]._verbFl1 = 0;
+ _vm->_linesManager->ZONEP[idx]._verbFl1 = 0;
break;
case 7:
- _vm->_linesManager.ZONEP[idx]._verbFl2 = 0;
+ _vm->_linesManager->ZONEP[idx]._verbFl2 = 0;
break;
case 5:
case 8:
- _vm->_linesManager.ZONEP[idx]._verbFl3 = 0;
+ _vm->_linesManager->ZONEP[idx]._verbFl3 = 0;
break;
case 9:
case 17:
case 24:
- _vm->_linesManager.ZONEP[idx]._verbFl4 = 0;
+ _vm->_linesManager->ZONEP[idx]._verbFl4 = 0;
break;
case 10:
case 18:
- _vm->_linesManager.ZONEP[idx]._verbFl5 = 0;
+ _vm->_linesManager->ZONEP[idx]._verbFl5 = 0;
break;
case 11:
case 19:
- _vm->_linesManager.ZONEP[idx]._verbFl6 = 0;
+ _vm->_linesManager->ZONEP[idx]._verbFl6 = 0;
break;
case 12:
case 20:
- _vm->_linesManager.ZONEP[idx]._verbFl7 = 0;
+ _vm->_linesManager->ZONEP[idx]._verbFl7 = 0;
break;
case 13:
case 22:
- _vm->_linesManager.ZONEP[idx]._verbFl8 = 0;
+ _vm->_linesManager->ZONEP[idx]._verbFl8 = 0;
case 14:
case 21:
case 25:
- _vm->_linesManager.ZONEP[idx]._verbFl9 = 0;
+ _vm->_linesManager->ZONEP[idx]._verbFl9 = 0;
break;
case 15:
- _vm->_linesManager.ZONEP[idx]._verbFl10 = 0;
+ _vm->_linesManager->ZONEP[idx]._verbFl10 = 0;
break;
}
_changeVerbFl = true;
@@ -3379,64 +3379,64 @@ void ObjectsManager::disableVerb(int idx, int a2) {
void ObjectsManager::enableVerb(int idx, int a2) {
switch (a2) {
case 5:
- _vm->_linesManager.ZONEP[idx]._verbFl3 = 2;
+ _vm->_linesManager->ZONEP[idx]._verbFl3 = 2;
break;
case 6:
- _vm->_linesManager.ZONEP[idx]._verbFl1 = 1;
+ _vm->_linesManager->ZONEP[idx]._verbFl1 = 1;
break;
case 7:
- _vm->_linesManager.ZONEP[idx]._verbFl2 = 1;
+ _vm->_linesManager->ZONEP[idx]._verbFl2 = 1;
break;
case 8:
- _vm->_linesManager.ZONEP[idx]._verbFl3 = 1;
+ _vm->_linesManager->ZONEP[idx]._verbFl3 = 1;
break;
case 9:
- _vm->_linesManager.ZONEP[idx]._verbFl4 = 1;
+ _vm->_linesManager->ZONEP[idx]._verbFl4 = 1;
break;
case 10:
- _vm->_linesManager.ZONEP[idx]._verbFl5 = 1;
+ _vm->_linesManager->ZONEP[idx]._verbFl5 = 1;
break;
case 11:
- _vm->_linesManager.ZONEP[idx]._verbFl6 = 1;
+ _vm->_linesManager->ZONEP[idx]._verbFl6 = 1;
break;
case 12:
- _vm->_linesManager.ZONEP[idx]._verbFl7 = 1;
+ _vm->_linesManager->ZONEP[idx]._verbFl7 = 1;
break;
case 13:
- _vm->_linesManager.ZONEP[idx]._verbFl8 = 1;
+ _vm->_linesManager->ZONEP[idx]._verbFl8 = 1;
break;
case 14:
- _vm->_linesManager.ZONEP[idx]._verbFl8 = 1;
+ _vm->_linesManager->ZONEP[idx]._verbFl8 = 1;
break;
case 15:
- _vm->_linesManager.ZONEP[idx]._verbFl9 = 1;
+ _vm->_linesManager->ZONEP[idx]._verbFl9 = 1;
break;
case 16:
- _vm->_linesManager.ZONEP[idx]._verbFl1 = 2;
+ _vm->_linesManager->ZONEP[idx]._verbFl1 = 2;
break;
case 17:
- _vm->_linesManager.ZONEP[idx]._verbFl4 = 2;
+ _vm->_linesManager->ZONEP[idx]._verbFl4 = 2;
break;
case 18:
- _vm->_linesManager.ZONEP[idx]._verbFl5 = 2;
+ _vm->_linesManager->ZONEP[idx]._verbFl5 = 2;
break;
case 19:
- _vm->_linesManager.ZONEP[idx]._verbFl6 = 2;
+ _vm->_linesManager->ZONEP[idx]._verbFl6 = 2;
break;
case 20:
- _vm->_linesManager.ZONEP[idx]._verbFl7 = 2;
+ _vm->_linesManager->ZONEP[idx]._verbFl7 = 2;
break;
case 21:
- _vm->_linesManager.ZONEP[idx]._verbFl9 = 2;
+ _vm->_linesManager->ZONEP[idx]._verbFl9 = 2;
break;
case 22:
- _vm->_linesManager.ZONEP[idx]._verbFl8 = 2;
+ _vm->_linesManager->ZONEP[idx]._verbFl8 = 2;
break;
case 24:
- _vm->_linesManager.ZONEP[idx]._verbFl4 = 3;
+ _vm->_linesManager->ZONEP[idx]._verbFl4 = 3;
break;
case 25:
- _vm->_linesManager.ZONEP[idx]._verbFl9 = 2;
+ _vm->_linesManager->ZONEP[idx]._verbFl9 = 2;
break;
}
}
@@ -3668,7 +3668,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
_vm->_globals->_cityMapEnabledFl = false;
_vm->_globals->iRegul = 1;
_vm->_soundManager.playSound(soundNum);
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
_vm->_globals->_freezeCharacterFl = true;
_vm->_globals->_exitId = 0;
if (!backgroundFile.empty())
@@ -3688,7 +3688,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
if (_vm->_globals->_screenId == 61) {
addStaticSprite(_vm->_globals->PERSO, Common::Point(330, 418), 0, 60, 0, false, 34, 190);
animateSprite(0);
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
computeAndSetSpriteSize();
}
_vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100);
@@ -3706,13 +3706,13 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
_oldCharacterPosX = getSpriteX(0);
_vm->_globals->_oldDirection = DIR_NONE;
_vm->_globals->Compteur = 0;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(getSpriteX(0), getSpriteY(0), 330, 345);
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(getSpriteX(0), getSpriteY(0), 330, 345);
_vm->_globals->_checkDistanceFl = true;
do {
GOHOME();
_vm->_eventsManager->refreshScreenAndEvents();
- } while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
+ } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL);
setSpriteIndex(0, 64);
}
do {
@@ -3723,7 +3723,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
} else if (mouseButton == 2)
handleRightButton();
_vm->_dialogsManager->testDialogOpening();
- _vm->_linesManager.checkZone();
+ _vm->_linesManager->checkZone();
if (_vm->_globals->_actionMoveTo)
PARADISE();
if (!_vm->_globals->_exitId)
@@ -3814,7 +3814,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
computeAndSetSpriteSize();
animateSprite(0);
_vm->_globals->enableHiding();
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
computeAndSetSpriteSize();
sceneSpecialIni();
_vm->_eventsManager->_mouseSpriteId = 4;
@@ -3845,7 +3845,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
int yp = _vm->_eventsManager->getMouseY();
if ((xCheck == xp) && (yCheck == yp)) {
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
PARADISE();
if (_vm->_globals->_exitId)
breakFlag = true;
@@ -3860,9 +3860,9 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
}
if (!_vm->_globals->_exitId) {
_vm->_dialogsManager->testDialogOpening();
- _vm->_linesManager.checkZone();
- if (_vm->_linesManager._route == (RouteItem *)g_PTRNUL
- || (GOHOME(), _vm->_linesManager._route == (RouteItem *)g_PTRNUL)) {
+ _vm->_linesManager->checkZone();
+ if (_vm->_linesManager->_route == (RouteItem *)g_PTRNUL
+ || (GOHOME(), _vm->_linesManager->_route == (RouteItem *)g_PTRNUL)) {
if (_vm->_globals->_actionMoveTo)
PARADISE();
}
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp
index 343b0fde6c..2b30c789c1 100644
--- a/engines/hopkins/script.cpp
+++ b/engines/hopkins/script.cpp
@@ -486,11 +486,11 @@ int ScriptManager::handleOpcode(byte *dataP) {
opcodeType = 2;
break;
case MKTAG24('Z', 'O', 'N'):
- _vm->_linesManager.enableZone(READ_LE_INT16(dataP + 5));
+ _vm->_linesManager->enableZone(READ_LE_INT16(dataP + 5));
opcodeType = 1;
break;
case MKTAG24('Z', 'O', 'F'):
- _vm->_linesManager.disableZone(READ_LE_INT16(dataP + 5));
+ _vm->_linesManager->disableZone(READ_LE_INT16(dataP + 5));
opcodeType = 1;
break;
case MKTAG24('E', 'X', 'I'):
@@ -753,8 +753,8 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 46: {
_vm->_globals->_checkDistanceFl = true;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 564, 420);
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 564, 420);
_vm->_objectsManager._zoneNum = -1;
do {
if (_vm->shouldQuit())
@@ -762,7 +762,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager.GOHOME();
_vm->_eventsManager->refreshScreenAndEvents();
- } while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
+ } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.removeSprite(0);
_vm->_globals->_checkDistanceFl = true;
_vm->_soundManager.loadSample(1, "SOUND44.WAV");
@@ -980,8 +980,8 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager._oldCharacterPosX = _vm->_objectsManager.getSpriteX(0);
_vm->_globals->_oldDirection = DIR_NONE;
_vm->_globals->Compteur = 0;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 445, 332);
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 445, 332);
_vm->_globals->_checkDistanceFl = true;
do {
if (_vm->shouldQuit())
@@ -989,7 +989,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager.GOHOME();
_vm->_eventsManager->refreshScreenAndEvents();
- } while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
+ } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.removeSprite(0);
_vm->_objectsManager.setBobAnimation(7);
_vm->_objectsManager.setBobAnimDataIdx(7, 0);
@@ -1098,8 +1098,8 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager._oldCharacterPosX = _vm->_objectsManager.getSpriteX(0);
_vm->_globals->_oldDirection = DIR_NONE;
_vm->_globals->Compteur = 0;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 119, 268);
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 119, 268);
_vm->_globals->_checkDistanceFl = true;
do {
if (_vm->shouldQuit())
@@ -1107,7 +1107,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager.GOHOME();
_vm->_eventsManager->refreshScreenAndEvents();
- } while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
+ } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.removeSprite(0);
_vm->_objectsManager.setBobAnimation(11);
_vm->_objectsManager.setBobAnimation(8);
@@ -1419,15 +1419,15 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager._oldCharacterPosX = _vm->_objectsManager.getSpriteX(0);
_vm->_globals->_oldDirection = DIR_NONE;
_vm->_globals->Compteur = 0;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
if (_vm->_globals->_saveData->_data[svField253] == 1) {
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 201, 294);
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 201, 294);
}
if (_vm->_globals->_saveData->_data[svField253] == 2) {
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 158, 338);
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 158, 338);
}
if (_vm->_globals->_saveData->_data[svField253] > 2) {
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 211, 393);
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 211, 393);
}
_vm->_globals->_checkDistanceFl = true;
do {
@@ -1436,7 +1436,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager.GOHOME();
_vm->_eventsManager->refreshScreenAndEvents();
- } while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
+ } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.removeSprite(0);
_vm->_objectsManager.setSpriteIndex(0, 60);
_vm->_soundManager.loadSample(1, "SOUND63.WAV");
@@ -1664,8 +1664,8 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_globals->_oldDirection = DIR_NONE;
_vm->_globals->Compteur = 0;
_vm->_globals->_checkDistanceFl = true;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 361, 325);
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 361, 325);
_vm->_globals->_checkDistanceFl = true;
_vm->_objectsManager._zoneNum = -1;
do {
@@ -1674,7 +1674,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager.GOHOME();
_vm->_eventsManager->refreshScreenAndEvents();
- } while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
+ } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL);
_vm->_globals->_exitId = 59;
break;
}
@@ -1692,8 +1692,8 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_globals->_oldDirection = DIR_NONE;
_vm->_globals->Compteur = 0;
_vm->_globals->_checkDistanceFl = true;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 361, 325);
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 361, 325);
_vm->_globals->_checkDistanceFl = true;
_vm->_objectsManager._zoneNum = -1;
do {
@@ -1702,7 +1702,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager.GOHOME();
_vm->_eventsManager->refreshScreenAndEvents();
- } while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
+ } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL);
_vm->_globals->_exitId = 59;
break;
}
@@ -1879,8 +1879,8 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_soundManager._specialSoundNum = 0;
}
_vm->_globals->_checkDistanceFl = true;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 330, 418);
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 330, 418);
_vm->_globals->_checkDistanceFl = true;
_vm->_objectsManager._zoneNum = 0;
do {
@@ -1889,7 +1889,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager.GOHOME();
_vm->_eventsManager->refreshScreenAndEvents();
- } while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
+ } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.setSpriteIndex(0, 64);
_vm->_globals->_exitId = _vm->_globals->_saveData->_data[svField401];
_vm->_globals->_disableInventFl = false;
@@ -1909,9 +1909,9 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(1) != 9);
_vm->_objectsManager.stopBobAnimation(1);
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
_vm->_globals->_checkDistanceFl = true;
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 330, 314);
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 330, 314);
_vm->_objectsManager._zoneNum = 0;
_vm->_globals->_checkDistanceFl = true;
do {
@@ -1920,7 +1920,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager.GOHOME();
_vm->_eventsManager->refreshScreenAndEvents();
- } while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
+ } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.setSpriteIndex(0, 64);
_vm->_objectsManager.setBobAnimation(2);
_vm->_soundManager.playSoundFile("SOUND66.WAV");
@@ -2008,8 +2008,8 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_globals->_oldDirection = DIR_NONE;
_vm->_globals->Compteur = 0;
_vm->_globals->_checkDistanceFl = true;
- _vm->_linesManager._route = (RouteItem *)g_PTRNUL;
- _vm->_linesManager._route = _vm->_linesManager.PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 488, 280);
+ _vm->_linesManager->_route = (RouteItem *)g_PTRNUL;
+ _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager.getSpriteX(0), _vm->_objectsManager.getSpriteY(0), 488, 280);
_vm->_globals->_checkDistanceFl = true;
do {
if (_vm->shouldQuit())
@@ -2017,7 +2017,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager.GOHOME();
_vm->_eventsManager->refreshScreenAndEvents();
- } while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
+ } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.removeSprite(0);
bool playFl = false;
_vm->_objectsManager.setBobAnimation(7);
@@ -2304,7 +2304,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 245:
_vm->_soundManager.playSoundFile("SOUND89.WAV");
_vm->_objectsManager.OPTI_ONE(5, 0, 6, 0);
- _vm->_linesManager.ZONEP[4]._destX = 276;
+ _vm->_linesManager->ZONEP[4]._destX = 276;
_vm->_objectsManager.enableVerb(4, 19);
_vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 285, 379, 0);
_vm->_globals->_saveData->_data[svField399] = 1;
@@ -2465,7 +2465,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
opcodeType = 1;
break;
case MKTAG24('Z', 'C', 'H'):
- _vm->_linesManager.ZONEP[READ_LE_INT16(dataP + 5)]._messageId = READ_LE_INT16(dataP + 7);
+ _vm->_linesManager->ZONEP[READ_LE_INT16(dataP + 5)]._messageId = READ_LE_INT16(dataP + 7);
opcodeType = 1;
break;
case MKTAG24('J', 'U', 'M'):
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index a5353527e6..6b5047d131 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -911,8 +911,8 @@ void TalkManager::REPONSE2(int zone, int verb) {
break;
}
_vm->_globals->_saveData->_data[indx] = 2;
- _vm->_linesManager.disableZone(22);
- _vm->_linesManager.disableZone(23);
+ _vm->_linesManager->disableZone(22);
+ _vm->_linesManager->disableZone(23);
} else if (zone == 20 || zone == 21) {
_vm->_objectsManager.setFlipSprite(0, true);
_vm->_objectsManager.setSpriteIndex(0, 62);
@@ -958,8 +958,8 @@ void TalkManager::REPONSE2(int zone, int verb) {
break;
}
_vm->_globals->_saveData->_data[indx] = 2;
- _vm->_linesManager.disableZone(21);
- _vm->_linesManager.disableZone(20);
+ _vm->_linesManager->disableZone(21);
+ _vm->_linesManager->disableZone(20);
}
}
@@ -968,12 +968,12 @@ void TalkManager::animateObject(const Common::String &filename) {
_vm->_fontManager->hideText(9);
_vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager->_scrollStatus = 1;
- _vm->_linesManager.clearAllZones();
- _vm->_linesManager.resetLines();
+ _vm->_linesManager->clearAllZones();
+ _vm->_linesManager->resetLines();
_vm->_globals->resetHidingItems();
for (int i = 0; i <= 44; i++)
- _vm->_linesManager.BOBZONE[i] = 0;
+ _vm->_linesManager->BOBZONE[i] = 0;
_vm->_objectsManager._zoneNum = -1;
_vm->_eventsManager->_mouseCursorId = 4;
@@ -1034,7 +1034,7 @@ void TalkManager::animateObject(const Common::String &filename) {
else if (mouseButton == 2)
_vm->_objectsManager.handleRightButton();
- _vm->_linesManager.checkZone();
+ _vm->_linesManager->checkZone();
if (_vm->_globals->_actionMoveTo)
_vm->_objectsManager.PARADISE();
_vm->_eventsManager->refreshScreenAndEvents();
@@ -1047,11 +1047,11 @@ void TalkManager::animateObject(const Common::String &filename) {
_characterBuffer = _vm->_globals->freeMemory(_characterBuffer);
_characterSprite = _vm->_globals->freeMemory(_characterSprite);
_vm->_graphicsManager->NB_SCREEN(false);
- _vm->_linesManager.clearAllZones();
- _vm->_linesManager.resetLines();
+ _vm->_linesManager->clearAllZones();
+ _vm->_linesManager->resetLines();
_vm->_globals->resetHidingItems();
for (int i = 0; i <= 44; i++)
- _vm->_linesManager.BOBZONE[i] = 0;
+ _vm->_linesManager->BOBZONE[i] = 0;
_vm->_globals->freeMemory(_vm->_globals->_answerBuffer);
_vm->_globals->_answerBuffer = oldAnswerBufferPtr;