diff options
author | Strangerke | 2013-03-20 07:56:16 +0100 |
---|---|---|
committer | Strangerke | 2013-03-20 07:56:16 +0100 |
commit | c5c7ced5ee2186ace50549ca9e14b70708de5b54 (patch) | |
tree | 77b5e05b0c331db94f0ad262b6813d60f945681e | |
parent | 56ae0044750a6f4bbe936ba304e9f726fba70dad (diff) | |
download | scummvm-rg350-c5c7ced5ee2186ace50549ca9e14b70708de5b54.tar.gz scummvm-rg350-c5c7ced5ee2186ace50549ca9e14b70708de5b54.tar.bz2 scummvm-rg350-c5c7ced5ee2186ace50549ca9e14b70708de5b54.zip |
HOPKINS: Remove setParent() from MenuManager and ObjectsManager
-rw-r--r-- | engines/hopkins/anim.cpp | 8 | ||||
-rw-r--r-- | engines/hopkins/computer.cpp | 36 | ||||
-rw-r--r-- | engines/hopkins/dialogs.cpp | 140 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/font.cpp | 14 | ||||
-rw-r--r-- | engines/hopkins/globals.cpp | 10 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 18 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 454 | ||||
-rw-r--r-- | engines/hopkins/hopkins.h | 4 | ||||
-rw-r--r-- | engines/hopkins/lines.cpp | 36 | ||||
-rw-r--r-- | engines/hopkins/menu.cpp | 18 | ||||
-rw-r--r-- | engines/hopkins/menu.h | 3 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 8 | ||||
-rw-r--r-- | engines/hopkins/objects.h | 3 | ||||
-rw-r--r-- | engines/hopkins/saveload.cpp | 8 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 898 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 172 |
17 files changed, 915 insertions, 917 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index d98f8f790f..6ebeab36f8 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -520,8 +520,8 @@ int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) { int objectDataIdx = 0; for(objectDataIdx = 0; objectDataIdx <= 249; objectDataIdx++) { - int width = _vm->_objectsManager.getWidth(fileDataPtr, objectDataIdx); - int height = _vm->_objectsManager.getHeight(fileDataPtr, objectDataIdx); + int width = _vm->_objectsManager->getWidth(fileDataPtr, objectDataIdx); + int height = _vm->_objectsManager->getHeight(fileDataPtr, objectDataIdx); if (!width && !height) break; } @@ -551,9 +551,9 @@ int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) { int x2 = READ_LE_INT16(curOfsData + 4); int y2 = READ_LE_INT16(curOfsData + 6); - _vm->_objectsManager.setOffsetXY(_vm->_globals->Bank[idx]._data, objIdx, x1, y1, 0); + _vm->_objectsManager->setOffsetXY(_vm->_globals->Bank[idx]._data, objIdx, x1, y1, 0); if (_vm->_globals->Bank[idx]._fileHeader == 2) - _vm->_objectsManager.setOffsetXY(_vm->_globals->Bank[idx]._data, objIdx, x2, y2, 1); + _vm->_objectsManager->setOffsetXY(_vm->_globals->Bank[idx]._data, objIdx, x2, y2, 1); } _vm->_globals->freeMemory(ofsData); diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp index 2359c8b2fa..e6369b84f5 100644 --- a/engines/hopkins/computer.cpp +++ b/engines/hopkins/computer.cpp @@ -530,7 +530,7 @@ void ComputerManager::readText(int idx) { * Display breakout when Games sub-menu is selected */ void ComputerManager::displayGamesSubMenu() { - const byte *oldSpriteData = _vm->_objectsManager._sprite[0]._spriteData; + const byte *oldSpriteData = _vm->_objectsManager->_sprite[0]._spriteData; uint oldSpeed = _vm->_globals->_speed; _vm->_globals->_speed = 1; @@ -562,7 +562,7 @@ void ComputerManager::displayGamesSubMenu() { _vm->_graphicsManager->resetDirtyRects(); _breakoutSpr = _vm->_globals->freeMemory(_breakoutSpr); _breakoutLevel = (int16 *)_vm->_globals->freeMemory((byte *)_breakoutLevel); - _vm->_objectsManager._sprite[0]._spriteData = oldSpriteData; + _vm->_objectsManager->_sprite[0]._spriteData = oldSpriteData; _vm->_soundManager.removeSample(1); _vm->_soundManager.removeSample(2); @@ -619,8 +619,8 @@ void ComputerManager::setModeVGA256() { * Load new level */ void ComputerManager::newLevel() { - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.removeSprite(1); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->removeSprite(1); ++_breakoutLives; if (_breakoutLives > 11) _breakoutLives = 11; @@ -643,13 +643,13 @@ void ComputerManager::newLevel() { _breakoutLevel = (int16 *)_vm->_fileManager->loadFile(file); displayBricks(); - _vm->_objectsManager.addStaticSprite(_breakoutSpr, Common::Point(150, 192), 0, 13, 0, false, 0, 0); - _vm->_objectsManager.addStaticSprite(_breakoutSpr, Common::Point(164, 187), 1, 14, 0, false, 0, 0); + _vm->_objectsManager->addStaticSprite(_breakoutSpr, Common::Point(150, 192), 0, 13, 0, false, 0, 0); + _vm->_objectsManager->addStaticSprite(_breakoutSpr, Common::Point(164, 187), 1, 14, 0, false, 0, 0); _ballPosition = Common::Point(164, 187); _padPositionX = 150; - _vm->_objectsManager.animateSprite(0); - _vm->_objectsManager.animateSprite(1); + _vm->_objectsManager->animateSprite(0); + _vm->_objectsManager->animateSprite(1); _vm->_eventsManager->mouseOn(); _vm->_soundManager.playSample(3, 5); @@ -727,8 +727,8 @@ void ComputerManager::playBreakout() { // Set up the racket and ball _vm->_eventsManager->mouseOff(); _ballPosition = Common::Point(_padPositionX + 14, 187); - _vm->_objectsManager.setSpriteY(1, 187); - _vm->_objectsManager.setSpriteX(1, _ballPosition.x); + _vm->_objectsManager->setSpriteY(1, 187); + _vm->_objectsManager->setSpriteX(1, _ballPosition.x); _vm->_graphicsManager->resetDirtyRects(); _vm->_eventsManager->refreshScreenAndEvents(); @@ -741,9 +741,9 @@ void ComputerManager::playBreakout() { _padPositionX = 5; if (_padPositionX > 282) _padPositionX = 282; - _vm->_objectsManager.setSpriteX(0, _padPositionX); - _vm->_objectsManager.setSpriteX(1, _padPositionX + 14); - _vm->_objectsManager.setSpriteY(1, 187); + _vm->_objectsManager->setSpriteX(0, _padPositionX); + _vm->_objectsManager->setSpriteX(1, _padPositionX + 14); + _vm->_objectsManager->setSpriteY(1, 187); _vm->_eventsManager->refreshScreenAndEvents(); } while (!_vm->shouldQuit() && _vm->_eventsManager->getMouseButton() != 1); @@ -761,7 +761,7 @@ void ComputerManager::playBreakout() { _padPositionX = 5; if (_padPositionX > 282) _padPositionX = 282; - _vm->_objectsManager.setSpriteX(0, _padPositionX); + _vm->_objectsManager->setSpriteX(0, _padPositionX); lastBreakoutEvent = moveBall(); _vm->_eventsManager->refreshScreenAndEvents(); } while (!_vm->shouldQuit() && !lastBreakoutEvent); @@ -778,8 +778,8 @@ void ComputerManager::playBreakout() { _vm->_graphicsManager->fadeOutBreakout(); _vm->_eventsManager->mouseOn(); - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.removeSprite(1); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->removeSprite(1); if (_breakoutScore > _breakoutHiscore) getScoreName(); if (displayHiscores() != 1) @@ -1094,8 +1094,8 @@ int ComputerManager::moveBall() { if (_ballPosition.y > 194) retVal = 1; checkBallCollisions(); - _vm->_objectsManager.setSpriteX(1, _ballPosition.x); - _vm->_objectsManager.setSpriteY(1, _ballPosition.y); + _vm->_objectsManager->setSpriteX(1, _ballPosition.x); + _vm->_objectsManager->setSpriteY(1, _ballPosition.y); if (!_breakoutBrickNbr) retVal = 2; return retVal; diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp index d189736ddf..0e396cb7ae 100644 --- a/engines/hopkins/dialogs.cpp +++ b/engines/hopkins/dialogs.cpp @@ -311,8 +311,8 @@ void DialogsManager::showInventory() { return; _vm->_graphicsManager->_scrollStatus = 1; - _vm->_objectsManager._eraseVisibleCounter = 4; - _vm->_objectsManager._visibleFl = false; + _vm->_objectsManager->_eraseVisibleCounter = 4; + _vm->_objectsManager->_visibleFl = false; for (int i = 0; i <= 1; i++) { inventAnim(); _vm->_eventsManager->getMouseX(); @@ -359,8 +359,8 @@ void DialogsManager::showInventory() { _inventX = _vm->_graphicsManager->_scrollOffset + 152; _inventY = 114; - _inventWidth = _vm->_objectsManager.getWidth(_inventWin1, 0); - _inventHeight = _vm->_objectsManager.getHeight(_inventWin1, 0); + _inventWidth = _vm->_objectsManager->getWidth(_inventWin1, 0); + _inventHeight = _vm->_objectsManager->getHeight(_inventWin1, 0); _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _inventWin1, _inventX + 300, 414, 0, 0, 0, false); int curPosY = 0; @@ -372,7 +372,7 @@ void DialogsManager::showInventory() { int inventIdx = _vm->_globals->_inventory[inventCount]; // The last two zones are not reserved for the inventory: Options and Save/Load if (inventIdx && inventCount <= 29) { - byte *obj = _vm->_objectsManager.loadObjectFromFile(inventIdx, false); + byte *obj = _vm->_objectsManager->loadObjectFromFile(inventIdx, false); _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, obj, _inventX + curPosX + 6, curPosY + 120, _vm->_globals->_objectWidth, _vm->_globals->_objectHeight); _vm->_globals->freeMemory(obj); @@ -396,10 +396,10 @@ void DialogsManager::showInventory() { int oldInventoryItem = newInventoryItem; newInventoryItem = _vm->_linesManager->checkInventoryHotspots(mousePosX, mousePosY); if (newInventoryItem != oldInventoryItem) - _vm->_objectsManager.initBorder(newInventoryItem); + _vm->_objectsManager->initBorder(newInventoryItem); if (_vm->_eventsManager->_mouseCursorId != 1 && _vm->_eventsManager->_mouseCursorId != 2 && _vm->_eventsManager->_mouseCursorId != 3 && _vm->_eventsManager->_mouseCursorId != 16) { if (mouseButton == 2) { - _vm->_objectsManager.nextObjectIcon(newInventoryItem); + _vm->_objectsManager->nextObjectIcon(newInventoryItem); if (_vm->_eventsManager->_mouseCursorId != 23) _vm->_eventsManager->changeMouseCursor(_vm->_eventsManager->_mouseCursorId); } @@ -407,15 +407,15 @@ void DialogsManager::showInventory() { if (mouseButton == 1) { if (_vm->_eventsManager->_mouseCursorId == 1 || _vm->_eventsManager->_mouseCursorId == 2 || _vm->_eventsManager->_mouseCursorId == 3 || _vm->_eventsManager->_mouseCursorId == 16 || !_vm->_eventsManager->_mouseCursorId) break; - _vm->_objectsManager.takeInventoryObject(_vm->_globals->_inventory[newInventoryItem]); + _vm->_objectsManager->takeInventoryObject(_vm->_globals->_inventory[newInventoryItem]); if (_vm->_eventsManager->_mouseCursorId == 8) break; _vm->_scriptManager._tempObjectFl = true; - _vm->_globals->_saveData->_data[svLastObjectIndex] = _vm->_objectsManager._curObjectIndex; + _vm->_globals->_saveData->_data[svLastObjectIndex] = _vm->_objectsManager->_curObjectIndex; _vm->_globals->_saveData->_data[svLastInventoryItem] = _vm->_globals->_inventory[newInventoryItem]; _vm->_globals->_saveData->_data[svLastInvMouseCursor] = _vm->_eventsManager->_mouseCursorId; - _vm->_objectsManager.OPTI_OBJET(); + _vm->_objectsManager->OPTI_OBJET(); _vm->_scriptManager._tempObjectFl = false; if (_vm->_soundManager._voiceOffFl) { @@ -442,7 +442,7 @@ void DialogsManager::showInventory() { break; _vm->_eventsManager->refreshScreenAndEvents(); if (_vm->_globals->_screenId >= 35 && _vm->_globals->_screenId <= 40) - _vm->_objectsManager.handleSpecialGames(); + _vm->_objectsManager->handleSpecialGames(); } } while (loopFl); @@ -451,7 +451,7 @@ void DialogsManager::showInventory() { _inventDisplayedFl = false; _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _inventX, 114, _inventWidth, _inventHeight, _vm->_graphicsManager->_vesaBuffer, _inventX, 114); _vm->_graphicsManager->addDirtyRect(_inventX, 114, _inventX + _inventWidth, _inventWidth + 114); - _vm->_objectsManager.BOBTOUS = true; + _vm->_objectsManager->BOBTOUS = true; } _inventWin1 = _vm->_globals->freeMemory(_inventWin1); @@ -466,8 +466,8 @@ void DialogsManager::showInventory() { _vm->_eventsManager->_mouseCursorId = 4; _vm->_eventsManager->changeMouseCursor(4); - _vm->_objectsManager._oldBorderPos = Common::Point(0, 0); - _vm->_objectsManager._borderPos = Common::Point(0, 0); + _vm->_objectsManager->_oldBorderPos = Common::Point(0, 0); + _vm->_objectsManager->_borderPos = Common::Point(0, 0); _vm->_globals->_disableInventFl = false; _vm->_graphicsManager->_scrollStatus = 0; } @@ -479,41 +479,41 @@ void DialogsManager::inventAnim() { if (_vm->_globals->_disableInventFl) return; - if (_vm->_objectsManager._eraseVisibleCounter && !_vm->_objectsManager._visibleFl) { - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_objectsManager._oldInventoryPosX, 27, 48, 38, - _vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._oldInventoryPosX, 27); - _vm->_graphicsManager->addDirtyRect(_vm->_objectsManager._oldInventoryPosX, 27, _vm->_objectsManager._oldInventoryPosX + 48, 65); - --_vm->_objectsManager._eraseVisibleCounter; + if (_vm->_objectsManager->_eraseVisibleCounter && !_vm->_objectsManager->_visibleFl) { + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_objectsManager->_oldInventoryPosX, 27, 48, 38, + _vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_oldInventoryPosX, 27); + _vm->_graphicsManager->addDirtyRect(_vm->_objectsManager->_oldInventoryPosX, 27, _vm->_objectsManager->_oldInventoryPosX + 48, 65); + --_vm->_objectsManager->_eraseVisibleCounter; } - if (_vm->_objectsManager._visibleFl) { - if (_vm->_objectsManager._oldInventoryPosX <= 1) - _vm->_objectsManager._oldInventoryPosX = 2; - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_objectsManager._oldInventoryPosX, 27, 48, 38, - _vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._oldInventoryPosX, 27); + if (_vm->_objectsManager->_visibleFl) { + if (_vm->_objectsManager->_oldInventoryPosX <= 1) + _vm->_objectsManager->_oldInventoryPosX = 2; + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_objectsManager->_oldInventoryPosX, 27, 48, 38, + _vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_oldInventoryPosX, 27); - _vm->_graphicsManager->addDirtyRect(_vm->_objectsManager._oldInventoryPosX, 27, _vm->_objectsManager._oldInventoryPosX + 48, 65); + _vm->_graphicsManager->addDirtyRect(_vm->_objectsManager->_oldInventoryPosX, 27, _vm->_objectsManager->_oldInventoryPosX + 48, 65); int newOffset = _vm->_graphicsManager->_scrollOffset + 2; _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _inventoryIcons, newOffset + 300, 327, 0); _vm->_graphicsManager->addDirtyRect(newOffset, 27, newOffset + 45, 62); - _vm->_objectsManager._oldInventoryPosX = newOffset; + _vm->_objectsManager->_oldInventoryPosX = newOffset; } if (_vm->_globals->_saveData->_data[svField357] == 1) { if (_vm->_globals->_saveData->_data[svField353] == 1) - _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._headSprites, 832, 325, 0, 0, 0, false); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false); if (_vm->_globals->_saveData->_data[svField355] == 1) - _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._headSprites, 866, 325, 1, 0, 0, false); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_headSprites, 866, 325, 1, 0, 0, false); _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); _vm->_graphicsManager->addDirtyRect(566, 25, 594, 60); } if (_vm->_globals->_saveData->_data[svField356] == 1) { - _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._headSprites, 832, 325, 0, 0, 0, false); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false); _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); } if (_vm->_globals->_saveData->_data[svField354] == 1) { - _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._headSprites, 832, 325, 0, 0, 0, false); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false); _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); } } @@ -571,20 +571,20 @@ void DialogsManager::showLoadGame() { slotNumber = searchSavegames(); _vm->_eventsManager->refreshScreenAndEvents(); } while (!_vm->shouldQuit() && (!slotNumber || _vm->_eventsManager->getMouseButton() != 1)); - _vm->_objectsManager._saveLoadFl = false; + _vm->_objectsManager->_saveLoadFl = false; _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager->_vesaBuffer, _vm->_eventsManager->_startPos.x + 183, 60); _vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, 457, 413); - _vm->_objectsManager.BOBTOUS = true; - _vm->_objectsManager._saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager._saveLoadSprite); - _vm->_objectsManager._saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsManager._saveLoadSprite2); - _vm->_objectsManager._saveLoadX = 0; - _vm->_objectsManager._saveLoadY = 0; + _vm->_objectsManager->BOBTOUS = true; + _vm->_objectsManager->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite); + _vm->_objectsManager->_saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite2); + _vm->_objectsManager->_saveLoadX = 0; + _vm->_objectsManager->_saveLoadY = 0; if (slotNumber != 7) { _vm->_saveLoadManager.loadGame(slotNumber); } - _vm->_objectsManager.changeObject(14); + _vm->_objectsManager->changeObject(14); } /** @@ -600,14 +600,14 @@ void DialogsManager::showSaveGame() { _vm->_eventsManager->refreshScreenAndEvents(); } while (!_vm->shouldQuit() && (!slotNumber || _vm->_eventsManager->getMouseButton() != 1)); - _vm->_objectsManager._saveLoadFl = false; + _vm->_objectsManager->_saveLoadFl = false; _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager->_vesaBuffer, _vm->_eventsManager->_startPos.x + 183, 60); _vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, _vm->_eventsManager->_startPos.x + 457, 413); - _vm->_objectsManager.BOBTOUS = true; - _vm->_objectsManager._saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager._saveLoadSprite); - _vm->_objectsManager._saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsManager._saveLoadSprite2); - _vm->_objectsManager._saveLoadX = 0; - _vm->_objectsManager._saveLoadY = 0; + _vm->_objectsManager->BOBTOUS = true; + _vm->_objectsManager->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite); + _vm->_objectsManager->_saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite2); + _vm->_objectsManager->_saveLoadX = 0; + _vm->_objectsManager->_saveLoadY = 0; if (slotNumber != 7) { // Since the original GUI doesn't support save names, use a default name @@ -640,20 +640,20 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) { } } - _vm->_objectsManager._saveLoadSprite = _vm->_objectsManager.loadSprite(filename); - _vm->_objectsManager._saveLoadSprite2 = _vm->_objectsManager.loadSprite("SAVE2.SPR"); - _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 483, 360, 0); + _vm->_objectsManager->_saveLoadSprite = _vm->_objectsManager->loadSprite(filename); + _vm->_objectsManager->_saveLoadSprite2 = _vm->_objectsManager->loadSprite("SAVE2.SPR"); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 483, 360, 0); if (_vm->_globals->_language == LANG_FR) { if (mode == MODE_SAVE) - _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 525, 375, 1); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 525, 375, 1); else if (mode == MODE_LOAD) - _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 515, 375, 2); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 515, 375, 2); } else { if (mode == MODE_SAVE) - _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 535, 372, 1); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 535, 372, 1); else if (mode == MODE_LOAD) - _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 539, 372, 2); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 539, 372, 2); } for (int slotNumber = 1; slotNumber <= 6; ++slotNumber) { @@ -691,10 +691,10 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) { } } - _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353); - _vm->_objectsManager._saveLoadFl = true; - _vm->_objectsManager._saveLoadX = 0; - _vm->_objectsManager._saveLoadY = 0; + _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353); + _vm->_objectsManager->_saveLoadFl = true; + _vm->_objectsManager->_saveLoadX = 0; + _vm->_objectsManager->_saveLoadY = 0; } /** @@ -710,41 +710,41 @@ int DialogsManager::searchSavegames() { if (yp >= 112 && yp <= 198) { if (xp > _vm->_eventsManager->_startPos.x + 189 && xp < _vm->_eventsManager->_startPos.x + 318) { slotNumber = 1; - _vm->_objectsManager._saveLoadX = 189; - _vm->_objectsManager._saveLoadY = 111; + _vm->_objectsManager->_saveLoadX = 189; + _vm->_objectsManager->_saveLoadY = 111; } else if (xp > _vm->_graphicsManager->_scrollOffset + 322 && xp < _vm->_graphicsManager->_scrollOffset + 452) { slotNumber = 2; - _vm->_objectsManager._saveLoadX = 322; - _vm->_objectsManager._saveLoadY = 111; + _vm->_objectsManager->_saveLoadX = 322; + _vm->_objectsManager->_saveLoadY = 111; } } else if (yp >= 203 && yp <= 289) { if (xp > _vm->_graphicsManager->_scrollOffset + 189 && xp < _vm->_graphicsManager->_scrollOffset + 318) { slotNumber = 3; - _vm->_objectsManager._saveLoadX = 189; - _vm->_objectsManager._saveLoadY = 202; + _vm->_objectsManager->_saveLoadX = 189; + _vm->_objectsManager->_saveLoadY = 202; } else if (xp > _vm->_graphicsManager->_scrollOffset + 322 && xp < _vm->_graphicsManager->_scrollOffset + 452) { slotNumber = 4; - _vm->_objectsManager._saveLoadX = 322; - _vm->_objectsManager._saveLoadY = 202; + _vm->_objectsManager->_saveLoadX = 322; + _vm->_objectsManager->_saveLoadY = 202; } } else if (yp >= 294 && yp <= 380) { if (xp > _vm->_graphicsManager->_scrollOffset + 189 && xp < _vm->_graphicsManager->_scrollOffset + 318) { slotNumber = 5; - _vm->_objectsManager._saveLoadX = 189; - _vm->_objectsManager._saveLoadY = 293; + _vm->_objectsManager->_saveLoadX = 189; + _vm->_objectsManager->_saveLoadY = 293; } else if (xp > _vm->_graphicsManager->_scrollOffset + 322 && xp < _vm->_graphicsManager->_scrollOffset + 452) { slotNumber = 6; - _vm->_objectsManager._saveLoadX = 322; - _vm->_objectsManager._saveLoadY = 293; + _vm->_objectsManager->_saveLoadX = 322; + _vm->_objectsManager->_saveLoadY = 293; } } else if (yp >= 388 && yp <= 404 && xp > _vm->_graphicsManager->_scrollOffset + 273 && xp < _vm->_graphicsManager->_scrollOffset + 355) { slotNumber = 7; - _vm->_objectsManager._saveLoadX = 0; - _vm->_objectsManager._saveLoadY = 0; + _vm->_objectsManager->_saveLoadX = 0; + _vm->_objectsManager->_saveLoadY = 0; } else { slotNumber = 0; - _vm->_objectsManager._saveLoadX = 0; - _vm->_objectsManager._saveLoadY = 0; + _vm->_objectsManager->_saveLoadX = 0; + _vm->_objectsManager->_saveLoadY = 0; } return slotNumber; diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index b113b68443..7b256cdd32 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -393,7 +393,7 @@ void EventsManager::refreshScreenAndEvents() { } if (!_vm->_globals->_linuxEndDemoFl) - _vm->_objectsManager.displaySprite(); + _vm->_objectsManager->displaySprite(); if (!_mouseFl) { updateCursor(); } else if (_mouseCursorId == 23) { diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp index b2335e70b4..0379e29bfd 100644 --- a/engines/hopkins/font.cpp +++ b/engines/hopkins/font.cpp @@ -260,7 +260,7 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in byte curChar = _tempText[curStrIdx]; if (curChar <= 31) curChar = ' '; - _vm->_globals->_boxWidth += _vm->_objectsManager.getWidth(_font, curChar - 32); + _vm->_globals->_boxWidth += _vm->_objectsManager->getWidth(_font, curChar - 32); } _vm->_globals->_boxWidth += 2; @@ -316,7 +316,7 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in byte curChar2 = (curIdx >= (int)line.size()) ? '\0' : line.c_str()[curIdx]; if (curChar2 <= 31) curChar2 = ' '; - ptrc += _vm->_objectsManager.getWidth(_font, (byte)curChar2 - 32); + ptrc += _vm->_objectsManager->getWidth(_font, (byte)curChar2 - 32); } _textSortArray[i] = ptrc; } @@ -414,7 +414,7 @@ void FontManager::displayTextVesa(int xp, int yp, const Common::String &message, if (currChar >= 32) { charIndex = currChar - 32; _vm->_graphicsManager->displayFont(_vm->_graphicsManager->_vesaBuffer, _font, currentX, yp, currChar - 32, col); - currentX += _vm->_objectsManager.getWidth(_font, charIndex); + currentX += _vm->_objectsManager->getWidth(_font, charIndex); } } @@ -431,7 +431,7 @@ void FontManager::displayText(int xp, int yp, const Common::String &message, int if (currentChar > 31) { int characterIndex = currentChar - 32; _vm->_graphicsManager->displayFont(_vm->_graphicsManager->_vesaBuffer, _font, xp, yp, characterIndex, col); - xp += _vm->_objectsManager.getWidth(_font, characterIndex); + xp += _vm->_objectsManager->getWidth(_font, characterIndex); } } } @@ -466,13 +466,13 @@ void FontManager::renderTextDisplay(int xp, int yp, const Common::String &msg, i int charWidth; if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) { if ((curChar >= 'A' && curChar <= 'Z') || (curChar >= 'a' && curChar <= 'z' && curChar != 'm' && curChar != 'w') || (curChar >= '0' && curChar <= '9') || curChar == '*' || (curChar >= 128 && curChar <= 168)) - charWidth = _vm->_objectsManager.getWidth(_font, printChar) - 1; + charWidth = _vm->_objectsManager->getWidth(_font, printChar) - 1; else if (curChar == 'm' || curChar == 'w') - charWidth = _vm->_objectsManager.getWidth(_font, printChar); + charWidth = _vm->_objectsManager->getWidth(_font, printChar); else charWidth = 6; } else - charWidth = _vm->_objectsManager.getWidth(_font, printChar); + charWidth = _vm->_objectsManager->getWidth(_font, printChar); int charStartPosX = charEndPosX; charEndPosX += charWidth; diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index 3d82081d29..6cf7251e92 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -244,10 +244,10 @@ void Globals::clearAll() { _answerBuffer = g_PTRNUL; SPRITE_ECRAN = g_PTRNUL; _saveData = (Savegame *)g_PTRNUL; - _vm->_objectsManager._curObjectIndex = 0; + _vm->_objectsManager->_curObjectIndex = 0; _vm->_linesManager->clearAll(); - _vm->_objectsManager.clearAll(); + _vm->_objectsManager->clearAll(); _saveData = (Savegame *)malloc(sizeof(Savegame)); memset(_saveData, 0, sizeof(Savegame)); @@ -378,7 +378,7 @@ void Globals::disableHiding() { void Globals::B_CACHE_OFF(int idx) { assert(idx < 36); - _vm->_objectsManager._bob[idx].field34 = true; + _vm->_objectsManager->_bob[idx].field34 = true; } void Globals::resetHidingUseCount(int idx) { @@ -411,8 +411,8 @@ void Globals::loadHidingItems(const Common::String &file) { _hidingItem[i]._useCount = 0; } else { _hidingItem[i]._spriteData = spriteData; - _hidingItem[i]._width = _vm->_objectsManager.getWidth(spriteData, _hidingItem[i]._spriteIndex); - _hidingItem[i]._height = _vm->_objectsManager.getHeight(spriteData, _hidingItem[i]._spriteIndex); + _hidingItem[i]._width = _vm->_objectsManager->getWidth(spriteData, _hidingItem[i]._spriteIndex); + _hidingItem[i]._height = _vm->_objectsManager->getHeight(spriteData, _hidingItem[i]._spriteIndex); _hidingItem[i]._useCount = 1; } diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 1f8ee4b044..41de90ebb3 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1062,7 +1062,7 @@ void GraphicsManager::Sprite_Vesa(byte *surface, const byte *spriteData, int xp, void GraphicsManager::endDisplayBob() { for (int idx = 1; idx <= 20; ++idx) { if (_vm->_globals->_animBqe[idx]._enabledFl) - _vm->_objectsManager.hideBob(idx); + _vm->_objectsManager->hideBob(idx); } _vm->_eventsManager->refreshScreenAndEvents(); @@ -1070,7 +1070,7 @@ void GraphicsManager::endDisplayBob() { for (int idx = 1; idx <= 20; ++idx) { if (_vm->_globals->_animBqe[idx]._enabledFl) - _vm->_objectsManager.resetBob(idx); + _vm->_objectsManager->resetBob(idx); } for (int idx = 1; idx <= 29; ++idx) { @@ -1085,7 +1085,7 @@ void GraphicsManager::endDisplayBob() { void GraphicsManager::displayAllBob() { for (int idx = 1; idx <= 20; ++idx) { if (_vm->_globals->_animBqe[idx]._enabledFl) - _vm->_objectsManager.displayBob(idx); + _vm->_objectsManager->displayBob(idx); } } @@ -1225,8 +1225,8 @@ void GraphicsManager::displayRefreshRects() { } void GraphicsManager::AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, int idx, bool addSegment) { - int width = _vm->_objectsManager.getWidth(objectData, idx); - int height = _vm->_objectsManager.getHeight(objectData, idx); + int width = _vm->_objectsManager->getWidth(objectData, idx); + int height = _vm->_objectsManager->getHeight(objectData, idx); if (*objectData == 78) { Affiche_Perfect(_vesaScreen, objectData, xp + 300, yp + 300, idx, 0, 0, false); Affiche_Perfect(_vesaBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false); @@ -1641,8 +1641,8 @@ void GraphicsManager::Affiche_Perfect(byte *surface, const byte *srcData, int xp * Fast Display */ void GraphicsManager::fastDisplay(const byte *spriteData, int xp, int yp, int spriteIndex, bool addSegment) { - int width = _vm->_objectsManager.getWidth(spriteData, spriteIndex); - int height = _vm->_objectsManager.getHeight(spriteData, spriteIndex); + int width = _vm->_objectsManager->getWidth(spriteData, spriteIndex); + int height = _vm->_objectsManager->getHeight(spriteData, spriteIndex); if (*spriteData == 78) { Affiche_Perfect(_vesaScreen, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false); @@ -1787,8 +1787,8 @@ void GraphicsManager::initScreen(const Common::String &file, int mode, bool init dataP = _vm->_fileManager->loadFile(filename); _vm->_globals->_answerBuffer = dataP; - _vm->_objectsManager._forceZoneFl = true; - _vm->_objectsManager._changeVerbFl = false; + _vm->_objectsManager->_forceZoneFl = true; + _vm->_objectsManager->_changeVerbFl = false; } void GraphicsManager::NB_SCREEN(bool initPalette) { diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index b86ac10e7f..4ed958ff0f 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -50,9 +50,9 @@ HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDe _globals = new Globals(this); _graphicsManager = new GraphicsManager(this); _linesManager = new LinesManager(this); + _menuManager = new MenuManager(this); + _objectsManager = new ObjectsManager(this); - _menuManager.setParent(this); - _objectsManager.setParent(this); _saveLoadManager.setParent(this); _scriptManager.setParent(this); _soundManager.setParent(this); @@ -60,6 +60,8 @@ HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDe } HopkinsEngine::~HopkinsEngine() { + delete _objectsManager; + delete _menuManager; delete _linesManager; delete _graphicsManager; delete _globals; @@ -127,9 +129,9 @@ Common::Error HopkinsEngine::run() { bool HopkinsEngine::runWin95Demo() { _globals->loadObjects(); - _objectsManager.changeObject(14); - _objectsManager.addObject(14); - _objectsManager._helicopterFl = false; + _objectsManager->changeObject(14); + _objectsManager->addObject(14); + _objectsManager->_helicopterFl = false; _globals->iRegul = 1; @@ -162,7 +164,7 @@ bool HopkinsEngine::runWin95Demo() { _globals->iRegul = 1; _globals->PERSO = _fileManager->loadFile("PERSO.SPR"); _globals->_characterType = 0; - _objectsManager._mapCarPosX = _objectsManager._mapCarPosY = 0; + _objectsManager->_mapCarPosX = _objectsManager->_mapCarPosY = 0; memset(_globals->_saveData, 0, 2000); _globals->_exitId = 0; @@ -175,7 +177,7 @@ bool HopkinsEngine::runWin95Demo() { _globals->_exitId = 0; if (!_globals->_exitId) { - _globals->_exitId = _menuManager.menu(); + _globals->_exitId = _menuManager->menu(); if (_globals->_exitId == -1) { _globals->PERSO = _globals->freeMemory(_globals->PERSO); restoreSystem(); @@ -190,7 +192,7 @@ bool HopkinsEngine::runWin95Demo() { case 1: _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 2, true); + _objectsManager->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 2, true); break; case 3: @@ -229,12 +231,12 @@ bool HopkinsEngine::runWin95Demo() { } _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; - _objectsManager.PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); + _objectsManager->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); break; case 4: _globals->_disableInventFl = true; - _objectsManager.handleCityMap(); + _objectsManager->handleCityMap(); _globals->_disableInventFl = false; break; @@ -244,48 +246,48 @@ bool HopkinsEngine::runWin95Demo() { if (_globals->_saveData->_data[svFreedHostageFl]) { if (_globals->_saveData->_data[svFreedHostageFl] == 1) - _objectsManager.PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); + _objectsManager->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); } else { - _objectsManager.PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); + _objectsManager->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); } break; case 6: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 460; - _objectsManager.PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); + _objectsManager->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); break; case 7: if (_globals->_saveData->_data[svBombBoxOpenedFl]) - _objectsManager.PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsManager->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); else - _objectsManager.PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsManager->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); break; case 8: _linesManager->setMaxLineIdx(15); _globals->_characterMaxPosY = 450; - _objectsManager.PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); + _objectsManager->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); break; case 9: _globals->_characterMaxPosY = 440; _linesManager->setMaxLineIdx(20); if (_globals->_saveData->_data[svBombDisarmedFl]) - _objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); + _objectsManager->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); else bombExplosion(); break; case 10: - _objectsManager.PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); + _objectsManager->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); break; case 11: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 450; - _objectsManager.PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); + _objectsManager->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); break; case 12: @@ -333,11 +335,11 @@ bool HopkinsEngine::runWin95Demo() { break; case 111: - _objectsManager.PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); + _objectsManager->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); break; case 112: - _objectsManager.PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); + _objectsManager->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); break; case 113: @@ -426,9 +428,9 @@ bool HopkinsEngine::runWin95Demo() { bool HopkinsEngine::runLinuxDemo() { _globals->loadObjects(); - _objectsManager.changeObject(14); - _objectsManager.addObject(14); - _objectsManager._helicopterFl = false; + _objectsManager->changeObject(14); + _objectsManager->addObject(14); + _objectsManager->_helicopterFl = false; _eventsManager->mouseOff(); @@ -452,7 +454,7 @@ bool HopkinsEngine::runLinuxDemo() { _globals->iRegul = 0; _globals->PERSO = _fileManager->loadFile("PERSO.SPR"); _globals->_characterType = 0; - _objectsManager._mapCarPosX = _objectsManager._mapCarPosY = 0; + _objectsManager->_mapCarPosX = _objectsManager->_mapCarPosY = 0; memset(_globals->_saveData, 0, 2000); _globals->_exitId = 0; @@ -461,7 +463,7 @@ bool HopkinsEngine::runLinuxDemo() { _globals->_exitId = 0; if (!_globals->_exitId) { - _globals->_exitId = _menuManager.menu(); + _globals->_exitId = _menuManager->menu(); if (_globals->_exitId == -1) { if (!shouldQuit()) endLinuxDemo(); @@ -495,7 +497,7 @@ bool HopkinsEngine::runLinuxDemo() { case 1: _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true); + _objectsManager->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true); break; case 3: @@ -537,12 +539,12 @@ bool HopkinsEngine::runLinuxDemo() { _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; - _objectsManager.PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); + _objectsManager->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); break; case 4: _globals->_disableInventFl = true; - _objectsManager.handleCityMap(); + _objectsManager->handleCityMap(); _globals->_disableInventFl = false; break; @@ -550,28 +552,28 @@ bool HopkinsEngine::runLinuxDemo() { _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 455; if (_globals->_saveData->_data[svFreedHostageFl] == 1) - _objectsManager.PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); + _objectsManager->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); else - _objectsManager.PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); + _objectsManager->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); break; case 6: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 460; - _objectsManager.PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); + _objectsManager->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); break; case 7: if (_globals->_saveData->_data[svBombBoxOpenedFl]) - _objectsManager.PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsManager->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); else - _objectsManager.PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsManager->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); break; case 8: _linesManager->setMaxLineIdx(15); _globals->_characterMaxPosY = 450; - _objectsManager.PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); + _objectsManager->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); break; case 9: @@ -581,24 +583,24 @@ bool HopkinsEngine::runLinuxDemo() { if (!_globals->_saveData->_data[svBombDisarmedFl]) bombExplosion(); else - _objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); + _objectsManager->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); break; case 10: - _objectsManager.PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); + _objectsManager->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); break; case 11: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 450; - _objectsManager.PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); + _objectsManager->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); break; case 12: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 450; if (_globals->_saveData->_data[svBombDisarmedFl]) - _objectsManager.PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false); + _objectsManager->PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false); else bombExplosion(); break; @@ -606,17 +608,17 @@ bool HopkinsEngine::runLinuxDemo() { case 13: _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true); + _objectsManager->PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true); break; case 14: _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true); + _objectsManager->PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true); break; case 15: - _objectsManager.PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 29, false); + _objectsManager->PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 29, false); break; case 16: @@ -624,25 +626,25 @@ bool HopkinsEngine::runLinuxDemo() { _globals->_characterMaxPosY = 450; if (_globals->_saveData->_data[svForestAvailableFl] == 1) { - _objectsManager.PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true); + _objectsManager->PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true); } else if (!_globals->_saveData->_data[svForestAvailableFl]) { - _objectsManager.PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true); + _objectsManager->PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true); } break; case 25: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 445; - _objectsManager.PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true); + _objectsManager->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true); break; case 26: _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true); + _objectsManager->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true); case 33: - _objectsManager.PERSONAGE("IM33", "IM33", "ANIM33", "IM33", 8, false); + _objectsManager->PERSONAGE("IM33", "IM33", "ANIM33", "IM33", 8, false); break; case 35: @@ -650,11 +652,11 @@ bool HopkinsEngine::runLinuxDemo() { break; case 111: - _objectsManager.PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); + _objectsManager->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); break; case 112: - _objectsManager.PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); + _objectsManager->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); break; case 113: @@ -750,16 +752,16 @@ bool HopkinsEngine::runFull() { _soundManager.playSound(16); _globals->loadObjects(); - _objectsManager.changeObject(14); - _objectsManager.addObject(14); + _objectsManager->changeObject(14); + _objectsManager->addObject(14); if (getPlatform() == Common::kPlatformLinux) { - _objectsManager._helicopterFl = false; + _objectsManager->_helicopterFl = false; _eventsManager->mouseOff(); // No code has been added to display the version as it's wrong // in my copy: it mentions a Win95 version v4 using DirectDraw (Strangerke) } else if (getPlatform() == Common::kPlatformWindows) { - _objectsManager._helicopterFl = false; + _objectsManager->_helicopterFl = false; _globals->iRegul = 1; // This code displays the game version. // It wasn't present in the original and could be put in the debugger @@ -816,7 +818,7 @@ bool HopkinsEngine::runFull() { _globals->iRegul = 0; _globals->PERSO = _fileManager->loadFile("PERSO.SPR"); _globals->_characterType = 0; - _objectsManager._mapCarPosX = _objectsManager._mapCarPosY = 0; + _objectsManager->_mapCarPosX = _objectsManager->_mapCarPosY = 0; memset(_globals->_saveData, 0, 2000); _globals->_exitId = 0; @@ -825,7 +827,7 @@ bool HopkinsEngine::runFull() { if (_globals->_exitId == 300) _globals->_exitId = 0; if (!_globals->_exitId) { - _globals->_exitId = _menuManager.menu(); + _globals->_exitId = _menuManager->menu(); if (_globals->_exitId == -1) { _globals->PERSO = _globals->freeMemory(_globals->PERSO); restoreSystem(); @@ -840,7 +842,7 @@ bool HopkinsEngine::runFull() { case 1: _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true); + _objectsManager->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true); break; case 3: @@ -895,12 +897,12 @@ bool HopkinsEngine::runFull() { } _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; - _objectsManager.PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); + _objectsManager->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); break; case 4: _globals->_disableInventFl = true; - _objectsManager.handleCityMap(); + _objectsManager->handleCityMap(); _globals->_disableInventFl = false; break; @@ -908,54 +910,54 @@ bool HopkinsEngine::runFull() { _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 455; if (_globals->_saveData->_data[svFreedHostageFl] == 1) - _objectsManager.PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); + _objectsManager->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); else - _objectsManager.PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); + _objectsManager->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); break; case 6: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 460; - _objectsManager.PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); + _objectsManager->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); break; case 7: if (_globals->_saveData->_data[svBombBoxOpenedFl]) - _objectsManager.PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsManager->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); else - _objectsManager.PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsManager->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); break; case 8: _linesManager->setMaxLineIdx(15); _globals->_characterMaxPosY = 450; - _objectsManager.PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); + _objectsManager->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); break; case 9: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 440; if (_globals->_saveData->_data[svBombDisarmedFl]) - _objectsManager.PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); + _objectsManager->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); else bombExplosion(); break; case 10: - _objectsManager.PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); + _objectsManager->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); break; case 11: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 450; - _objectsManager.PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); + _objectsManager->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); break; case 12: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 450; if (_globals->_saveData->_data[svBombDisarmedFl]) - _objectsManager.PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false); + _objectsManager->PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false); else bombExplosion(); break; @@ -963,38 +965,38 @@ bool HopkinsEngine::runFull() { case 13: _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true); + _objectsManager->PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true); break; case 14: _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true); + _objectsManager->PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true); break; case 15: if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) - _objectsManager.PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 29, false); + _objectsManager->PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 29, false); else - _objectsManager.PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 18, false); + _objectsManager->PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 18, false); break; case 16: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; if (_globals->_saveData->_data[svForestAvailableFl] == 1) - _objectsManager.PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true); + _objectsManager->PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true); else - _objectsManager.PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true); + _objectsManager->PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true); break; case 17: _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; if (_globals->_saveData->_data[svHutBurningFl] == 1) - _objectsManager.PERSONAGE2("IM17", "IM17A", "ANIM17", "IM17", 11, true); + _objectsManager->PERSONAGE2("IM17", "IM17A", "ANIM17", "IM17", 11, true); else if (!_globals->_saveData->_data[svHutBurningFl]) - _objectsManager.PERSONAGE2("IM17", "IM17", "ANIM17", "IM17", 11, true); + _objectsManager->PERSONAGE2("IM17", "IM17", "ANIM17", "IM17", 11, true); if (_globals->_exitId == 18) { _globals->iRegul = 1; _graphicsManager->lockScreen(); @@ -1023,24 +1025,24 @@ bool HopkinsEngine::runFull() { _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) - _objectsManager.PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 29, false); + _objectsManager->PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 29, false); else - _objectsManager.PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 6, false); + _objectsManager->PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 6, false); break; case 19: _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; if (_globals->_saveData->_data[svHeavenGuardGoneFl]) - _objectsManager.PERSONAGE2("IM19", "IM19A", "ANIM19", "IM19", 6, true); + _objectsManager->PERSONAGE2("IM19", "IM19A", "ANIM19", "IM19", 6, true); else - _objectsManager.PERSONAGE2("IM19", "IM19", "ANIM19", "IM19", 6, true); + _objectsManager->PERSONAGE2("IM19", "IM19", "ANIM19", "IM19", 6, true); break; case 20: _linesManager->setMaxLineIdx(10); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM20", "IM20", "ANIM20", "IM20", 6, true); + _objectsManager->PERSONAGE2("IM20", "IM20", "ANIM20", "IM20", 6, true); if (_globals->_exitId == 17) { _globals->iRegul = 1; _soundManager.stopSound(); @@ -1061,88 +1063,88 @@ bool HopkinsEngine::runFull() { case 22: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 445; - _objectsManager.PERSONAGE2("IM22", "IM22", "ANIM22", "IM22", 6, true); + _objectsManager->PERSONAGE2("IM22", "IM22", "ANIM22", "IM22", 6, true); break; case 23: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM23", "IM23", "ANIM23", "IM23", 6, true); + _objectsManager->PERSONAGE2("IM23", "IM23", "ANIM23", "IM23", 6, true); break; case 24: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; if (_globals->_saveData->_data[svCinemaDogGoneFl] == 1) - _objectsManager.PERSONAGE2("IM24", "IM24A", "ANIM24", "IM24", 1, true); + _objectsManager->PERSONAGE2("IM24", "IM24A", "ANIM24", "IM24", 1, true); else - _objectsManager.PERSONAGE2("IM24", "IM24", "ANIM24", "IM24", 1, true); + _objectsManager->PERSONAGE2("IM24", "IM24", "ANIM24", "IM24", 1, true); break; case 25: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 445; if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) - _objectsManager.PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true); + _objectsManager->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true); else - _objectsManager.PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 8, true); + _objectsManager->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 8, true); break; case 26: _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) - _objectsManager.PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true); + _objectsManager->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true); else - _objectsManager.PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 8, true); + _objectsManager->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 8, true); break; case 27: _linesManager->setMaxLineIdx(15); _globals->_characterMaxPosY = 440; if (_globals->_saveData->_data[svPoolDogGoneFl] == 1) - _objectsManager.PERSONAGE2("IM27", "IM27A", "ANIM27", "IM27", 27, true); + _objectsManager->PERSONAGE2("IM27", "IM27A", "ANIM27", "IM27", 27, true); else - _objectsManager.PERSONAGE2("IM27", "IM27", "ANIM27", "IM27", 27, true); + _objectsManager->PERSONAGE2("IM27", "IM27", "ANIM27", "IM27", 27, true); break; case 28: _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); + _objectsManager->PERSONAGE2("IM28", "IM28", "ANIM28", "IM28", 1, false); else - _objectsManager.PERSONAGE2("IM28A", "IM28", "ANIM28", "IM28", 1, false); + _objectsManager->PERSONAGE2("IM28A", "IM28", "ANIM28", "IM28", 1, false); break; case 29: _linesManager->setMaxLineIdx(50); _globals->_characterMaxPosY = 445; - _objectsManager.PERSONAGE2("IM29", "IM29", "ANIM29", "IM29", 1, true); + _objectsManager->PERSONAGE2("IM29", "IM29", "ANIM29", "IM29", 1, true); break; case 30: _linesManager->setMaxLineIdx(15); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM30", "IM30", "ANIM30", "IM30", 24, false); + _objectsManager->PERSONAGE2("IM30", "IM30", "ANIM30", "IM30", 24, false); break; case 31: - _objectsManager.PERSONAGE("IM31", "IM31", "ANIM31", "IM31", 10, true); + _objectsManager->PERSONAGE("IM31", "IM31", "ANIM31", "IM31", 10, true); break; case 32: _linesManager->setMaxLineIdx(20); _globals->_characterMaxPosY = 445; - _objectsManager.PERSONAGE2("IM32", "IM32", "ANIM32", "IM32", 2, true); + _objectsManager->PERSONAGE2("IM32", "IM32", "ANIM32", "IM32", 2, true); break; case 33: - _objectsManager.PERSONAGE("IM33", "IM33", "ANIM33", "IM33", 8, false); + _objectsManager->PERSONAGE("IM33", "IM33", "ANIM33", "IM33", 8, false); break; case 34: - _objectsManager.PERSONAGE("IM34", "IM34", "ANIM34", "IM34", 2, false); + _objectsManager->PERSONAGE("IM34", "IM34", "ANIM34", "IM34", 2, false); break; case 35: @@ -1155,17 +1157,17 @@ bool HopkinsEngine::runFull() { _linesManager->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; _globals->_disableInventFl = false; - _objectsManager._forestFl = true; + _objectsManager->_forestFl = true; Common::String im = Common::String::format("IM%d", _globals->_exitId); _soundManager.playSound(13); - if (_objectsManager._forestSprite == g_PTRNUL) { - _objectsManager._forestSprite = _objectsManager.loadSprite("HOPDEG.SPR"); + if (_objectsManager->_forestSprite == g_PTRNUL) { + _objectsManager->_forestSprite = _objectsManager->loadSprite("HOPDEG.SPR"); _soundManager.loadSample(1, "SOUND41.WAV"); } - _objectsManager.PERSONAGE2(im, im, "BANDIT", im, 13, false); + _objectsManager->PERSONAGE2(im, im, "BANDIT", im, 13, false); if (_globals->_exitId < 35 || _globals->_exitId > 49) { - _objectsManager._forestSprite = _globals->freeMemory(_objectsManager._forestSprite); - _objectsManager._forestFl = false; + _objectsManager->_forestSprite = _globals->freeMemory(_objectsManager->_forestSprite); + _objectsManager->_forestFl = false; _soundManager.removeSample(1); } break; @@ -1179,130 +1181,130 @@ bool HopkinsEngine::runFull() { case 51: _linesManager->setMaxLineIdx(10); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM51", "IM51", "ANIM51", "IM51", 14, true); + _objectsManager->PERSONAGE2("IM51", "IM51", "ANIM51", "IM51", 14, true); break; case 52: _linesManager->setMaxLineIdx(15); _globals->_characterMaxPosY = 445; - _objectsManager.PERSONAGE2("IM52", "IM52", "ANIM52", "IM52", 14, true); + _objectsManager->PERSONAGE2("IM52", "IM52", "ANIM52", "IM52", 14, true); break; case 54: _linesManager->setMaxLineIdx(30); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM54", "IM54", "ANIM54", "IM54", 14, true); + _objectsManager->PERSONAGE2("IM54", "IM54", "ANIM54", "IM54", 14, true); break; case 55: _linesManager->setMaxLineIdx(30); _globals->_characterMaxPosY = 460; - _objectsManager.PERSONAGE2("IM55", "IM55", "ANIM55", "IM55", 14, false); + _objectsManager->PERSONAGE2("IM55", "IM55", "ANIM55", "IM55", 14, false); break; case 56: _linesManager->setMaxLineIdx(30); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM56", "IM56", "ANIM56", "IM56", 14, false); + _objectsManager->PERSONAGE2("IM56", "IM56", "ANIM56", "IM56", 14, false); break; case 57: _linesManager->setMaxLineIdx(30); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM57", "IM57", "ANIM57", "IM57", 14, true); + _objectsManager->PERSONAGE2("IM57", "IM57", "ANIM57", "IM57", 14, true); break; case 58: _linesManager->setMaxLineIdx(30); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM58", "IM58", "ANIM58", "IM58", 14, false); + _objectsManager->PERSONAGE2("IM58", "IM58", "ANIM58", "IM58", 14, false); break; case 59: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 445; - _objectsManager.PERSONAGE2("IM59", "IM59", "ANIM59", "IM59", 21, false); + _objectsManager->PERSONAGE2("IM59", "IM59", "ANIM59", "IM59", 21, false); break; case 60: _linesManager->setMaxLineIdx(30); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM60", "IM60", "ANIM60", "IM60", 21, false); + _objectsManager->PERSONAGE2("IM60", "IM60", "ANIM60", "IM60", 21, false); break; case 61: if (_globals->_saveData->_data[svBaseElevatorCond1] == 1 && !_globals->_saveData->_data[svBaseFireFl]) handleConflagration(); - _objectsManager.PERSONAGE("IM61", "IM61", "ANIM61", "IM61", 21, false); + _objectsManager->PERSONAGE("IM61", "IM61", "ANIM61", "IM61", 21, false); break; case 62: _linesManager->setMaxLineIdx(8); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM62", "IM62", NULL, "IM62", 21, false); + _objectsManager->PERSONAGE2("IM62", "IM62", NULL, "IM62", 21, false); break; case 63: _linesManager->setMaxLineIdx(30); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM63", "IM63", "ANIM63", "IM63", 21, false); + _objectsManager->PERSONAGE2("IM63", "IM63", "ANIM63", "IM63", 21, false); break; case 64: _linesManager->setMaxLineIdx(30); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM64", "IM64", "ANIM64", "IM64", 21, true); + _objectsManager->PERSONAGE2("IM64", "IM64", "ANIM64", "IM64", 21, true); break; case 65: _linesManager->setMaxLineIdx(30); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM65", "IM65", "ANIM65", "IM65", 21, false); + _objectsManager->PERSONAGE2("IM65", "IM65", "ANIM65", "IM65", 21, false); break; case 66: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 445; - _objectsManager.PERSONAGE2("IM66", "IM66", "ANIM66", "IM66", 21, false); + _objectsManager->PERSONAGE2("IM66", "IM66", "ANIM66", "IM66", 21, false); break; case 67: _linesManager->setMaxLineIdx(8); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM67", "IM67", NULL, "IM67", 21, false); + _objectsManager->PERSONAGE2("IM67", "IM67", NULL, "IM67", 21, false); break; case 68: _linesManager->setMaxLineIdx(8); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM68", "IM68", "ANIM68", "IM68", 21, true); + _objectsManager->PERSONAGE2("IM68", "IM68", "ANIM68", "IM68", 21, true); break; case 69: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 445; - _objectsManager.PERSONAGE2("IM69", "IM69", "ANIM69", "IM69", 21, false); + _objectsManager->PERSONAGE2("IM69", "IM69", "ANIM69", "IM69", 21, false); break; case 70: _linesManager->setMaxLineIdx(8); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM70", "IM70", NULL, "IM70", 21, false); + _objectsManager->PERSONAGE2("IM70", "IM70", NULL, "IM70", 21, false); break; case 71: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 445; - _objectsManager.PERSONAGE2("IM71", "IM71", "ANIM71", "IM71", 21, false); + _objectsManager->PERSONAGE2("IM71", "IM71", "ANIM71", "IM71", 21, false); break; case 73: _linesManager->setMaxLineIdx(15); _globals->_characterMaxPosY = 445; if (_globals->_saveData->_data[svSecondElevatorAvailableFl] == 1) - _objectsManager.PERSONAGE2("IM73", "IM73A", "ANIM73", "IM73", 21, true); + _objectsManager->PERSONAGE2("IM73", "IM73A", "ANIM73", "IM73", 21, true); else - _objectsManager.PERSONAGE2("IM73", "IM73", "ANIM73", "IM73", 21, true); + _objectsManager->PERSONAGE2("IM73", "IM73", "ANIM73", "IM73", 21, true); break; case 75: @@ -1374,39 +1376,39 @@ bool HopkinsEngine::runFull() { _globals->_characterMaxPosY = 445; if (_globals->_saveData->_data[svEscapeLeftJailFl]) { if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) - _objectsManager.PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 29, true); + _objectsManager->PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 29, true); else - _objectsManager.PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 26, true); + _objectsManager->PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 26, true); } else { if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) - _objectsManager.PERSONAGE2("IM93", "IM93", "ANIM93", "IM93", 29, true); + _objectsManager->PERSONAGE2("IM93", "IM93", "ANIM93", "IM93", 29, true); else - _objectsManager.PERSONAGE2("IM93", "IM93", "ANIM93", "IM93", 26, true); + _objectsManager->PERSONAGE2("IM93", "IM93", "ANIM93", "IM93", 26, true); } break; case 94: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 440; - _objectsManager.PERSONAGE2("IM94", "IM94", "ANIM94", "IM94", 19, true); + _objectsManager->PERSONAGE2("IM94", "IM94", "ANIM94", "IM94", 19, true); break; case 95: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM95", "IM95", "ANIM95", "IM95", 19, false); + _objectsManager->PERSONAGE2("IM95", "IM95", "ANIM95", "IM95", 19, false); break; case 96: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM96", "IM96", "ANIM96", "IM96", 19, false); + _objectsManager->PERSONAGE2("IM96", "IM96", "ANIM96", "IM96", 19, false); break; case 97: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM97", "IM97", "ANIM97", "IM97", 19, false); + _objectsManager->PERSONAGE2("IM97", "IM97", "ANIM97", "IM97", 19, false); if (_globals->_exitId == 18) { _globals->iRegul = 1; _soundManager.stopSound(); @@ -1424,13 +1426,13 @@ bool HopkinsEngine::runFull() { case 98: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM98", "IM98", "ANIM98", "IM98", 19, true); + _objectsManager->PERSONAGE2("IM98", "IM98", "ANIM98", "IM98", 19, true); break; case 99: _linesManager->setMaxLineIdx(5); _globals->_characterMaxPosY = 435; - _objectsManager.PERSONAGE2("IM99", "IM99", "ANIM99", "IM99", 19, true); + _objectsManager->PERSONAGE2("IM99", "IM99", "ANIM99", "IM99", 19, true); break; case 100: @@ -1438,11 +1440,11 @@ bool HopkinsEngine::runFull() { break; case 111: - _objectsManager.PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); + _objectsManager->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); break; case 112: - _objectsManager.PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); + _objectsManager->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); break; case 113: @@ -1589,7 +1591,7 @@ void HopkinsEngine::initializeSystem() { _fontManager->initData(); _dialogsManager->_inventoryIcons = _fileManager->loadFile("ICONE.SPR"); - _objectsManager._headSprites = _fileManager->loadFile("TETE.SPR"); + _objectsManager->_headSprites = _fileManager->loadFile("TETE.SPR"); _eventsManager->setMouseOn(); _eventsManager->_mouseFl = false; @@ -1685,8 +1687,8 @@ void HopkinsEngine::playIntro() { _animationManager->loadAnim("INTRO2"); _graphicsManager->displayAllBob(); _soundManager.playSound(23); - _objectsManager.stopBobAnimation(3); - _objectsManager.stopBobAnimation(5); + _objectsManager->stopBobAnimation(3); + _objectsManager->stopBobAnimation(5); _graphicsManager->_scrollOffset = 0; _graphicsManager->SETCOLOR3(252, 100, 100, 100); _graphicsManager->SETCOLOR3(253, 100, 100, 100); @@ -1701,9 +1703,9 @@ void HopkinsEngine::playIntro() { for (uint i = 0; i < 200 / _globals->_speed; ++i) _eventsManager->refreshScreenAndEvents(); - _objectsManager.setBobAnimation(3); + _objectsManager->setBobAnimation(3); _soundManager.mixVoice(5, 3); - _objectsManager.stopBobAnimation(3); + _objectsManager->stopBobAnimation(3); _eventsManager->refreshScreenAndEvents(); memcpy(&paletteData2, _graphicsManager->_palette, 796); @@ -1726,9 +1728,9 @@ void HopkinsEngine::playIntro() { _animationManager->loadAnim("INTRO2"); _graphicsManager->displayAllBob(); _soundManager.playSound(23); - _objectsManager.stopBobAnimation(3); - _objectsManager.stopBobAnimation(5); - _objectsManager.stopBobAnimation(1); + _objectsManager->stopBobAnimation(3); + _objectsManager->stopBobAnimation(5); + _objectsManager->stopBobAnimation(1); _graphicsManager->_scrollOffset = 0; _graphicsManager->SETCOLOR3(252, 100, 100, 100); _graphicsManager->SETCOLOR3(253, 100, 100, 100); @@ -1744,11 +1746,11 @@ void HopkinsEngine::playIntro() { int introIndex = 0; while (!shouldQuit() && !_eventsManager->_escKeyFl) { if (introIndex == 12) { - _objectsManager.setBobAnimation(3); + _objectsManager->setBobAnimation(3); _eventsManager->refreshScreenAndEvents(); _soundManager.mixVoice(6, 3); _eventsManager->refreshScreenAndEvents(); - _objectsManager.stopBobAnimation(3); + _objectsManager->stopBobAnimation(3); } Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager->_palette[0]); @@ -1774,13 +1776,13 @@ void HopkinsEngine::playIntro() { for (uint j = 1; j < 100 / _globals->_speed; ++j) _eventsManager->refreshScreenAndEvents(); - _objectsManager.setBobAnimation(3); + _objectsManager->setBobAnimation(3); _soundManager.mixVoice(7, 3); - _objectsManager.stopBobAnimation(3); + _objectsManager->stopBobAnimation(3); for (uint k = 1; k < 60 / _globals->_speed; ++k) _eventsManager->refreshScreenAndEvents(); - _objectsManager.setBobAnimation(5); + _objectsManager->setBobAnimation(5); for (uint l = 0; l < 20 / _globals->_speed; ++l) _eventsManager->refreshScreenAndEvents(); @@ -1789,9 +1791,9 @@ void HopkinsEngine::playIntro() { for (uint m = 0; m < 50 / _globals->_speed; ++m) { if (m == 30 / _globals->_speed) { - _objectsManager.setBobAnimation(3); + _objectsManager->setBobAnimation(3); _soundManager.mixVoice(8, 3); - _objectsManager.stopBobAnimation(3); + _objectsManager->stopBobAnimation(3); } _eventsManager->refreshScreenAndEvents(); @@ -1883,7 +1885,7 @@ void HopkinsEngine::bombExplosion() { _graphicsManager->loadImage("IM15"); _animationManager->loadAnim("ANIM15"); _graphicsManager->displayAllBob(); - _objectsManager.stopBobAnimation(7); + _objectsManager->stopBobAnimation(7); for (int idx = 0; idx < 5; ++idx) { _eventsManager->refreshScreenAndEvents(); @@ -1899,7 +1901,7 @@ void HopkinsEngine::bombExplosion() { _globals->_introSpeechOffFl = true; _talkManager.startStaticCharacterDialogue("vire.pe2"); _globals->_introSpeechOffFl = false; - _objectsManager.setBobAnimation(7); + _objectsManager->setBobAnimation(7); for (int idx = 0; idx < 100; ++idx) { _eventsManager->refreshScreenAndEvents(); @@ -1919,7 +1921,7 @@ void HopkinsEngine::restoreSystem() { void HopkinsEngine::endLinuxDemo() { _globals->_linuxEndDemoFl = true; _graphicsManager->resetDirtyRects(); - _objectsManager._forestFl = false; + _objectsManager->_forestFl = false; _eventsManager->_breakoutFl = false; _globals->_disableInventFl = true; _graphicsManager->loadImage("BOX"); @@ -2035,7 +2037,7 @@ void HopkinsEngine::playUnderwaterBaseCutscene() { _graphicsManager->loadImage("IM92"); _animationManager->loadAnim("ANIM92"); _graphicsManager->displayAllBob(); - _objectsManager.loadLinkFile("IM92"); + _objectsManager->loadLinkFile("IM92"); for (int cpt = 0; cpt <= 4; cpt++) _eventsManager->refreshScreenAndEvents(); @@ -2045,7 +2047,7 @@ void HopkinsEngine::playUnderwaterBaseCutscene() { do _eventsManager->refreshScreenAndEvents(); - while (_objectsManager.getBobAnimDataIdx(8) != 22); + while (_objectsManager->getBobAnimDataIdx(8) != 22); _graphicsManager->fadeOutLong(); _graphicsManager->endDisplayBob(); @@ -2071,9 +2073,9 @@ void HopkinsEngine::playEnding() { _animationManager->loadAnim("ANIM100"); _graphicsManager->displayAllBob(); _eventsManager->mouseOn(); - _objectsManager.stopBobAnimation(7); - _objectsManager.stopBobAnimation(8); - _objectsManager.stopBobAnimation(9); + _objectsManager->stopBobAnimation(7); + _objectsManager->stopBobAnimation(8); + _objectsManager->stopBobAnimation(9); _graphicsManager->SETCOLOR3(252, 100, 100, 100); _graphicsManager->SETCOLOR3(253, 100, 100, 100); _graphicsManager->SETCOLOR3(251, 100, 100, 100); @@ -2088,25 +2090,25 @@ void HopkinsEngine::playEnding() { do _eventsManager->refreshScreenAndEvents(); - while (_objectsManager.getBobAnimDataIdx(6) != 54); + while (_objectsManager->getBobAnimDataIdx(6) != 54); _globals->_introSpeechOffFl = true; _talkManager.startAnimatedCharacterDialogue("GM4.PE2"); _globals->_disableInventFl = true; - _objectsManager.stopBobAnimation(6); - _objectsManager.stopBobAnimation(10); - _objectsManager.setBobAnimation(9); - _objectsManager.setBobAnimation(7); + _objectsManager->stopBobAnimation(6); + _objectsManager->stopBobAnimation(10); + _objectsManager->setBobAnimation(9); + _objectsManager->setBobAnimation(7); do _eventsManager->refreshScreenAndEvents(); - while (_objectsManager.getBobAnimDataIdx(7) != 54); + while (_objectsManager->getBobAnimDataIdx(7) != 54); _soundManager.playSample(1); do _eventsManager->refreshScreenAndEvents(); - while (_objectsManager.getBobAnimDataIdx(7) != 65); + while (_objectsManager->getBobAnimDataIdx(7) != 65); _globals->_introSpeechOffFl = true; _talkManager.startAnimatedCharacterDialogue("DUELB4.PE2"); @@ -2115,23 +2117,23 @@ void HopkinsEngine::playEnding() { do _eventsManager->refreshScreenAndEvents(); - while (_objectsManager.getBobAnimDataIdx(7) != 72); + while (_objectsManager->getBobAnimDataIdx(7) != 72); _globals->_introSpeechOffFl = true; _talkManager.startAnimatedCharacterDialogue("DUELH1.PE2"); do _eventsManager->refreshScreenAndEvents(); - while (_objectsManager.getBobAnimDataIdx(7) != 81); + while (_objectsManager->getBobAnimDataIdx(7) != 81); _globals->_introSpeechOffFl = true; _talkManager.startAnimatedCharacterDialogue("DUELB5.PE2"); do _eventsManager->refreshScreenAndEvents(); - while (_objectsManager.getBobAnimDataIdx(7) != 120); + while (_objectsManager->getBobAnimDataIdx(7) != 120); - _objectsManager.stopBobAnimation(7); + _objectsManager->stopBobAnimation(7); if (_globals->_saveData->_data[svGameWonFl] == 1) { _soundManager._specialSoundNum = 200; _soundManager._skipRefreshFl = true; @@ -2173,21 +2175,21 @@ void HopkinsEngine::playEnding() { _soundManager._specialSoundNum = 200; _soundManager._skipRefreshFl = true; _animationManager->playAnim2("BERM.ANM", 100, 24, 300); - _objectsManager.stopBobAnimation(7); - _objectsManager.setBobAnimation(8); + _objectsManager->stopBobAnimation(7); + _objectsManager->setBobAnimation(8); _globals->_introSpeechOffFl = true; _talkManager.startAnimatedCharacterDialogue("GM5.PE2"); _globals->_disableInventFl = true; do _eventsManager->refreshScreenAndEvents(); - while (_objectsManager.getBobAnimDataIdx(8) != 5); + while (_objectsManager->getBobAnimDataIdx(8) != 5); _soundManager.directPlayWav("SOUND41.WAV"); do _eventsManager->refreshScreenAndEvents(); - while (_objectsManager.getBobAnimDataIdx(8) != 21); + while (_objectsManager->getBobAnimDataIdx(8) != 21); _graphicsManager->fadeOutLong(); _graphicsManager->endDisplayBob(); @@ -2442,7 +2444,7 @@ void HopkinsEngine::displayCredits(int startPosY, byte *buffer, char color) { if (!curChar) break; if (curChar > 31) - strWidth += _objectsManager.getWidth(_fontManager->_font, curChar - 32); + strWidth += _objectsManager->getWidth(_fontManager->_font, curChar - 32); } int startPosX = 320 - strWidth / 2; int endPosX = strWidth + startPosX; @@ -2469,7 +2471,7 @@ void HopkinsEngine::displayCredits(int startPosY, byte *buffer, char color) { break; if (curChar > 31) { _graphicsManager->displayFont(_graphicsManager->_vesaBuffer, _fontManager->_font, startPosX, startPosY, curChar - 32, color); - startPosX += _objectsManager.getWidth(_fontManager->_font, curChar - 32); + startPosX += _objectsManager->getWidth(_fontManager->_font, curChar - 32); } } } @@ -2542,24 +2544,24 @@ void HopkinsEngine::handleOceanMouseEvents() { return; _eventsManager->getMouseX(); - if (_objectsManager._zoneNum <= 0) + if (_objectsManager->_zoneNum <= 0) return; int oldPosX = _eventsManager->getMouseX(); int oldPosY = _eventsManager->getMouseY(); bool displAnim = false; int oldX; - switch (_objectsManager._zoneNum) { + switch (_objectsManager->_zoneNum) { case 1: switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager.SPACTION(_globals->PERSO, "27,26,25,24,23,22,21,20,19,18,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "27,26,25,24,23,22,21,20,19,18,-1,", 6, false); break; case DIR_RIGHT: - _objectsManager.SPACTION(_globals->PERSO, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1,", 6, false); break; case DIR_DOWN: - _objectsManager.SPACTION(_globals->PERSO, "9,10,11,12,13,14,15,16,17,18,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "9,10,11,12,13,14,15,16,17,18,-1,", 6, false); break; default: break; @@ -2567,7 +2569,7 @@ void HopkinsEngine::handleOceanMouseEvents() { _globals->_oceanDirection = DIR_LEFT; _globals->_exitId = 1; - oldX = _objectsManager.getSpriteX(0); + oldX = _objectsManager->getSpriteX(0); for (;;) { if (_globals->_speed == 1) oldX -= 2; @@ -2575,7 +2577,7 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX -= 4; else if (_globals->_speed == 3) oldX -= 6; - _objectsManager.setSpriteX(0, oldX); + _objectsManager->setSpriteX(0, oldX); setSubmarineSprites(); _eventsManager->refreshScreenAndEvents(); if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) { @@ -2590,20 +2592,20 @@ void HopkinsEngine::handleOceanMouseEvents() { case 2: switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager.SPACTION(_globals->PERSO, "27,28,29,30,31,32,33,34,35,36,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "27,28,29,30,31,32,33,34,35,36,-1,", 6, false); break; case DIR_DOWN: - _objectsManager.SPACTION(_globals->PERSO, "9,8,7,6,5,4,3,2,1,0,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "9,8,7,6,5,4,3,2,1,0,-1,", 6, false); break; case DIR_LEFT: - _objectsManager.SPACTION(_globals->PERSO, "18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,-1,", 6, false); break; default: break; } _globals->_oceanDirection = DIR_RIGHT; _globals->_exitId = 2; - oldX = _objectsManager.getSpriteX(0); + oldX = _objectsManager->getSpriteX(0); for (;;) { if (_globals->_speed == 1) oldX += 2; @@ -2611,7 +2613,7 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX += 4; else if (_globals->_speed == 3) oldX += 6; - _objectsManager.setSpriteX(0, oldX); + _objectsManager->setSpriteX(0, oldX); setSubmarineSprites(); _eventsManager->refreshScreenAndEvents(); if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) { @@ -2625,7 +2627,7 @@ void HopkinsEngine::handleOceanMouseEvents() { case 3: switch (_globals->_oceanDirection) { case DIR_RIGHT: - oldX = _objectsManager.getSpriteX(0); + oldX = _objectsManager->getSpriteX(0); do { if (_globals->_speed == 1) oldX += 2; @@ -2633,7 +2635,7 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX += 4; else if (_globals->_speed == 3) oldX += 6; - _objectsManager.setSpriteX(0, oldX); + _objectsManager->setSpriteX(0, oldX); setSubmarineSprites(); _eventsManager->refreshScreenAndEvents(); if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) { @@ -2642,13 +2644,13 @@ void HopkinsEngine::handleOceanMouseEvents() { } } while (oldX <= 235); if (!displAnim) - _objectsManager.SPACTION(_globals->PERSO, "36,35,34,33,32,31,30,29,28,27,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "36,35,34,33,32,31,30,29,28,27,-1,", 6, false); break; case DIR_DOWN: - _objectsManager.SPACTION(_globals->PERSO, "9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,", 6, false); break; case DIR_LEFT: - oldX = _objectsManager.getSpriteX(0); + oldX = _objectsManager->getSpriteX(0); do { if (_globals->_speed == 1) oldX -= 2; @@ -2656,7 +2658,7 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX -= 4; else if (_globals->_speed == 3) oldX -= 6; - _objectsManager.setSpriteX(0, oldX); + _objectsManager->setSpriteX(0, oldX); setSubmarineSprites(); _eventsManager->refreshScreenAndEvents(); if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) { @@ -2665,7 +2667,7 @@ void HopkinsEngine::handleOceanMouseEvents() { } } while (oldX > 236); if (!displAnim) - _objectsManager.SPACTION(_globals->PERSO, "18,19,20,21,22,23,24,25,26,27,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "18,19,20,21,22,23,24,25,26,27,-1,", 6, false); break; default: break; @@ -2676,10 +2678,10 @@ void HopkinsEngine::handleOceanMouseEvents() { case 4: switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager.SPACTION(_globals->PERSO, "27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,-1,", 6, false); break; case DIR_RIGHT: - oldX = _objectsManager.getSpriteX(0); + oldX = _objectsManager->getSpriteX(0); do { if (_globals->_speed == 1) oldX += 2; @@ -2687,7 +2689,7 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX += 4; else if (_globals->_speed == 3) oldX += 6; - _objectsManager.setSpriteX(0, oldX); + _objectsManager->setSpriteX(0, oldX); setSubmarineSprites(); _eventsManager->refreshScreenAndEvents(); if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) { @@ -2696,10 +2698,10 @@ void HopkinsEngine::handleOceanMouseEvents() { } } while (oldX <= 235); if (!displAnim) - _objectsManager.SPACTION(_globals->PERSO, "0,1,2,3,4,5,6,7,8,9,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "0,1,2,3,4,5,6,7,8,9,-1,", 6, false); break; case DIR_LEFT: - oldX = _objectsManager.getSpriteX(0); + oldX = _objectsManager->getSpriteX(0); for (;;) { if (_globals->_speed == 1) oldX -= 2; @@ -2707,7 +2709,7 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX -= 4; else if (_globals->_speed == 3) oldX -= 6; - _objectsManager.setSpriteX(0, oldX); + _objectsManager->setSpriteX(0, oldX); setSubmarineSprites(); _eventsManager->refreshScreenAndEvents(); if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) @@ -2715,7 +2717,7 @@ void HopkinsEngine::handleOceanMouseEvents() { if (oldX <= 236) { if (!displAnim) - _objectsManager.SPACTION(_globals->PERSO, "18,17,16,15,14,13,12,11,10,9,-1,", 6, false); + _objectsManager->SPACTION(_globals->PERSO, "18,17,16,15,14,13,12,11,10,9,-1,", 6, false); break; } } @@ -2732,16 +2734,16 @@ void HopkinsEngine::handleOceanMouseEvents() { void HopkinsEngine::setSubmarineSprites() { switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager.setSpriteIndex(0, 27); + _objectsManager->setSpriteIndex(0, 27); break; case DIR_RIGHT: - _objectsManager.setSpriteIndex(0, 0); + _objectsManager->setSpriteIndex(0, 0); break; case DIR_DOWN: - _objectsManager.setSpriteIndex(0, 9); + _objectsManager->setSpriteIndex(0, 9); break; case DIR_LEFT: - _objectsManager.setSpriteIndex(0, 18); + _objectsManager->setSpriteIndex(0, 18); break; default: break; @@ -2760,13 +2762,13 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi _graphicsManager->loadImage(backgroundFilename); if (curExitId == 77) - _objectsManager.loadLinkFile("IM77"); + _objectsManager->loadLinkFile("IM77"); else if (curExitId == 84) - _objectsManager.loadLinkFile("IM84"); + _objectsManager->loadLinkFile("IM84"); else if (curExitId == 91) - _objectsManager.loadLinkFile("IM91"); + _objectsManager->loadLinkFile("IM91"); else - _objectsManager.loadLinkFile("ocean"); + _objectsManager->loadLinkFile("ocean"); if (!exit1) _linesManager->disableZone(1); @@ -2782,31 +2784,31 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager._characterPos.x = 236; - _objectsManager._startSpriteIndex = 27; + _objectsManager->_characterPos.x = 236; + _objectsManager->_startSpriteIndex = 27; break; case DIR_RIGHT: - _objectsManager._characterPos.x = -20; - _objectsManager._startSpriteIndex = 0; + _objectsManager->_characterPos.x = -20; + _objectsManager->_startSpriteIndex = 0; break; case DIR_DOWN: - _objectsManager._characterPos.x = 236; - _objectsManager._startSpriteIndex = 9; + _objectsManager->_characterPos.x = 236; + _objectsManager->_startSpriteIndex = 9; break; case DIR_LEFT: - _objectsManager._characterPos.x = 415; - _objectsManager._startSpriteIndex = 18; + _objectsManager->_characterPos.x = 415; + _objectsManager->_startSpriteIndex = 18; break; default: break; } - _objectsManager.addStaticSprite(_globals->PERSO, Common::Point(_objectsManager._characterPos.x, 110), 0, _objectsManager._startSpriteIndex, 0, false, 0, 0); + _objectsManager->addStaticSprite(_globals->PERSO, Common::Point(_objectsManager->_characterPos.x, 110), 0, _objectsManager->_startSpriteIndex, 0, false, 0, 0); _graphicsManager->SETCOLOR3(252, 100, 100, 100); _graphicsManager->SETCOLOR3(253, 100, 100, 100); _graphicsManager->SETCOLOR3(251, 100, 100, 100); _graphicsManager->SETCOLOR3(254, 0, 0, 0); - _objectsManager.animateSprite(0); + _objectsManager->animateSprite(0); _linesManager->_route = (RouteItem *)g_PTRNUL; _eventsManager->mouseOn(); _eventsManager->changeMouseCursor(4); @@ -2840,8 +2842,8 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi else if (_globals->_exitId == 4) _globals->_exitId = exit4; _graphicsManager->fadeOutLong(); - _objectsManager.removeSprite(0); - _objectsManager.clearScreen(); + _objectsManager->removeSprite(0); + _objectsManager->clearScreen(); _globals->PERSO = _fileManager->loadFile("PERSO.SPR"); _globals->_characterType = 0; } @@ -2861,7 +2863,7 @@ bool HopkinsEngine::displayAdultDisclaimer() { _graphicsManager->_maxX = SCREEN_WIDTH; _graphicsManager->_maxY = SCREEN_HEIGHT - 1; _eventsManager->_breakoutFl = false; - _objectsManager._forestFl = false; + _objectsManager->_forestFl = false; _globals->_disableInventFl = true; _globals->_exitId = 0; diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h index 1a3f60c80f..6b440db3cd 100644 --- a/engines/hopkins/hopkins.h +++ b/engines/hopkins/hopkins.h @@ -152,9 +152,9 @@ public: Globals *_globals; GraphicsManager *_graphicsManager; LinesManager *_linesManager; + MenuManager *_menuManager; + ObjectsManager *_objectsManager; - MenuManager _menuManager; - ObjectsManager _objectsManager; SaveLoadManager _saveLoadManager; ScriptManager _scriptManager; SoundManager _soundManager; diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp index 476477b573..2a2d6405a2 100644 --- a/engines/hopkins/lines.cpp +++ b/engines/hopkins/lines.cpp @@ -1085,11 +1085,11 @@ RouteItem *LinesManager::PARCOURS2(int fromX, int fromY, int destX, int destY) { if (abs(fromX - destX) <= 4 && abs(fromY - clipDestY) <= 4) return (RouteItem *)g_PTRNUL; - if (_vm->_globals->_oldZoneNum > 0 && _vm->_objectsManager._zoneNum > 0 && _vm->_globals->_oldZoneNum == _vm->_objectsManager._zoneNum) + if (_vm->_globals->_oldZoneNum > 0 && _vm->_objectsManager->_zoneNum > 0 && _vm->_globals->_oldZoneNum == _vm->_objectsManager->_zoneNum) return (RouteItem *)g_PTRNUL; } _vm->_globals->_checkDistanceFl = false; - _vm->_globals->_oldZoneNum = _vm->_objectsManager._zoneNum; + _vm->_globals->_oldZoneNum = _vm->_objectsManager->_zoneNum; _vm->_globals->_oldRouteFromX = fromX; _vm->_globals->_oldRouteDestX = destX; _vm->_globals->_oldRouteFromY = fromY; @@ -2529,17 +2529,17 @@ int LinesManager::getMouseZone() { if ((_vm->_eventsManager->_mousePos.y + _vm->_eventsManager->_mouseOffset.y) > 19) { for (int bobZoneId = 0; bobZoneId <= 48; bobZoneId++) { int bobId = BOBZONE[bobZoneId]; - if (bobId && BOBZONE_FLAG[bobZoneId] && _vm->_objectsManager._bob[bobId]._bobMode && _vm->_objectsManager._bob[bobId]._frameIndex != 250 && - !_vm->_objectsManager._bob[bobId]._disabledAnimationFl && xp > _vm->_objectsManager._bob[bobId]._oldX && - xp < _vm->_objectsManager._bob[bobId]._oldWidth + _vm->_objectsManager._bob[bobId]._oldX && yp > _vm->_objectsManager._bob[bobId]._oldY) { - if (yp < _vm->_objectsManager._bob[bobId]._oldHeight + _vm->_objectsManager._bob[bobId]._oldY) { + if (bobId && BOBZONE_FLAG[bobZoneId] && _vm->_objectsManager->_bob[bobId]._bobMode && _vm->_objectsManager->_bob[bobId]._frameIndex != 250 && + !_vm->_objectsManager->_bob[bobId]._disabledAnimationFl && xp > _vm->_objectsManager->_bob[bobId]._oldX && + xp < _vm->_objectsManager->_bob[bobId]._oldWidth + _vm->_objectsManager->_bob[bobId]._oldX && yp > _vm->_objectsManager->_bob[bobId]._oldY) { + if (yp < _vm->_objectsManager->_bob[bobId]._oldHeight + _vm->_objectsManager->_bob[bobId]._oldY) { if (ZONEP[bobZoneId]._spriteIndex == -1) { ZONEP[bobZoneId]._destX = 0; ZONEP[bobZoneId]._destY = 0; } if (!ZONEP[bobZoneId]._destX && !ZONEP[bobZoneId]._destY) { - ZONEP[bobZoneId]._destX = _vm->_objectsManager._bob[bobId]._oldWidth + _vm->_objectsManager._bob[bobId]._oldX; - ZONEP[bobZoneId]._destY = _vm->_objectsManager._bob[bobId]._oldHeight + _vm->_objectsManager._bob[bobId]._oldY + 6; + ZONEP[bobZoneId]._destX = _vm->_objectsManager->_bob[bobId]._oldWidth + _vm->_objectsManager->_bob[bobId]._oldX; + ZONEP[bobZoneId]._destY = _vm->_objectsManager->_bob[bobId]._oldHeight + _vm->_objectsManager->_bob[bobId]._oldY + 6; ZONEP[bobZoneId]._spriteIndex = -1; } return bobZoneId; @@ -2815,18 +2815,18 @@ void LinesManager::checkZone() { || _vm->_eventsManager->_startPos.x >= mouseX || (mouseY = _vm->_graphicsManager->_scrollOffset + 54, mouseX >= mouseY) || (mouseY = oldMouseY - 1, mouseY < 0 || mouseY > 59)) { - if (_vm->_objectsManager._visibleFl) - _vm->_objectsManager._eraseVisibleCounter = 4; - _vm->_objectsManager._visibleFl = false; + if (_vm->_objectsManager->_visibleFl) + _vm->_objectsManager->_eraseVisibleCounter = 4; + _vm->_objectsManager->_visibleFl = false; } else { - _vm->_objectsManager._visibleFl = true; + _vm->_objectsManager->_visibleFl = true; } - if (_vm->_objectsManager._forceZoneFl) { + if (_vm->_objectsManager->_forceZoneFl) { _vm->_globals->compteur_71 = 100; _vm->_globals->_oldMouseZoneId = -1; _vm->_globals->_oldMouseX = -200; _vm->_globals->_oldMouseY = -220; - _vm->_objectsManager._forceZoneFl = false; + _vm->_objectsManager->_forceZoneFl = false; } _vm->_globals->compteur_71++; @@ -2871,7 +2871,7 @@ void LinesManager::checkZone() { if (ZONEP[zoneId]._verbFl1 == 2) { _vm->_eventsManager->changeMouseCursor(16); _vm->_eventsManager->_mouseCursorId = 16; - _vm->_objectsManager.setVerb(16); + _vm->_objectsManager->setVerb(16); } } } else { @@ -2880,16 +2880,16 @@ void LinesManager::checkZone() { _vm->_eventsManager->changeMouseCursor(4); } } - _vm->_objectsManager._zoneNum = zoneId; + _vm->_objectsManager->_zoneNum = zoneId; _vm->_globals->_oldMouseX = mouseX; _vm->_globals->_oldMouseY = oldMouseY; _vm->_globals->_oldMouseZoneId = zoneId; if (_vm->_globals->_freezeCharacterFl && (_vm->_eventsManager->_mouseCursorId == 4)) { if (zoneId != -1 && zoneId != 0) - _vm->_objectsManager.handleRightButton(); + _vm->_objectsManager->handleRightButton(); } if ((_vm->_globals->_cityMapEnabledFl && zoneId == -1) || !zoneId) { - _vm->_objectsManager.setVerb(0); + _vm->_objectsManager->setVerb(0); _vm->_eventsManager->_mouseCursorId = 0; _vm->_eventsManager->changeMouseCursor(0); } diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp index 1157a032a8..0801085df5 100644 --- a/engines/hopkins/menu.cpp +++ b/engines/hopkins/menu.cpp @@ -37,12 +37,12 @@ namespace Hopkins { -void MenuManager::setParent(HopkinsEngine *vm) { +enum MenuSelection { MENU_NONE = 0, PLAY_GAME = 1, LOAD_GAME = 2, OPTIONS = 3, INTRODUCTION = 4, QUIT = 5 }; + +MenuManager::MenuManager(HopkinsEngine *vm) { _vm = vm; } -enum MenuSelection { MENU_NONE = 0, PLAY_GAME = 1, LOAD_GAME = 2, OPTIONS = 3, INTRODUCTION = 4, QUIT = 5 }; - int MenuManager::menu() { byte *spriteData = NULL; MenuSelection menuIndex; @@ -55,7 +55,7 @@ int MenuManager::menu() { result = 0; while (!g_system->getEventManager()->shouldQuit()) { - _vm->_objectsManager._forestFl = false; + _vm->_objectsManager->_forestFl = false; _vm->_eventsManager->_breakoutFl = false; _vm->_globals->_disableInventFl = true; _vm->_globals->_exitId = 0; @@ -64,7 +64,7 @@ int MenuManager::menu() { _vm->_globals->_inventory[idx] = 0; memset(_vm->_globals->_saveData, 0, 2000); - _vm->_objectsManager.addObject(14); + _vm->_objectsManager->addObject(14); memset(frameIndex, 0, sizeof(int) * ARRAYSIZE(frameIndex)); if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) @@ -79,13 +79,13 @@ int MenuManager::menu() { _vm->_graphicsManager->fadeInLong(); if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) - spriteData = _vm->_objectsManager.loadSprite("MENU.SPR"); + spriteData = _vm->_objectsManager->loadSprite("MENU.SPR"); else if (_vm->_globals->_language == LANG_EN) - spriteData = _vm->_objectsManager.loadSprite("MENUAN.SPR"); + spriteData = _vm->_objectsManager->loadSprite("MENUAN.SPR"); else if (_vm->_globals->_language == LANG_FR) - spriteData = _vm->_objectsManager.loadSprite("MENUFR.SPR"); + spriteData = _vm->_objectsManager->loadSprite("MENUFR.SPR"); else if (_vm->_globals->_language == LANG_SP) - spriteData = _vm->_objectsManager.loadSprite("MENUES.SPR"); + spriteData = _vm->_objectsManager->loadSprite("MENUES.SPR"); _vm->_eventsManager->mouseOn(); _vm->_eventsManager->changeMouseCursor(0); diff --git a/engines/hopkins/menu.h b/engines/hopkins/menu.h index 542b773f4f..e926c29dbd 100644 --- a/engines/hopkins/menu.h +++ b/engines/hopkins/menu.h @@ -36,8 +36,7 @@ private: HopkinsEngine *_vm; public: - MenuManager() {} - void setParent(HopkinsEngine *vm); + MenuManager(HopkinsEngine *vm); int menu(); }; diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 362c9fe4b8..8d3d1d7aec 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -35,7 +35,9 @@ namespace Hopkins { -ObjectsManager::ObjectsManager() { +ObjectsManager::ObjectsManager(HopkinsEngine *vm) { + _vm = vm; + for (int i = 0; i < 6; ++i) Common::fill((byte *)&_sprite[i], (byte *)&_sprite[i] + sizeof(SpriteItem), 0); @@ -89,10 +91,6 @@ ObjectsManager::~ObjectsManager() { _vm->_globals->freeMemory(_headSprites); } -void ObjectsManager::setParent(HopkinsEngine *vm) { - _vm = vm; -} - void ObjectsManager::clearAll() { _forestFl = false; _forestSprite = _vm->_globals->freeMemory(_forestSprite); diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h index 3967b50847..a0dd59a793 100644 --- a/engines/hopkins/objects.h +++ b/engines/hopkins/objects.h @@ -164,10 +164,9 @@ public: bool BOBTOUS; bool OBSSEUL; - ObjectsManager(); + ObjectsManager(HopkinsEngine *vm); ~ObjectsManager(); - void setParent(HopkinsEngine *vm); void clearAll(); int getWidth(const byte *objectData, int idx); diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp index 8563c53085..2697a6d59c 100644 --- a/engines/hopkins/saveload.cpp +++ b/engines/hopkins/saveload.cpp @@ -148,8 +148,8 @@ Common::Error SaveLoadManager::saveGame(int slot, const Common::String &saveName for (int i = 0; i < 35; ++i) _vm->_globals->_saveData->_inventory[i] = _vm->_globals->_inventory[i]; - _vm->_globals->_saveData->_mapCarPosX = _vm->_objectsManager._mapCarPosX; - _vm->_globals->_saveData->_mapCarPosY = _vm->_objectsManager._mapCarPosY; + _vm->_globals->_saveData->_mapCarPosX = _vm->_objectsManager->_mapCarPosX; + _vm->_globals->_saveData->_mapCarPosY = _vm->_objectsManager->_mapCarPosY; /* Create the savegame */ Common::OutSaveFile *savefile = g_system->getSavefileManager()->openForSaving(_vm->generateSaveName(slot)); @@ -207,8 +207,8 @@ Common::Error SaveLoadManager::loadGame(int slot) { _vm->_globals->_exitId = _vm->_globals->_saveData->_data[svLastScreenId]; _vm->_globals->_saveData->_data[svLastPrevScreenId] = 0; _vm->_globals->_screenId = 0; - _vm->_objectsManager._mapCarPosX = _vm->_globals->_saveData->_mapCarPosX; - _vm->_objectsManager._mapCarPosY = _vm->_globals->_saveData->_mapCarPosY; + _vm->_objectsManager->_mapCarPosX = _vm->_globals->_saveData->_mapCarPosX; + _vm->_objectsManager->_mapCarPosY = _vm->_globals->_saveData->_mapCarPosY; return Common::kNoError; } diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index 2b30c789c1..d324eeefe4 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -176,7 +176,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } case MKTAG24('B', 'O', 'B'): - if (!_vm->_objectsManager._disableFl) { + if (!_vm->_objectsManager->_disableFl) { int vbobIdx = dataP[5]; vbobFrameIndex = dataP[6]; int v4 = dataP[7]; @@ -185,9 +185,9 @@ int ScriptManager::handleOpcode(byte *dataP) { if (vbobIdx == 52) { _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, vbobPosX, READ_LE_INT16(dataP + 10), vbobFrameIndex); } else if (vbobIdx == 51) { - _vm->_objectsManager.BOB_VIVANT(vbobFrameIndex); + _vm->_objectsManager->BOB_VIVANT(vbobFrameIndex); } else if (vbobIdx != 50) { - _vm->_objectsManager.VBOB(_vm->_globals->SPRITE_ECRAN, vbobIdx, vbobPosX, vbobPosY, vbobFrameIndex); + _vm->_objectsManager->VBOB(_vm->_globals->SPRITE_ECRAN, vbobIdx, vbobPosX, vbobPosY, vbobFrameIndex); if (v4) v4 /= _vm->_globals->_speed; if (v4 > 1) { @@ -204,36 +204,36 @@ int ScriptManager::handleOpcode(byte *dataP) { opcodeType = 1; break; case MKTAG24('S', 'T', 'P'): - if (!_vm->_objectsManager._disableFl) { - _vm->_objectsManager._twoCharactersFl = false; - _vm->_objectsManager._characterPos.x = READ_LE_INT16(dataP + 6); - _vm->_objectsManager._characterPos.y = READ_LE_INT16(dataP + 8); - _vm->_objectsManager._startSpriteIndex = dataP[5]; - if (_vm->_objectsManager._changeHeadFl) { + if (!_vm->_objectsManager->_disableFl) { + _vm->_objectsManager->_twoCharactersFl = false; + _vm->_objectsManager->_characterPos.x = READ_LE_INT16(dataP + 6); + _vm->_objectsManager->_characterPos.y = READ_LE_INT16(dataP + 8); + _vm->_objectsManager->_startSpriteIndex = dataP[5]; + if (_vm->_objectsManager->_changeHeadFl) { if (_vm->_globals->_saveData->_data[svField354] == 1 && _vm->_globals->_saveData->_cloneHopkins._pos.x && _vm->_globals->_saveData->_cloneHopkins._pos.y && _vm->_globals->_saveData->_cloneHopkins._startSpriteIndex && _vm->_globals->_saveData->_cloneHopkins._location) { - _vm->_objectsManager._characterPos = _vm->_globals->_saveData->_cloneHopkins._pos; - _vm->_objectsManager._startSpriteIndex = _vm->_globals->_saveData->_cloneHopkins._startSpriteIndex; + _vm->_objectsManager->_characterPos = _vm->_globals->_saveData->_cloneHopkins._pos; + _vm->_objectsManager->_startSpriteIndex = _vm->_globals->_saveData->_cloneHopkins._startSpriteIndex; } if (_vm->_globals->_saveData->_data[svField356] == 1 && _vm->_globals->_saveData->_samantha._pos.x && _vm->_globals->_saveData->_samantha._pos.y && _vm->_globals->_saveData->_samantha._startSpriteIndex && _vm->_globals->_saveData->_samantha._location) { - _vm->_objectsManager._characterPos = _vm->_globals->_saveData->_samantha._pos; - _vm->_objectsManager._startSpriteIndex = _vm->_globals->_saveData->_samantha._startSpriteIndex; + _vm->_objectsManager->_characterPos = _vm->_globals->_saveData->_samantha._pos; + _vm->_objectsManager->_startSpriteIndex = _vm->_globals->_saveData->_samantha._startSpriteIndex; } if (_vm->_globals->_saveData->_data[svField357] == 1 && _vm->_globals->_saveData->_realHopkins._pos.x && _vm->_globals->_saveData->_realHopkins._pos.y && _vm->_globals->_saveData->_realHopkins._startSpriteIndex && _vm->_globals->_saveData->_realHopkins._location) { - _vm->_objectsManager._characterPos = _vm->_globals->_saveData->_realHopkins._pos; - _vm->_objectsManager._startSpriteIndex = _vm->_globals->_saveData->_realHopkins._startSpriteIndex; + _vm->_objectsManager->_characterPos = _vm->_globals->_saveData->_realHopkins._pos; + _vm->_objectsManager->_startSpriteIndex = _vm->_globals->_saveData->_realHopkins._startSpriteIndex; } } if (_vm->_globals->_saveData->_data[svField356] == 1 && _vm->_globals->_saveData->_realHopkins._location == _vm->_globals->_screenId) { - _vm->_objectsManager.addStaticSprite( - _vm->_objectsManager._headSprites, + _vm->_objectsManager->addStaticSprite( + _vm->_objectsManager->_headSprites, _vm->_globals->_saveData->_realHopkins._pos, 1, 2, @@ -241,14 +241,14 @@ int ScriptManager::handleOpcode(byte *dataP) { false, 34, 190); - _vm->_objectsManager.animateSprite(1); - _vm->_objectsManager._twoCharactersFl = true; + _vm->_objectsManager->animateSprite(1); + _vm->_objectsManager->_twoCharactersFl = true; } if (_vm->_globals->_saveData->_data[svField357] == 1 && _vm->_globals->_saveData->_data[svField355] == 1 && _vm->_globals->_saveData->_samantha._location == _vm->_globals->_screenId) { - _vm->_objectsManager.addStaticSprite( - _vm->_objectsManager._headSprites, + _vm->_objectsManager->addStaticSprite( + _vm->_objectsManager->_headSprites, _vm->_globals->_saveData->_samantha._pos, 1, 3, @@ -256,15 +256,15 @@ int ScriptManager::handleOpcode(byte *dataP) { false, 20, 127); - _vm->_objectsManager.animateSprite(1); - _vm->_objectsManager._twoCharactersFl = true; + _vm->_objectsManager->animateSprite(1); + _vm->_objectsManager->_twoCharactersFl = true; } } opcodeType = 1; - _vm->_objectsManager._changeHeadFl = false; + _vm->_objectsManager->_changeHeadFl = false; break; case MKTAG24('S', 'T', 'E'): - if (!_vm->_objectsManager._disableFl) { + if (!_vm->_objectsManager->_disableFl) { _vm->_globals->_prevScreenId = _vm->_globals->_screenId; _vm->_globals->_saveData->_data[svLastPrevScreenId] = _vm->_globals->_screenId; _vm->_globals->_screenId = _vm->_globals->_saveData->_data[svLastScreenId] = dataP[5]; @@ -273,8 +273,8 @@ int ScriptManager::handleOpcode(byte *dataP) { opcodeType = 1; break; case MKTAG24('B', 'O', 'F'): - if (!_vm->_objectsManager._disableFl) - _vm->_objectsManager.VBOB_OFF(READ_LE_INT16(dataP + 5)); + if (!_vm->_objectsManager->_disableFl) + _vm->_objectsManager->VBOB_OFF(READ_LE_INT16(dataP + 5)); opcodeType = 1; break; case MKTAG24('P', 'E', 'R'): { @@ -286,172 +286,172 @@ int ScriptManager::handleOpcode(byte *dataP) { case 1: case 14: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(4); + _vm->_objectsManager->doActionBack(4); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(4); + _vm->_objectsManager->doActionRight(4); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(4); + _vm->_objectsManager->doActionDiagRight(4); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(4); + _vm->_objectsManager->doActionFront(4); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(4); + _vm->_objectsManager->doActionDiagLeft(4); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(4); + _vm->_objectsManager->doActionLeft(4); break; case 2: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(7); + _vm->_objectsManager->doActionBack(7); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(7); + _vm->_objectsManager->doActionRight(7); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(7); + _vm->_objectsManager->doActionDiagRight(7); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(7); + _vm->_objectsManager->doActionFront(7); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(7); + _vm->_objectsManager->doActionDiagLeft(7); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(7); + _vm->_objectsManager->doActionLeft(7); if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(8); + _vm->_objectsManager->doActionBack(8); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(8); + _vm->_objectsManager->doActionRight(8); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(8); + _vm->_objectsManager->doActionDiagRight(8); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(8); + _vm->_objectsManager->doActionFront(8); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(8); + _vm->_objectsManager->doActionDiagLeft(8); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(8); + _vm->_objectsManager->doActionLeft(8); break; case 19: case 4: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(1); + _vm->_objectsManager->doActionBack(1); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(1); + _vm->_objectsManager->doActionRight(1); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(1); + _vm->_objectsManager->doActionDiagRight(1); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(1); + _vm->_objectsManager->doActionFront(1); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(1); + _vm->_objectsManager->doActionDiagLeft(1); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(1); + _vm->_objectsManager->doActionLeft(1); break; case 5: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(5); + _vm->_objectsManager->doActionBack(5); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(5); + _vm->_objectsManager->doActionRight(5); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(5); + _vm->_objectsManager->doActionDiagRight(5); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(5); + _vm->_objectsManager->doActionFront(5); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(5); + _vm->_objectsManager->doActionDiagLeft(5); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(5); + _vm->_objectsManager->doActionLeft(5); if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(6); + _vm->_objectsManager->doActionBack(6); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(6); + _vm->_objectsManager->doActionRight(6); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(6); + _vm->_objectsManager->doActionDiagRight(6); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(6); + _vm->_objectsManager->doActionFront(6); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(6); + _vm->_objectsManager->doActionDiagLeft(6); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(6); + _vm->_objectsManager->doActionLeft(6); break; case 17: case 7: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(2); + _vm->_objectsManager->doActionBack(2); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(2); + _vm->_objectsManager->doActionRight(2); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(2); + _vm->_objectsManager->doActionDiagRight(2); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(2); + _vm->_objectsManager->doActionFront(2); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(2); + _vm->_objectsManager->doActionDiagLeft(2); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(2); + _vm->_objectsManager->doActionLeft(2); break; case 18: case 8: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(3); + _vm->_objectsManager->doActionBack(3); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(3); + _vm->_objectsManager->doActionRight(3); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(3); + _vm->_objectsManager->doActionDiagRight(3); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(3); + _vm->_objectsManager->doActionFront(3); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(3); + _vm->_objectsManager->doActionDiagLeft(3); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(3); + _vm->_objectsManager->doActionLeft(3); break; case 9: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(5); + _vm->_objectsManager->doActionBack(5); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(5); + _vm->_objectsManager->doActionRight(5); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(5); + _vm->_objectsManager->doActionDiagRight(5); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(5); + _vm->_objectsManager->doActionFront(5); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(5); + _vm->_objectsManager->doActionDiagLeft(5); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(5); + _vm->_objectsManager->doActionLeft(5); break; case 10: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(6); + _vm->_objectsManager->doActionBack(6); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(6); + _vm->_objectsManager->doActionRight(6); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(6); + _vm->_objectsManager->doActionDiagRight(6); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(6); + _vm->_objectsManager->doActionFront(6); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(6); + _vm->_objectsManager->doActionDiagLeft(6); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(6); + _vm->_objectsManager->doActionLeft(6); break; case 15: case 11: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(7); + _vm->_objectsManager->doActionBack(7); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(7); + _vm->_objectsManager->doActionRight(7); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(7); + _vm->_objectsManager->doActionDiagRight(7); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(7); + _vm->_objectsManager->doActionFront(7); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(7); + _vm->_objectsManager->doActionDiagLeft(7); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(7); + _vm->_objectsManager->doActionLeft(7); break; case 16: case 12: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager.doActionBack(8); + _vm->_objectsManager->doActionBack(8); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager.doActionRight(8); + _vm->_objectsManager->doActionRight(8); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager.doActionDiagRight(8); + _vm->_objectsManager->doActionDiagRight(8); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager.doActionFront(8); + _vm->_objectsManager->doActionFront(8); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager.doActionDiagLeft(8); + _vm->_objectsManager->doActionDiagLeft(8); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager.doActionLeft(8); + _vm->_objectsManager->doActionLeft(8); break; } } @@ -476,11 +476,11 @@ int ScriptManager::handleOpcode(byte *dataP) { } case MKTAG24('O', 'B', 'P'): opcodeType = 1; - _vm->_objectsManager.addObject(READ_LE_INT16(dataP + 5)); + _vm->_objectsManager->addObject(READ_LE_INT16(dataP + 5)); break; case MKTAG24('O', 'B', 'M'): opcodeType = 1; - _vm->_objectsManager.removeObject(READ_LE_INT16(dataP + 5)); + _vm->_objectsManager->removeObject(READ_LE_INT16(dataP + 5)); break; case MKTAG24('G', 'O', 'T'): opcodeType = 2; @@ -507,17 +507,17 @@ int ScriptManager::handleOpcode(byte *dataP) { case MKTAG24('A', 'N', 'I'): { int animId = READ_LE_INT16(dataP + 5); if (animId <= 100) - _vm->_objectsManager.setBobAnimation(animId); + _vm->_objectsManager->setBobAnimation(animId); else - _vm->_objectsManager.stopBobAnimation(animId - 100); + _vm->_objectsManager->stopBobAnimation(animId - 100); opcodeType = 1; break; } case MKTAG24('S', 'P', 'E'): switch (READ_LE_INT16(dataP + 5)) { case 6: - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.OPTI_ONE(20, 0, 14, 4); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->OPTI_ONE(20, 0, 14, 4); break; case 7: @@ -548,11 +548,11 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals->_disableInventFl = true; _vm->_graphicsManager->fadeOutLong(); _vm->_globals->disableHiding(); - _vm->_objectsManager.removeSprite(0); + _vm->_objectsManager->removeSprite(0); _vm->_fontManager->hideText(5); _vm->_fontManager->hideText(9); _vm->_graphicsManager->endDisplayBob(); - _vm->_objectsManager.clearScreen(); + _vm->_objectsManager->clearScreen(); if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo()) { _vm->_graphicsManager->fadeOutLong(); @@ -580,7 +580,7 @@ int ScriptManager::handleOpcode(byte *dataP) { return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(3) != 100); + } while (_vm->_objectsManager->getBobAnimDataIdx(3) != 100); _vm->_graphicsManager->fadeOutDefaultLength(_vm->_graphicsManager->_vesaBuffer); _vm->_graphicsManager->endDisplayBob(); @@ -605,7 +605,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_eventsManager->mouseOff(); _vm->_graphicsManager->fadeInDefaultLength(_vm->_graphicsManager->_vesaBuffer); - _vm->_objectsManager.SCI_OPTI_ONE(1, 0, 17, 3); + _vm->_objectsManager->SCI_OPTI_ONE(1, 0, 17, 3); _vm->_graphicsManager->fadeOutDefaultLength(_vm->_graphicsManager->_vesaBuffer); _vm->_graphicsManager->endDisplayBob(); @@ -621,7 +621,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_graphicsManager->fadeOutLong(); _vm->_globals->_disableInventFl = false; - _vm->_objectsManager._helicopterFl = true; + _vm->_objectsManager->_helicopterFl = true; break; case 16: @@ -754,26 +754,26 @@ 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->_objectsManager._zoneNum = -1; + _vm->_linesManager->_route = _vm->_linesManager->PARCOURS2(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 564, 420); + _vm->_objectsManager->_zoneNum = -1; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager.GOHOME(); + _vm->_objectsManager->GOHOME(); _vm->_eventsManager->refreshScreenAndEvents(); } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL); - _vm->_objectsManager.removeSprite(0); + _vm->_objectsManager->removeSprite(0); _vm->_globals->_checkDistanceFl = true; _vm->_soundManager.loadSample(1, "SOUND44.WAV"); _vm->_soundManager.loadSample(2, "SOUND45.WAV"); - _vm->_objectsManager.OPTI_BOBON(9, 10, -1, 0, 0, 0); + _vm->_objectsManager->OPTI_BOBON(9, 10, -1, 0, 0, 0); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(9)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(9)) { case 4: case 16: case 28: @@ -789,7 +789,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } - switch (_vm->_objectsManager.getBobAnimDataIdx(10)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(10)) { case 10: case 22: case 33: @@ -814,12 +814,12 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(9) == 36) + if (_vm->_objectsManager->getBobAnimDataIdx(9) == 36) break; } - _vm->_objectsManager.animateSprite(0); - _vm->_objectsManager.stopBobAnimation(9); - _vm->_objectsManager.stopBobAnimation(10); + _vm->_objectsManager->animateSprite(0); + _vm->_objectsManager->stopBobAnimation(9); + _vm->_objectsManager->stopBobAnimation(10); _vm->_soundManager.removeSample(1); _vm->_soundManager.removeSample(2); break; @@ -835,8 +835,8 @@ int ScriptManager::handleOpcode(byte *dataP) { case 49: { _vm->_globals->disableHiding(); - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.OPTI_BOBON(9, 10, -1, 0, 0, 0); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->OPTI_BOBON(9, 10, -1, 0, 0, 0); int endIdx; if (_vm->_globals->_saveData->_data[svField133] == 1) @@ -848,7 +848,7 @@ int ScriptManager::handleOpcode(byte *dataP) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(9)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(9)) { case 4: case 18: if (!playFl) { @@ -862,7 +862,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } - switch (_vm->_objectsManager.getBobAnimDataIdx(10)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(10)) { case 11: if (!playFl) { _vm->_soundManager.directPlayWav("SOUND45.WAV"); @@ -874,13 +874,13 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(9) == endIdx) + if (_vm->_objectsManager->getBobAnimDataIdx(9) == endIdx) break; } if (endIdx == 12) { - _vm->_objectsManager.animateSprite(0); - _vm->_objectsManager.stopBobAnimation(9); + _vm->_objectsManager->animateSprite(0); + _vm->_objectsManager->stopBobAnimation(9); } _vm->_globals->enableHiding(); break; @@ -888,13 +888,13 @@ int ScriptManager::handleOpcode(byte *dataP) { case 50: _vm->_soundManager.playSoundFile("SOUND46.WAv"); - _vm->_objectsManager.OPTI_ONE(11, 0, 23, 0); + _vm->_objectsManager->OPTI_ONE(11, 0, 23, 0); break; case 51: { _vm->_graphicsManager->fadeOutLong(); _vm->_globals->disableHiding(); - _vm->_objectsManager.removeSprite(0); + _vm->_objectsManager->removeSprite(0); _vm->_fontManager->hideText(5); _vm->_fontManager->hideText(9); _vm->_graphicsManager->endDisplayBob(); @@ -909,15 +909,15 @@ int ScriptManager::handleOpcode(byte *dataP) { if (_vm->shouldQuit()) return -1; // Exiting game - if (_vm->_objectsManager.getBobAnimDataIdx(12) == 5 && !playFl) { + if (_vm->_objectsManager->getBobAnimDataIdx(12) == 5 && !playFl) { _vm->_soundManager.playWav(1); playFl = true; } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(12) == 34) + if (_vm->_objectsManager->getBobAnimDataIdx(12) == 34) break; } - _vm->_objectsManager.stopBobAnimation(2); + _vm->_objectsManager->stopBobAnimation(2); _vm->_graphicsManager->fadeOutLong(); _vm->_graphicsManager->_noFadingFl = true; _vm->_globals->_exitId = 20; @@ -939,12 +939,12 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 55: - _vm->_objectsManager.stopBobAnimation(1); - _vm->_objectsManager.OPTI_ONE(15, 0, 12, 0); - _vm->_objectsManager.stopBobAnimation(15); - _vm->_objectsManager.OBSSEUL = true; - _vm->_objectsManager.loadLinkFile("IM19a"); - _vm->_objectsManager.OBSSEUL = false; + _vm->_objectsManager->stopBobAnimation(1); + _vm->_objectsManager->OPTI_ONE(15, 0, 12, 0); + _vm->_objectsManager->stopBobAnimation(15); + _vm->_objectsManager->OBSSEUL = true; + _vm->_objectsManager->loadLinkFile("IM19a"); + _vm->_objectsManager->OBSSEUL = false; break; case 56: @@ -952,9 +952,9 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals->_characterType = 1; _vm->_globals->_saveData->_data[svAlternateSpriteFl] = 1; _vm->_globals->loadCharacterData(); - _vm->_objectsManager._sprite[0]._deltaX = 28; - _vm->_objectsManager._sprite[0]._deltaY = 155; - _vm->_objectsManager.computeAndSetSpriteSize(); + _vm->_objectsManager->_sprite[0]._deltaX = 28; + _vm->_objectsManager->_sprite[0]._deltaY = 155; + _vm->_objectsManager->computeAndSetSpriteSize(); break; case 57: @@ -962,9 +962,9 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals->_characterType = 0; _vm->_globals->_saveData->_data[svAlternateSpriteFl] = 0; _vm->_globals->loadCharacterData(); - _vm->_objectsManager._sprite[0]._deltaX = 34; - _vm->_objectsManager._sprite[0]._deltaY = 190; - _vm->_objectsManager.computeAndSetSpriteSize(); + _vm->_objectsManager->_sprite[0]._deltaX = 34; + _vm->_objectsManager->_sprite[0]._deltaY = 190; + _vm->_objectsManager->computeAndSetSpriteSize(); break; case 58: @@ -977,29 +977,29 @@ int ScriptManager::handleOpcode(byte *dataP) { case 59: { _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager._oldCharacterPosX = _vm->_objectsManager.getSpriteX(0); + _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 = _vm->_linesManager->PARCOURS2(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 445, 332); _vm->_globals->_checkDistanceFl = true; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager.GOHOME(); + _vm->_objectsManager->GOHOME(); _vm->_eventsManager->refreshScreenAndEvents(); } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL); - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setBobAnimation(7); - _vm->_objectsManager.setBobAnimDataIdx(7, 0); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setBobAnimation(7); + _vm->_objectsManager->setBobAnimDataIdx(7, 0); bool playFl = false; _vm->_soundManager.loadSample(1, "SOUND40.WAV"); for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(7)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(7)) { case 10: case 18: if (!playFl) { @@ -1011,20 +1011,20 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; case 19: - _vm->_objectsManager.setBobAnimation(3); + _vm->_objectsManager->setBobAnimation(3); playFl = false; break; } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(3) == 48) + if (_vm->_objectsManager->getBobAnimDataIdx(3) == 48) break; } _vm->_soundManager.removeSample(1); - _vm->_objectsManager.setSpriteIndex(0, 62); - _vm->_objectsManager.animateSprite(0); - _vm->_objectsManager.setBobAnimation(6); - _vm->_objectsManager.stopBobAnimation(7); - _vm->_objectsManager.stopBobAnimation(3); + _vm->_objectsManager->setSpriteIndex(0, 62); + _vm->_objectsManager->animateSprite(0); + _vm->_objectsManager->setBobAnimation(6); + _vm->_objectsManager->stopBobAnimation(7); + _vm->_objectsManager->stopBobAnimation(3); break; } @@ -1037,11 +1037,11 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 80: { - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setBobAnimation(12); - _vm->_objectsManager.setBobAnimation(13); - _vm->_objectsManager.setBobAnimDataIdx(12, 0); - _vm->_objectsManager.setBobAnimDataIdx(13, 0); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setBobAnimation(12); + _vm->_objectsManager->setBobAnimation(13); + _vm->_objectsManager->setBobAnimDataIdx(12, 0); + _vm->_objectsManager->setBobAnimDataIdx(13, 0); _vm->_soundManager.loadWav("SOUND44.WAV", 1); _vm->_soundManager.loadWav("SOUND71.WAV", 2); bool playFl = false; @@ -1049,7 +1049,7 @@ int ScriptManager::handleOpcode(byte *dataP) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(12)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(12)) { case 4: if (!playFl) { _vm->_soundManager.playWav(1); @@ -1061,7 +1061,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } - switch (_vm->_objectsManager.getBobAnimDataIdx(4)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(4)) { case 5: if (!playFl) { _vm->_soundManager.playWav(2); @@ -1072,47 +1072,47 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } - if (_vm->_objectsManager.getBobAnimDataIdx(13) == 8) { - _vm->_objectsManager.stopBobAnimation(13); - _vm->_objectsManager.stopBobAnimation(3); - _vm->_objectsManager.setBobAnimation(4); - _vm->_objectsManager.setBobAnimDataIdx(4, 0); - _vm->_objectsManager.setBobAnimDataIdx(13, 0); + if (_vm->_objectsManager->getBobAnimDataIdx(13) == 8) { + _vm->_objectsManager->stopBobAnimation(13); + _vm->_objectsManager->stopBobAnimation(3); + _vm->_objectsManager->setBobAnimation(4); + _vm->_objectsManager->setBobAnimDataIdx(4, 0); + _vm->_objectsManager->setBobAnimDataIdx(13, 0); } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(4) == 16) + if (_vm->_objectsManager->getBobAnimDataIdx(4) == 16) break; } - _vm->_objectsManager.stopBobAnimation(12); - _vm->_objectsManager.stopBobAnimation(4); - _vm->_objectsManager.animateSprite(0); - _vm->_objectsManager.OBSSEUL = true; - _vm->_objectsManager.loadLinkFile("IM27a"); - _vm->_objectsManager.OBSSEUL = false; + _vm->_objectsManager->stopBobAnimation(12); + _vm->_objectsManager->stopBobAnimation(4); + _vm->_objectsManager->animateSprite(0); + _vm->_objectsManager->OBSSEUL = true; + _vm->_objectsManager->loadLinkFile("IM27a"); + _vm->_objectsManager->OBSSEUL = false; break; } case 81: { _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager._oldCharacterPosX = _vm->_objectsManager.getSpriteX(0); + _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 = _vm->_linesManager->PARCOURS2(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 119, 268); _vm->_globals->_checkDistanceFl = true; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager.GOHOME(); + _vm->_objectsManager->GOHOME(); _vm->_eventsManager->refreshScreenAndEvents(); } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL); - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setBobAnimation(11); - _vm->_objectsManager.setBobAnimation(8); - _vm->_objectsManager.setBobAnimDataIdx(11, 0); - _vm->_objectsManager.setBobAnimDataIdx(8, 0); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setBobAnimation(11); + _vm->_objectsManager->setBobAnimation(8); + _vm->_objectsManager->setBobAnimDataIdx(11, 0); + _vm->_objectsManager->setBobAnimDataIdx(8, 0); _vm->_soundManager.loadWav("SOUND44.WAV", 1); _vm->_soundManager.loadWav("SOUND48.WAV", 2); _vm->_soundManager.loadWav("SOUND49.WAV", 3); @@ -1121,7 +1121,7 @@ int ScriptManager::handleOpcode(byte *dataP) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(11)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(11)) { case 4: if (!playFl) { _vm->_soundManager.playWav(1); @@ -1133,7 +1133,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } - switch (_vm->_objectsManager.getBobAnimDataIdx(8)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(8)) { case 11: if (!playFl) { _vm->_soundManager.playWav(2); @@ -1146,28 +1146,28 @@ int ScriptManager::handleOpcode(byte *dataP) { } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(8) == 32) + if (_vm->_objectsManager->getBobAnimDataIdx(8) == 32) break; } _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 201, 14, 1); - _vm->_objectsManager.animateSprite(0); - _vm->_objectsManager.stopBobAnimation(11); - _vm->_objectsManager.stopBobAnimation(8); - _vm->_objectsManager.setBobAnimation(5); - _vm->_objectsManager.setBobAnimation(6); - _vm->_objectsManager.setBobAnimDataIdx(5, 0); - _vm->_objectsManager.setBobAnimDataIdx(6, 0); + _vm->_objectsManager->animateSprite(0); + _vm->_objectsManager->stopBobAnimation(11); + _vm->_objectsManager->stopBobAnimation(8); + _vm->_objectsManager->setBobAnimation(5); + _vm->_objectsManager->setBobAnimation(6); + _vm->_objectsManager->setBobAnimDataIdx(5, 0); + _vm->_objectsManager->setBobAnimDataIdx(6, 0); _vm->_soundManager.playWav(3); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(5) != 74); - _vm->_objectsManager.stopBobAnimation(5); - _vm->_objectsManager.stopBobAnimation(6); - _vm->_objectsManager.setBobAnimation(9); - _vm->_objectsManager.setBobAnimation(7); + } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 74); + _vm->_objectsManager->stopBobAnimation(5); + _vm->_objectsManager->stopBobAnimation(6); + _vm->_objectsManager->setBobAnimation(9); + _vm->_objectsManager->setBobAnimation(7); break; } @@ -1182,20 +1182,20 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 85: - _vm->_objectsManager.stopBobAnimation(3); - _vm->_objectsManager.setBobAnimation(5); - _vm->_objectsManager.setBobAnimDataIdx(5, 0); + _vm->_objectsManager->stopBobAnimation(3); + _vm->_objectsManager->setBobAnimation(5); + _vm->_objectsManager->setBobAnimDataIdx(5, 0); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(5) != 6); - _vm->_objectsManager.stopBobAnimation(5); - _vm->_objectsManager.setBobAnimation(6); - _vm->_objectsManager.OBSSEUL = true; - _vm->_objectsManager.loadLinkFile("IM24a"); - _vm->_objectsManager.OBSSEUL = false; + } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 6); + _vm->_objectsManager->stopBobAnimation(5); + _vm->_objectsManager->setBobAnimation(6); + _vm->_objectsManager->OBSSEUL = true; + _vm->_objectsManager->loadLinkFile("IM24a"); + _vm->_objectsManager->OBSSEUL = false; break; case 86: @@ -1217,17 +1217,17 @@ int ScriptManager::handleOpcode(byte *dataP) { case 88: if (_vm->_globals->_saveData->_data[svField183] == 1) { - _vm->_objectsManager.setBobAnimDataIdx(1, 0); - _vm->_objectsManager.setBobAnimDataIdx(2, 0); - _vm->_objectsManager.setBobAnimation(1); - _vm->_objectsManager.setBobAnimation(2); + _vm->_objectsManager->setBobAnimDataIdx(1, 0); + _vm->_objectsManager->setBobAnimDataIdx(2, 0); + _vm->_objectsManager->setBobAnimation(1); + _vm->_objectsManager->setBobAnimation(2); _vm->_soundManager.loadSample(1, "SOUND40.WAV"); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(1)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(1)) { case 1: case 3: case 5: @@ -1245,26 +1245,26 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(1) == 9) + if (_vm->_objectsManager->getBobAnimDataIdx(1) == 9) break; } - _vm->_objectsManager.stopBobAnimation(1); - _vm->_objectsManager.stopBobAnimation(2); + _vm->_objectsManager->stopBobAnimation(1); + _vm->_objectsManager->stopBobAnimation(2); _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 160, 6); _vm->_soundManager.removeSample(1); } if (_vm->_globals->_saveData->_data[svField183] == 2) { - _vm->_objectsManager.setBobAnimDataIdx(1, 0); - _vm->_objectsManager.setBobAnimDataIdx(3, 0); - _vm->_objectsManager.setBobAnimation(1); - _vm->_objectsManager.setBobAnimation(3); + _vm->_objectsManager->setBobAnimDataIdx(1, 0); + _vm->_objectsManager->setBobAnimDataIdx(3, 0); + _vm->_objectsManager->setBobAnimation(1); + _vm->_objectsManager->setBobAnimation(3); _vm->_soundManager.loadSample(1, "SOUND40.WAV"); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(1)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(1)) { case 1: case 3: case 5: @@ -1282,11 +1282,11 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(1) == 9) + if (_vm->_objectsManager->getBobAnimDataIdx(1) == 9) break; } - _vm->_objectsManager.stopBobAnimation(1); - _vm->_objectsManager.stopBobAnimation(3); + _vm->_objectsManager->stopBobAnimation(1); + _vm->_objectsManager->stopBobAnimation(3); _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 161, 8); _vm->_soundManager.removeSample(1); } @@ -1352,32 +1352,32 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 95: - _vm->_objectsManager.setBobAnimation(9); - _vm->_objectsManager.setBobAnimation(10); - _vm->_objectsManager.setBobAnimation(12); - _vm->_objectsManager.setBobAnimDataIdx(9, 0); - _vm->_objectsManager.setBobAnimDataIdx(10, 0); - _vm->_objectsManager.setBobAnimDataIdx(12, 0); - _vm->_objectsManager.removeSprite(0); + _vm->_objectsManager->setBobAnimation(9); + _vm->_objectsManager->setBobAnimation(10); + _vm->_objectsManager->setBobAnimation(12); + _vm->_objectsManager->setBobAnimDataIdx(9, 0); + _vm->_objectsManager->setBobAnimDataIdx(10, 0); + _vm->_objectsManager->setBobAnimDataIdx(12, 0); + _vm->_objectsManager->removeSprite(0); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(9) != 15); - _vm->_objectsManager.stopBobAnimation(9); - _vm->_objectsManager.animateSprite(0); + } while (_vm->_objectsManager->getBobAnimDataIdx(9) != 15); + _vm->_objectsManager->stopBobAnimation(9); + _vm->_objectsManager->animateSprite(0); _vm->_soundManager.playSoundFile("SOUND50.WAV"); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(12) != 117); + } while (_vm->_objectsManager->getBobAnimDataIdx(12) != 117); _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 830, 122, 0); - _vm->_objectsManager.stopBobAnimation(12); - _vm->_objectsManager.stopBobAnimation(10); - _vm->_objectsManager.setBobAnimation(11); + _vm->_objectsManager->stopBobAnimation(12); + _vm->_objectsManager->stopBobAnimation(10); + _vm->_objectsManager->setBobAnimation(11); break; case 98: @@ -1416,38 +1416,38 @@ int ScriptManager::handleOpcode(byte *dataP) { case 105: _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager._oldCharacterPosX = _vm->_objectsManager.getSpriteX(0); + _vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0); _vm->_globals->_oldDirection = DIR_NONE; _vm->_globals->Compteur = 0; _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 { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager.GOHOME(); + _vm->_objectsManager->GOHOME(); _vm->_eventsManager->refreshScreenAndEvents(); } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL); - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setSpriteIndex(0, 60); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setSpriteIndex(0, 60); _vm->_soundManager.loadSample(1, "SOUND63.WAV"); if (_vm->_globals->_saveData->_data[svField253] > 2) { - _vm->_objectsManager.setBobAnimation(4); + _vm->_objectsManager->setBobAnimation(4); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(4)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(4)) { case 9: case 32: case 55: @@ -1463,19 +1463,19 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(4) == 72) + if (_vm->_objectsManager->getBobAnimDataIdx(4) == 72) break; } - _vm->_objectsManager.stopBobAnimation(4); + _vm->_objectsManager->stopBobAnimation(4); } if (_vm->_globals->_saveData->_data[svField253] == 1) { - _vm->_objectsManager.setBobAnimation(6); + _vm->_objectsManager->setBobAnimation(6); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(6)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(6)) { case 9: case 32: case 55: @@ -1491,19 +1491,19 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(6) == 72) + if (_vm->_objectsManager->getBobAnimDataIdx(6) == 72) break; } - _vm->_objectsManager.stopBobAnimation(6); + _vm->_objectsManager->stopBobAnimation(6); } if (_vm->_globals->_saveData->_data[svField253] == 2) { - _vm->_objectsManager.setBobAnimation(5); + _vm->_objectsManager->setBobAnimation(5); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(5)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(5)) { case 9: case 32: case 55: @@ -1519,20 +1519,20 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(5) == 72) + if (_vm->_objectsManager->getBobAnimDataIdx(5) == 72) break; } - _vm->_objectsManager.stopBobAnimation(5); + _vm->_objectsManager->stopBobAnimation(5); } - _vm->_objectsManager.animateSprite(0); - _vm->_objectsManager.doActionBack(1); + _vm->_objectsManager->animateSprite(0); + _vm->_objectsManager->doActionBack(1); _vm->_soundManager.removeSample(1); break; case 106: - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setBobAnimation(4); - _vm->_objectsManager.setBobAnimDataIdx(4, 0); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setBobAnimation(4); + _vm->_objectsManager->setBobAnimDataIdx(4, 0); _vm->_soundManager.loadWav("SOUND61.WAV", 1); _vm->_soundManager.loadWav("SOUND62.WAV", 2); _vm->_soundManager.loadWav("SOUND61.WAV", 3); @@ -1541,36 +1541,36 @@ int ScriptManager::handleOpcode(byte *dataP) { return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(4) != 10); + } while (_vm->_objectsManager->getBobAnimDataIdx(4) != 10); _vm->_soundManager.playWav(1); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(4) != 18); + } while (_vm->_objectsManager->getBobAnimDataIdx(4) != 18); _vm->_soundManager.playWav(2); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(4) != 62); + } while (_vm->_objectsManager->getBobAnimDataIdx(4) != 62); _vm->_soundManager.playWav(3); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(4) != 77); - _vm->_objectsManager.stopBobAnimation(4); - _vm->_objectsManager.animateSprite(0); + } while (_vm->_objectsManager->getBobAnimDataIdx(4) != 77); + _vm->_objectsManager->stopBobAnimation(4); + _vm->_objectsManager->animateSprite(0); break; case 107: - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setBobAnimation(5); - _vm->_objectsManager.setBobAnimDataIdx(5, 0); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setBobAnimation(5); + _vm->_objectsManager->setBobAnimDataIdx(5, 0); _vm->_soundManager.loadWav("SOUND61.WAV", 1); _vm->_soundManager.loadWav("SOUND62.WAV", 2); _vm->_soundManager.loadWav("SOUND61.WAV", 3); @@ -1579,30 +1579,30 @@ int ScriptManager::handleOpcode(byte *dataP) { return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(5) != 10); + } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 10); _vm->_soundManager.playWav(1); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(5) != 18); + } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 18); _vm->_soundManager.playWav(2); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(5) != 38); + } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 38); _vm->_soundManager.playWav(3); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(5) != 53); - _vm->_objectsManager.stopBobAnimation(5); - _vm->_objectsManager.animateSprite(0); + } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 53); + _vm->_objectsManager->stopBobAnimation(5); + _vm->_objectsManager->animateSprite(0); break; case 108: @@ -1660,19 +1660,19 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_talkManager.startAnimatedCharacterDialogue("gred1.pe2"); _vm->_globals->_introSpeechOffFl = false; _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager._oldCharacterPosX = _vm->_objectsManager.getSpriteX(0); + _vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0); _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 = _vm->_linesManager->PARCOURS2(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 361, 325); _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager._zoneNum = -1; + _vm->_objectsManager->_zoneNum = -1; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager.GOHOME(); + _vm->_objectsManager->GOHOME(); _vm->_eventsManager->refreshScreenAndEvents(); } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL); _vm->_globals->_exitId = 59; @@ -1688,19 +1688,19 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_talkManager.startAnimatedCharacterDialogue("gbleu1.pe2"); _vm->_globals->_introSpeechOffFl = false; _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager._oldCharacterPosX = _vm->_objectsManager.getSpriteX(0); + _vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0); _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 = _vm->_linesManager->PARCOURS2(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 361, 325); _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager._zoneNum = -1; + _vm->_objectsManager->_zoneNum = -1; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager.GOHOME(); + _vm->_objectsManager->GOHOME(); _vm->_eventsManager->refreshScreenAndEvents(); } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL); _vm->_globals->_exitId = 59; @@ -1712,50 +1712,50 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 175: - _vm->_objectsManager.setSpriteIndex(0, 55); - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setBobAnimation(9); - _vm->_objectsManager.setBobAnimation(10); - _vm->_objectsManager.setBobOffset(10, 300); + _vm->_objectsManager->setSpriteIndex(0, 55); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setBobAnimation(9); + _vm->_objectsManager->setBobAnimation(10); + _vm->_objectsManager->setBobOffset(10, 300); _vm->_soundManager.playSoundFile("SOUND44.WAV"); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(10) != 7); - _vm->_objectsManager.setBobAnimation(6); - _vm->_objectsManager.stopBobAnimation(3); + } while (_vm->_objectsManager->getBobAnimDataIdx(10) != 7); + _vm->_objectsManager->setBobAnimation(6); + _vm->_objectsManager->stopBobAnimation(3); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(6) != 10); + } while (_vm->_objectsManager->getBobAnimDataIdx(6) != 10); _vm->_soundManager.playSoundFile("SOUND71.WAV"); - _vm->_objectsManager.setBobAnimation(7); - _vm->_objectsManager.stopBobAnimation(4); + _vm->_objectsManager->setBobAnimation(7); + _vm->_objectsManager->stopBobAnimation(4); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(7) != 15); - _vm->_objectsManager.stopBobAnimation(5); - _vm->_objectsManager.setBobAnimation(8); + } while (_vm->_objectsManager->getBobAnimDataIdx(7) != 15); + _vm->_objectsManager->stopBobAnimation(5); + _vm->_objectsManager->setBobAnimation(8); _vm->_soundManager.playSoundFile("SOUND70.WAV"); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(8) != 76); - _vm->_objectsManager.stopBobAnimation(6); - _vm->_objectsManager.stopBobAnimation(7); - _vm->_objectsManager.stopBobAnimation(8); - _vm->_objectsManager.stopBobAnimation(9); - _vm->_objectsManager.stopBobAnimation(10); - _vm->_objectsManager.animateSprite(0); + } while (_vm->_objectsManager->getBobAnimDataIdx(8) != 76); + _vm->_objectsManager->stopBobAnimation(6); + _vm->_objectsManager->stopBobAnimation(7); + _vm->_objectsManager->stopBobAnimation(8); + _vm->_objectsManager->stopBobAnimation(9); + _vm->_objectsManager->stopBobAnimation(10); + _vm->_objectsManager->animateSprite(0); break; case 176: @@ -1777,15 +1777,15 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 201: - _vm->_objectsManager.setBobAnimation(3); + _vm->_objectsManager->setBobAnimation(3); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(3) != 18); - _vm->_objectsManager.stopBobAnimation(3); - _vm->_objectsManager.setBobAnimation(4); + } while (_vm->_objectsManager->getBobAnimDataIdx(3) != 18); + _vm->_objectsManager->stopBobAnimation(3); + _vm->_objectsManager->setBobAnimation(4); break; case 202: @@ -1795,30 +1795,30 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 203: - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setBobAnimation(4); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setBobAnimation(4); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(4) == 18) + if (_vm->_objectsManager->getBobAnimDataIdx(4) == 18) _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 18, 334, 0, false); - } while (_vm->_objectsManager.getBobAnimDataIdx(4) != 26); - _vm->_objectsManager.stopBobAnimation(4); - _vm->_objectsManager.animateSprite(0); + } while (_vm->_objectsManager->getBobAnimDataIdx(4) != 26); + _vm->_objectsManager->stopBobAnimation(4); + _vm->_objectsManager->animateSprite(0); break; case 204: { - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setBobAnimation(3); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setBobAnimation(3); _vm->_soundManager.loadWav("SOUND67.WAV", 1); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(3)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(3)) { case 10: if (!playFl) { _vm->_soundManager.playWav(1); @@ -1830,24 +1830,24 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(3) == 50) + if (_vm->_objectsManager->getBobAnimDataIdx(3) == 50) break; } - _vm->_objectsManager.stopBobAnimation(3); - _vm->_objectsManager.animateSprite(0); + _vm->_objectsManager->stopBobAnimation(3); + _vm->_objectsManager->animateSprite(0); break; } case 205: { - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setBobAnimation(4); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setBobAnimation(4); _vm->_soundManager.loadWav("SOUND69.WAV", 1); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager.getBobAnimDataIdx(4)) { + switch (_vm->_objectsManager->getBobAnimDataIdx(4)) { case 10: if (!playFl) { _vm->_soundManager.playWav(1); @@ -1859,11 +1859,11 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(4) == 24) + if (_vm->_objectsManager->getBobAnimDataIdx(4) == 24) break; } - _vm->_objectsManager.stopBobAnimation(4); - _vm->_objectsManager.animateSprite(0); + _vm->_objectsManager->stopBobAnimation(4); + _vm->_objectsManager->animateSprite(0); break; } @@ -1880,58 +1880,58 @@ int ScriptManager::handleOpcode(byte *dataP) { } _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 = _vm->_linesManager->PARCOURS2(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 330, 418); _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager._zoneNum = 0; + _vm->_objectsManager->_zoneNum = 0; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager.GOHOME(); + _vm->_objectsManager->GOHOME(); _vm->_eventsManager->refreshScreenAndEvents(); } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL); - _vm->_objectsManager.setSpriteIndex(0, 64); + _vm->_objectsManager->setSpriteIndex(0, 64); _vm->_globals->_exitId = _vm->_globals->_saveData->_data[svField401]; _vm->_globals->_disableInventFl = false; break; } case 209: { - _vm->_objectsManager.setBobAnimDataIdx(1, 0); - _vm->_objectsManager.setBobAnimDataIdx(2, 0); - _vm->_objectsManager.setSpriteIndex(0, 60); - _vm->_objectsManager.stopBobAnimation(4); - _vm->_objectsManager.setBobAnimation(1); + _vm->_objectsManager->setBobAnimDataIdx(1, 0); + _vm->_objectsManager->setBobAnimDataIdx(2, 0); + _vm->_objectsManager->setSpriteIndex(0, 60); + _vm->_objectsManager->stopBobAnimation(4); + _vm->_objectsManager->setBobAnimation(1); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(1) != 9); - _vm->_objectsManager.stopBobAnimation(1); + } while (_vm->_objectsManager->getBobAnimDataIdx(1) != 9); + _vm->_objectsManager->stopBobAnimation(1); _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->_objectsManager._zoneNum = 0; + _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 { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager.GOHOME(); + _vm->_objectsManager->GOHOME(); _vm->_eventsManager->refreshScreenAndEvents(); } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL); - _vm->_objectsManager.setSpriteIndex(0, 64); - _vm->_objectsManager.setBobAnimation(2); + _vm->_objectsManager->setSpriteIndex(0, 64); + _vm->_objectsManager->setBobAnimation(2); _vm->_soundManager.playSoundFile("SOUND66.WAV"); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(2) != 10); - _vm->_objectsManager.stopBobAnimation(2); - _vm->_objectsManager.setBobAnimation(4); + } while (_vm->_objectsManager->getBobAnimDataIdx(2) != 10); + _vm->_objectsManager->stopBobAnimation(2); + _vm->_objectsManager->setBobAnimation(4); break; } @@ -1941,10 +1941,10 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_animationManager->playSequence2("SECRET1.SEQ", 1, 12, 1); _vm->_soundManager._specialSoundNum = 0; _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 192, 152, 0); - _vm->_objectsManager.setBobAnimation(9); - _vm->_objectsManager.OBSSEUL = true; - _vm->_objectsManager.loadLinkFile("IM73a"); - _vm->_objectsManager.OBSSEUL = false; + _vm->_objectsManager->setBobAnimation(9); + _vm->_objectsManager->OBSSEUL = true; + _vm->_objectsManager->loadLinkFile("IM73a"); + _vm->_objectsManager->OBSSEUL = false; _vm->_globals->enableHiding(); _vm->_animationManager->NO_SEQ = false; _vm->_globals->setHidingUseCount(0); @@ -1956,7 +1956,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 211: - _vm->_objectsManager.removeSprite(0); + _vm->_objectsManager->removeSprite(0); _vm->_globals->disableHiding(); _vm->_animationManager->NO_SEQ = true; _vm->_soundManager._specialSoundNum = 211; @@ -1999,60 +1999,60 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 230: { - _vm->_objectsManager.OBSSEUL = true; - _vm->_objectsManager.loadLinkFile("IM93a"); - _vm->_objectsManager.OBSSEUL = false; + _vm->_objectsManager->OBSSEUL = true; + _vm->_objectsManager->loadLinkFile("IM93a"); + _vm->_objectsManager->OBSSEUL = false; _vm->_globals->enableHiding(); _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager._oldCharacterPosX = _vm->_objectsManager.getSpriteX(0); + _vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0); _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 = _vm->_linesManager->PARCOURS2(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 488, 280); _vm->_globals->_checkDistanceFl = true; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager.GOHOME(); + _vm->_objectsManager->GOHOME(); _vm->_eventsManager->refreshScreenAndEvents(); } while (_vm->_linesManager->_route != (RouteItem *)g_PTRNUL); - _vm->_objectsManager.removeSprite(0); + _vm->_objectsManager->removeSprite(0); bool playFl = false; - _vm->_objectsManager.setBobAnimation(7); + _vm->_objectsManager->setBobAnimation(7); do { if (_vm->shouldQuit()) return -1; // Exiting game - if (_vm->_objectsManager.getBobAnimDataIdx(7) == 9 && !playFl) { + if (_vm->_objectsManager->getBobAnimDataIdx(7) == 9 && !playFl) { playFl = true; _vm->_soundManager.playSoundFile("SOUND81.WAV"); } _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(7) != 15); - _vm->_objectsManager.stopBobAnimation(7); - _vm->_objectsManager.setSpriteX(0, 476); - _vm->_objectsManager.setSpriteY(0, 278); - _vm->_objectsManager.animateSprite(0); + } while (_vm->_objectsManager->getBobAnimDataIdx(7) != 15); + _vm->_objectsManager->stopBobAnimation(7); + _vm->_objectsManager->setSpriteX(0, 476); + _vm->_objectsManager->setSpriteY(0, 278); + _vm->_objectsManager->animateSprite(0); _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 337, 154, 3); - _vm->_objectsManager.OBSSEUL = true; - _vm->_objectsManager.loadLinkFile("IM93c"); - _vm->_objectsManager.OBSSEUL = false; + _vm->_objectsManager->OBSSEUL = true; + _vm->_objectsManager->loadLinkFile("IM93c"); + _vm->_objectsManager->OBSSEUL = false; _vm->_globals->enableHiding(); break; } case 231: _vm->_globals->disableHiding(); - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setBobAnimation(12); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setBobAnimation(12); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(12) != 6); + } while (_vm->_objectsManager->getBobAnimDataIdx(12) != 6); _vm->_globals->_introSpeechOffFl = true; _vm->_talkManager.startAnimatedCharacterDialogue("PRMORT.pe2"); _vm->_globals->_introSpeechOffFl = false; @@ -2061,39 +2061,39 @@ int ScriptManager::handleOpcode(byte *dataP) { return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(12) != 12); - _vm->_objectsManager.animateSprite(0); - _vm->_objectsManager.stopBobAnimation(12); + } while (_vm->_objectsManager->getBobAnimDataIdx(12) != 12); + _vm->_objectsManager->animateSprite(0); + _vm->_objectsManager->stopBobAnimation(12); _vm->_globals->enableHiding(); break; case 233: { _vm->_globals->disableHiding(); - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.setBobAnimation(11); + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->setBobAnimation(11); bool playFl = false; do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(11) == 10 && !playFl) + if (_vm->_objectsManager->getBobAnimDataIdx(11) == 10 && !playFl) playFl = true; - } while (_vm->_objectsManager.getBobAnimDataIdx(11) != 13); - _vm->_objectsManager.stopBobAnimation(11); + } while (_vm->_objectsManager->getBobAnimDataIdx(11) != 13); + _vm->_objectsManager->stopBobAnimation(11); _vm->_globals->enableHiding(); - _vm->_objectsManager.setBobAnimation(13); + _vm->_objectsManager->setBobAnimation(13); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager.getBobAnimDataIdx(13) != 48); + } while (_vm->_objectsManager->getBobAnimDataIdx(13) != 48); _vm->_globals->_introSpeechOffFl = true; _vm->_talkManager.startAnimatedCharacterDialogue("HRADIO.PE2"); _vm->_globals->_introSpeechOffFl = false; _vm->_graphicsManager->fadeOutLong(); - _vm->_objectsManager.stopBobAnimation(13); + _vm->_objectsManager->stopBobAnimation(13); _vm->_graphicsManager->_noFadingFl = true; _vm->_globals->_exitId = 94; break; @@ -2109,7 +2109,7 @@ int ScriptManager::handleOpcode(byte *dataP) { else if (v47 == 1) vbobFrameIndex = 6; _vm->_soundManager.playSoundFile("SOUND83.WAV"); - _vm->_objectsManager.OPTI_ONE(vbobFrameIndex, 26, 50, 0); + _vm->_objectsManager->OPTI_ONE(vbobFrameIndex, 26, 50, 0); if (_vm->_globals->_saveData->_data[svField341] == 1) _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 27, 117, 0); if (_vm->_globals->_saveData->_data[svField341] == 2) @@ -2124,7 +2124,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals->_saveData->_data[svField340] = 0; } _vm->_soundManager.playSoundFile("SOUND83.WAV"); - _vm->_objectsManager.OPTI_ONE(6, 0, 23, 0); + _vm->_objectsManager->OPTI_ONE(6, 0, 23, 0); _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 27, 117, 1); break; } @@ -2144,7 +2144,7 @@ int ScriptManager::handleOpcode(byte *dataP) { if (_vm->_globals->_saveData->_data[svField341]) { _vm->_soundManager.playSoundFile("SOUND83.WAV"); - _vm->_objectsManager.OPTI_ONE(vbobFrameIndex, 26, 50, 0); + _vm->_objectsManager->OPTI_ONE(vbobFrameIndex, 26, 50, 0); switch (_vm->_globals->_saveData->_data[svField341]) { case 1: @@ -2163,7 +2163,7 @@ int ScriptManager::handleOpcode(byte *dataP) { } _vm->_soundManager.playSoundFile("SOUND83.WAV"); - _vm->_objectsManager.OPTI_ONE(5, 0, 23, 0); + _vm->_objectsManager->OPTI_ONE(5, 0, 23, 0); _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 145, 166, 3); break; } @@ -2183,7 +2183,7 @@ int ScriptManager::handleOpcode(byte *dataP) { if (_vm->_globals->_saveData->_data[svField341]) { _vm->_soundManager.playSoundFile("SOUND83.WAV"); - _vm->_objectsManager.OPTI_ONE(vbobFrameIndex, 26, 50, 0); + _vm->_objectsManager->OPTI_ONE(vbobFrameIndex, 26, 50, 0); switch (_vm->_globals->_saveData->_data[svField341]) { case 1: _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 27, 117, 0); @@ -2200,40 +2200,40 @@ int ScriptManager::handleOpcode(byte *dataP) { } } _vm->_soundManager.playSoundFile("SOUND83.WAV"); - _vm->_objectsManager.OPTI_ONE(4, 0, 23, 0); + _vm->_objectsManager->OPTI_ONE(4, 0, 23, 0); _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 296, 212, 5); break; } case 239: - _vm->_objectsManager.removeSprite(0); + _vm->_objectsManager->removeSprite(0); _vm->_soundManager.playSoundFile("SOUND84.WAV"); - _vm->_objectsManager.OPTI_ONE(16, 0, 10, 0); + _vm->_objectsManager->OPTI_ONE(16, 0, 10, 0); break; case 240: { - _vm->_objectsManager.setBobAnimation(1); + _vm->_objectsManager->setBobAnimation(1); bool soundFlag = false; do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager.getBobAnimDataIdx(1) == 12 && !soundFlag) { + if (_vm->_objectsManager->getBobAnimDataIdx(1) == 12 && !soundFlag) { _vm->_soundManager.playSoundFile("SOUND86.WAV"); soundFlag = true; } - if (_vm->_objectsManager.getBobAnimDataIdx(1) == 13) + if (_vm->_objectsManager->getBobAnimDataIdx(1) == 13) soundFlag = false; - if (_vm->_objectsManager.getBobAnimDataIdx(1) == 25 && !soundFlag) { + if (_vm->_objectsManager->getBobAnimDataIdx(1) == 25 && !soundFlag) { _vm->_soundManager.playSoundFile("SOUND85.WAV"); soundFlag = true; } - if (_vm->_objectsManager.getBobAnimDataIdx(1) == 25) + if (_vm->_objectsManager->getBobAnimDataIdx(1) == 25) soundFlag = false; - } while (_vm->_objectsManager.getBobAnimDataIdx(1) != 32); - _vm->_objectsManager.stopBobAnimation(1); - _vm->_objectsManager.setBobAnimation(2); + } while (_vm->_objectsManager->getBobAnimDataIdx(1) != 32); + _vm->_objectsManager->stopBobAnimation(1); + _vm->_objectsManager->setBobAnimation(2); _vm->_fontManager->hideText(9); bool displayedTxtFl = false; if (!_vm->_soundManager._textOffFl) { @@ -2250,8 +2250,8 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_eventsManager->refreshScreenAndEvents(); } CharacterLocation *realHopkins = &_vm->_globals->_saveData->_realHopkins; - realHopkins->_pos.x = _vm->_objectsManager.getSpriteX(0); - realHopkins->_pos.y = _vm->_objectsManager.getSpriteY(0); + realHopkins->_pos.x = _vm->_objectsManager->getSpriteX(0); + realHopkins->_pos.y = _vm->_objectsManager->getSpriteY(0); realHopkins->_startSpriteIndex = 57; realHopkins->_location = 97; _vm->_globals->_saveData->_data[svHopkinsCloneFl] = 1; @@ -2283,10 +2283,10 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals->_saveData->_data[svField354] = 0; _vm->_globals->_saveData->_data[svField356] = 0; _vm->_globals->_saveData->_data[svField355] = 1; - _vm->_objectsManager._twoCharactersFl = true; + _vm->_objectsManager->_twoCharactersFl = true; _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 373, 191, 3); - _vm->_objectsManager.addStaticSprite(_vm->_objectsManager._headSprites, samantha->_pos, 1, 3, samantha->_zoomFactor, false, 20, 127); - _vm->_objectsManager.animateSprite(1); + _vm->_objectsManager->addStaticSprite(_vm->_objectsManager->_headSprites, samantha->_pos, 1, 3, samantha->_zoomFactor, false, 20, 127); + _vm->_objectsManager->animateSprite(1); break; } @@ -2297,30 +2297,30 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_animationManager->playSequence("RESU.SEQ", 2, 24, 2); _vm->_animationManager->NO_SEQ = false; } else { - _vm->_objectsManager.OPTI_ONE(7, 0, 14, 0); + _vm->_objectsManager->OPTI_ONE(7, 0, 14, 0); } break; case 245: _vm->_soundManager.playSoundFile("SOUND89.WAV"); - _vm->_objectsManager.OPTI_ONE(5, 0, 6, 0); + _vm->_objectsManager->OPTI_ONE(5, 0, 6, 0); _vm->_linesManager->ZONEP[4]._destX = 276; - _vm->_objectsManager.enableVerb(4, 19); + _vm->_objectsManager->enableVerb(4, 19); _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 285, 379, 0); _vm->_globals->_saveData->_data[svField399] = 1; break; case 246: - _vm->_objectsManager.removeSprite(0); - _vm->_objectsManager.OPTI_ONE(6, 0, 15, 0); - _vm->_objectsManager.PERSO_ON = true; + _vm->_objectsManager->removeSprite(0); + _vm->_objectsManager->OPTI_ONE(6, 0, 15, 0); + _vm->_objectsManager->PERSO_ON = true; _vm->_graphicsManager->NB_SCREEN(true); _vm->_animationManager->NO_SEQ = true; _vm->_animationManager->playSequence2("TUNNEL.SEQ", 1, 18, 20); _vm->_animationManager->NO_SEQ = false; _vm->_graphicsManager->_noFadingFl = true; _vm->_graphicsManager->fadeOutLong(); - _vm->_objectsManager.PERSO_ON = false; + _vm->_objectsManager->PERSO_ON = false; _vm->_globals->_exitId = 100; break; @@ -2341,17 +2341,17 @@ int ScriptManager::handleOpcode(byte *dataP) { case 601: _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); - _vm->_objectsManager.OPTI_ONE(2, 0, 16, 4); + _vm->_objectsManager->OPTI_ONE(2, 0, 16, 4); break; case 602: _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); - _vm->_objectsManager.OPTI_ONE(4, 0, 16, 4); + _vm->_objectsManager->OPTI_ONE(4, 0, 16, 4); break; case 603: _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); - _vm->_objectsManager.OPTI_ONE(3, 0, 16, 4); + _vm->_objectsManager->OPTI_ONE(3, 0, 16, 4); _vm->_soundManager._specialSoundNum = 199; _vm->_graphicsManager->FADE_LINUX = 2; _vm->_animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); @@ -2363,7 +2363,7 @@ int ScriptManager::handleOpcode(byte *dataP) { case 604: _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); - _vm->_objectsManager.OPTI_ONE(1, 0, 16, 4); + _vm->_objectsManager->OPTI_ONE(1, 0, 16, 4); _vm->_soundManager._specialSoundNum = 199; _vm->_animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); _vm->_soundManager._specialSoundNum = 0; @@ -2374,7 +2374,7 @@ int ScriptManager::handleOpcode(byte *dataP) { case 605: _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); - _vm->_objectsManager.OPTI_ONE(5, 0, 16, 4); + _vm->_objectsManager->OPTI_ONE(5, 0, 16, 4); _vm->_graphicsManager->fadeOutShort(); _vm->_soundManager._specialSoundNum = 199; _vm->_graphicsManager->FADE_LINUX = 2; @@ -2387,7 +2387,7 @@ int ScriptManager::handleOpcode(byte *dataP) { case 606: _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); - _vm->_objectsManager.OPTI_ONE(6, 0, 16, 4); + _vm->_objectsManager->OPTI_ONE(6, 0, 16, 4); if ((_vm->getPlatform() != Common::kPlatformWindows) || !_vm->getIsDemo()) { _vm->_animationManager->playAnim("BOMBE3A.ANM", 50, 14, 500); memset(_vm->_graphicsManager->_vesaBuffer, 0, 614400); @@ -2405,39 +2405,39 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 608: - _vm->_objectsManager.stopBobAnimation(2); - _vm->_objectsManager.stopBobAnimation(3); - _vm->_objectsManager.stopBobAnimation(4); - _vm->_objectsManager.stopBobAnimation(6); - _vm->_objectsManager.stopBobAnimation(11); - _vm->_objectsManager.stopBobAnimation(10); + _vm->_objectsManager->stopBobAnimation(2); + _vm->_objectsManager->stopBobAnimation(3); + _vm->_objectsManager->stopBobAnimation(4); + _vm->_objectsManager->stopBobAnimation(6); + _vm->_objectsManager->stopBobAnimation(11); + _vm->_objectsManager->stopBobAnimation(10); break; case 609: - _vm->_objectsManager.setBobAnimation(2); - _vm->_objectsManager.setBobAnimation(3); - _vm->_objectsManager.setBobAnimation(4); - _vm->_objectsManager.setBobAnimation(6); - _vm->_objectsManager.setBobAnimation(11); - _vm->_objectsManager.setBobAnimation(10); + _vm->_objectsManager->setBobAnimation(2); + _vm->_objectsManager->setBobAnimation(3); + _vm->_objectsManager->setBobAnimation(4); + _vm->_objectsManager->setBobAnimation(6); + _vm->_objectsManager->setBobAnimation(11); + _vm->_objectsManager->setBobAnimation(10); break; case 610: - _vm->_objectsManager.stopBobAnimation(5); - _vm->_objectsManager.stopBobAnimation(7); - _vm->_objectsManager.stopBobAnimation(8); - _vm->_objectsManager.stopBobAnimation(9); - _vm->_objectsManager.stopBobAnimation(12); - _vm->_objectsManager.stopBobAnimation(13); + _vm->_objectsManager->stopBobAnimation(5); + _vm->_objectsManager->stopBobAnimation(7); + _vm->_objectsManager->stopBobAnimation(8); + _vm->_objectsManager->stopBobAnimation(9); + _vm->_objectsManager->stopBobAnimation(12); + _vm->_objectsManager->stopBobAnimation(13); break; case 611: - _vm->_objectsManager.setBobAnimation(5); - _vm->_objectsManager.setBobAnimation(7); - _vm->_objectsManager.setBobAnimation(8); - _vm->_objectsManager.setBobAnimation(9); - _vm->_objectsManager.setBobAnimation(12); - _vm->_objectsManager.setBobAnimation(13); + _vm->_objectsManager->setBobAnimation(5); + _vm->_objectsManager->setBobAnimation(7); + _vm->_objectsManager->setBobAnimation(8); + _vm->_objectsManager->setBobAnimation(9); + _vm->_objectsManager->setBobAnimation(12); + _vm->_objectsManager->setBobAnimation(13); break; } opcodeType = 1; @@ -2458,10 +2458,10 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case MKTAG24('B', 'O', 'S'): opcodeType = 1; - _vm->_objectsManager.setBobOffset(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); + _vm->_objectsManager->setBobOffset(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); break; case MKTAG24('V', 'O', 'N'): - _vm->_objectsManager.enableVerb(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); + _vm->_objectsManager->enableVerb(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); opcodeType = 1; break; case MKTAG24('Z', 'C', 'H'): @@ -2469,8 +2469,8 @@ int ScriptManager::handleOpcode(byte *dataP) { opcodeType = 1; break; case MKTAG24('J', 'U', 'M'): - _vm->_objectsManager._jumpZone = READ_LE_INT16(dataP + 5); - _vm->_objectsManager._jumpVerb = READ_LE_INT16(dataP + 7); + _vm->_objectsManager->_jumpZone = READ_LE_INT16(dataP + 5); + _vm->_objectsManager->_jumpVerb = READ_LE_INT16(dataP + 7); opcodeType = 6; break; case MKTAG24('S', 'O', 'U'): { @@ -2482,7 +2482,7 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } case MKTAG24('V', 'O', 'F'): - _vm->_objectsManager.disableVerb(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); + _vm->_objectsManager->disableVerb(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); opcodeType = 1; break; case MKTAG24('I', 'I', 'F'): diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 6b5047d131..a8a843684d 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -81,9 +81,9 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) _paletteBufferIdx = 20 * READ_LE_INT16((uint16 *)_characterBuffer + 42) + 110; _characterSprite = _vm->_fileManager->searchCat(spriteFilename, RES_SAN); if (_characterSprite) { - _characterSprite = _vm->_objectsManager.loadSprite(spriteFilename); + _characterSprite = _vm->_objectsManager->loadSprite(spriteFilename); } else { - _characterSprite = _vm->_objectsManager.loadSprite("RES_SAN.RES"); + _characterSprite = _vm->_objectsManager->loadSprite("RES_SAN.RES"); } if (_vm->_graphicsManager->_lineNbr == SCREEN_WIDTH) @@ -94,7 +94,7 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) if (!_vm->_graphicsManager->_lineNbr) _vm->_graphicsManager->_scrollOffset = 0; _vm->_graphicsManager->NB_SCREEN(true); - _vm->_objectsManager.PERSO_ON = true; + _vm->_objectsManager->PERSO_ON = true; searchCharacterPalette(_paletteBufferIdx, false); startCharacterAnim0(_paletteBufferIdx, false); initCharacterAnim(); @@ -132,7 +132,7 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); - _vm->_objectsManager.PERSO_ON = false; + _vm->_objectsManager->PERSO_ON = false; _vm->_eventsManager->_mouseCursorId = oldMouseCursorId; _vm->_eventsManager->changeMouseCursor(oldMouseCursorId); @@ -233,15 +233,15 @@ int TalkManager::dialogQuestion(bool animatedFl) { uint16 *bufPtr = (uint16 *)_characterBuffer + 48; int curVal = READ_LE_INT16(bufPtr); if (curVal != 0) - _vm->_objectsManager.setBobAnimation(curVal); + _vm->_objectsManager->setBobAnimation(curVal); if (curVal != 1) - _vm->_objectsManager.setBobAnimation(READ_LE_INT16(bufPtr + 1)); + _vm->_objectsManager->setBobAnimation(READ_LE_INT16(bufPtr + 1)); if (curVal != 2) - _vm->_objectsManager.setBobAnimation(READ_LE_INT16(bufPtr + 2)); + _vm->_objectsManager->setBobAnimation(READ_LE_INT16(bufPtr + 2)); if (curVal != 3) - _vm->_objectsManager.setBobAnimation(READ_LE_INT16(bufPtr + 3)); + _vm->_objectsManager->setBobAnimation(READ_LE_INT16(bufPtr + 3)); if (curVal != 4) - _vm->_objectsManager.setBobAnimation(READ_LE_INT16(bufPtr + 4)); + _vm->_objectsManager->setBobAnimation(READ_LE_INT16(bufPtr + 4)); } else { dialogWait(); } @@ -304,23 +304,23 @@ int TalkManager::dialogQuestion(bool animatedFl) { int curVal = READ_LE_INT16(bufPtr); if (curVal != 0) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 1); if (curVal != 1) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 2); if (curVal != 2) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 3); if (curVal != 3) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 4); if (curVal != 4) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); } else { dialogTalk(); } @@ -357,23 +357,23 @@ int TalkManager::dialogAnswer(int idx, bool animatedFl) { uint16 *bufPtr = (uint16 *)_characterBuffer + 43; int curVal = READ_LE_INT16(bufPtr); if (curVal) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 1); if (curVal) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 2); if (curVal) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 3); if (curVal) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 4); if (curVal) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); } else { VISU_PARLE(); } @@ -409,23 +409,23 @@ int TalkManager::dialogAnswer(int idx, bool animatedFl) { uint16 *bufPtr = (uint16 *)_characterBuffer + 43; int curVal = READ_LE_INT16(bufPtr); if (curVal) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 1); if (curVal) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 2); if (curVal) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 3); if (curVal) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 4); if (curVal) - _vm->_objectsManager.stopBobAnimation(curVal); + _vm->_objectsManager->stopBobAnimation(curVal); } else { dialogEndTalk(); } @@ -481,19 +481,19 @@ void TalkManager::dialogWait() { void TalkManager::dialogTalk() { for (int idx = 26; idx <= 30; ++idx) { if (_vm->_globals->_animBqe[idx]._enabledFl) - _vm->_objectsManager.hideBob(idx); + _vm->_objectsManager->hideBob(idx); } for (int idx = 26; idx <= 30; ++idx) { if (_vm->_globals->_animBqe[idx]._enabledFl) - _vm->_objectsManager.resetBob(idx); + _vm->_objectsManager->resetBob(idx); } } void TalkManager::dialogEndTalk() { for (int idx = 21; idx <= 25; ++idx) { if (_vm->_globals->_animBqe[idx]._enabledFl) - _vm->_objectsManager.hideBob(idx); + _vm->_objectsManager->hideBob(idx); } _vm->_eventsManager->refreshScreenAndEvents(); @@ -501,7 +501,7 @@ void TalkManager::dialogEndTalk() { for (int idx = 21; idx <= 25; ++idx) { if (_vm->_globals->_animBqe[idx]._enabledFl) - _vm->_objectsManager.resetBob(idx); + _vm->_objectsManager->resetBob(idx); } } @@ -601,24 +601,24 @@ void TalkManager::VISU_PARLE() { } void TalkManager::BOB_VISU_PARLE(int idx) { - _vm->_objectsManager._priorityFl = true; - if (!_vm->_objectsManager._bob[idx]._bobMode) { - _vm->_objectsManager.resetBob(idx); + _vm->_objectsManager->_priorityFl = true; + if (!_vm->_objectsManager->_bob[idx]._bobMode) { + _vm->_objectsManager->resetBob(idx); byte *bqeData = _vm->_globals->_animBqe[idx]._data; int newMode = READ_LE_INT16(bqeData + 2); if (!newMode) newMode = 1; if (READ_LE_INT16(bqeData + 24)) { - _vm->_objectsManager._bob[idx]._isSpriteFl = true; - _vm->_objectsManager._bob[idx]._zoomFactor = 0; - _vm->_objectsManager._bob[idx]._flipFl = false; - _vm->_objectsManager._bob[idx]._animData = _vm->_globals->_animBqe[idx]._data; - _vm->_objectsManager._bob[idx]._bobMode = 10; + _vm->_objectsManager->_bob[idx]._isSpriteFl = true; + _vm->_objectsManager->_bob[idx]._zoomFactor = 0; + _vm->_objectsManager->_bob[idx]._flipFl = false; + _vm->_objectsManager->_bob[idx]._animData = _vm->_globals->_animBqe[idx]._data; + _vm->_objectsManager->_bob[idx]._bobMode = 10; bqeData = _characterSprite; - _vm->_objectsManager._bob[idx]._spriteData = _characterSprite; - _vm->_objectsManager._bob[idx]._bobModeChange = newMode; - _vm->_objectsManager._bob[idx].field20 = -1; - _vm->_objectsManager._bob[idx].field22 = 0; + _vm->_objectsManager->_bob[idx]._spriteData = _characterSprite; + _vm->_objectsManager->_bob[idx]._bobModeChange = newMode; + _vm->_objectsManager->_bob[idx].field20 = -1; + _vm->_objectsManager->_bob[idx].field22 = 0; } } } @@ -848,8 +848,8 @@ void TalkManager::REPONSE(int zone, int verb) { else if (opcodeType == 6) { // JUMP _vm->_globals->freeMemory(ptr); - zoneObj = _vm->_objectsManager._jumpZone; - verbObj = _vm->_objectsManager._jumpVerb; + zoneObj = _vm->_objectsManager->_jumpZone; + verbObj = _vm->_objectsManager->_jumpVerb; outerLoopFl = true; break; } @@ -866,26 +866,26 @@ void TalkManager::REPONSE2(int zone, int verb) { return; if (zone == 22 || zone == 23) { - _vm->_objectsManager.setFlipSprite(0, false); - _vm->_objectsManager.setSpriteIndex(0, 62); - _vm->_objectsManager.SPACTION(_vm->_objectsManager._forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, false); + _vm->_objectsManager->setFlipSprite(0, false); + _vm->_objectsManager->setSpriteIndex(0, 62); + _vm->_objectsManager->SPACTION(_vm->_objectsManager->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, false); if (zone == 22) { - _vm->_objectsManager.lockAnimX(6, _vm->_objectsManager.getBobPosX(3)); - _vm->_objectsManager.lockAnimX(8, _vm->_objectsManager.getBobPosX(3)); + _vm->_objectsManager->lockAnimX(6, _vm->_objectsManager->getBobPosX(3)); + _vm->_objectsManager->lockAnimX(8, _vm->_objectsManager->getBobPosX(3)); } else { // zone == 23 - _vm->_objectsManager.lockAnimX(6, _vm->_objectsManager.getBobPosX(4)); - _vm->_objectsManager.lockAnimX(8, _vm->_objectsManager.getBobPosX(4)); + _vm->_objectsManager->lockAnimX(6, _vm->_objectsManager->getBobPosX(4)); + _vm->_objectsManager->lockAnimX(8, _vm->_objectsManager->getBobPosX(4)); } - _vm->_objectsManager.stopBobAnimation(3); - _vm->_objectsManager.stopBobAnimation(4); - _vm->_objectsManager.setBobAnimation(6); + _vm->_objectsManager->stopBobAnimation(3); + _vm->_objectsManager->stopBobAnimation(4); + _vm->_objectsManager->setBobAnimation(6); _vm->_soundManager.playSample(1); - _vm->_objectsManager.SPACTION1(_vm->_objectsManager._forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); + _vm->_objectsManager->SPACTION1(_vm->_objectsManager->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); do _vm->_eventsManager->refreshScreenAndEvents(); - while (_vm->_objectsManager.getBobAnimDataIdx(6) < 12); - _vm->_objectsManager.stopBobAnimation(6); - _vm->_objectsManager.setBobAnimation(8); + while (_vm->_objectsManager->getBobAnimDataIdx(6) < 12); + _vm->_objectsManager->stopBobAnimation(6); + _vm->_objectsManager->setBobAnimation(8); switch (_vm->_globals->_screenId) { case 35: @@ -914,26 +914,26 @@ void TalkManager::REPONSE2(int zone, int verb) { _vm->_linesManager->disableZone(22); _vm->_linesManager->disableZone(23); } else if (zone == 20 || zone == 21) { - _vm->_objectsManager.setFlipSprite(0, true); - _vm->_objectsManager.setSpriteIndex(0, 62); - _vm->_objectsManager.SPACTION(_vm->_objectsManager._forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, true); + _vm->_objectsManager->setFlipSprite(0, true); + _vm->_objectsManager->setSpriteIndex(0, 62); + _vm->_objectsManager->SPACTION(_vm->_objectsManager->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, true); if (zone == 20) { - _vm->_objectsManager.lockAnimX(5, _vm->_objectsManager.getBobPosX(1)); - _vm->_objectsManager.lockAnimX(7, _vm->_objectsManager.getBobPosX(1)); + _vm->_objectsManager->lockAnimX(5, _vm->_objectsManager->getBobPosX(1)); + _vm->_objectsManager->lockAnimX(7, _vm->_objectsManager->getBobPosX(1)); } else { // zone == 21 - _vm->_objectsManager.lockAnimX(5, _vm->_objectsManager.getBobPosX(2)); - _vm->_objectsManager.lockAnimX(7, _vm->_objectsManager.getBobPosX(2)); + _vm->_objectsManager->lockAnimX(5, _vm->_objectsManager->getBobPosX(2)); + _vm->_objectsManager->lockAnimX(7, _vm->_objectsManager->getBobPosX(2)); } - _vm->_objectsManager.stopBobAnimation(1); - _vm->_objectsManager.stopBobAnimation(2); - _vm->_objectsManager.setBobAnimation(5); + _vm->_objectsManager->stopBobAnimation(1); + _vm->_objectsManager->stopBobAnimation(2); + _vm->_objectsManager->setBobAnimation(5); _vm->_soundManager.playSample(1); - _vm->_objectsManager.SPACTION1(_vm->_objectsManager._forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); + _vm->_objectsManager->SPACTION1(_vm->_objectsManager->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); do _vm->_eventsManager->refreshScreenAndEvents(); - while (_vm->_objectsManager.getBobAnimDataIdx(5) < 12); - _vm->_objectsManager.stopBobAnimation(5); - _vm->_objectsManager.setBobAnimation(7); + while (_vm->_objectsManager->getBobAnimDataIdx(5) < 12); + _vm->_objectsManager->stopBobAnimation(5); + _vm->_objectsManager->setBobAnimation(7); switch (_vm->_globals->_screenId) { case 35: indx = 200; @@ -975,7 +975,7 @@ void TalkManager::animateObject(const Common::String &filename) { for (int i = 0; i <= 44; i++) _vm->_linesManager->BOBZONE[i] = 0; - _vm->_objectsManager._zoneNum = -1; + _vm->_objectsManager->_zoneNum = -1; _vm->_eventsManager->_mouseCursorId = 4; _vm->_eventsManager->changeMouseCursor(0); _characterBuffer = _vm->_fileManager->searchCat(filename, RES_PER); @@ -996,9 +996,9 @@ void TalkManager::animateObject(const Common::String &filename) { _characterSprite = _vm->_fileManager->searchCat(spriteFilename, RES_SAN); if (_characterSprite) - _characterSprite = _vm->_objectsManager.loadSprite(spriteFilename); + _characterSprite = _vm->_objectsManager->loadSprite(spriteFilename); else - _characterSprite = _vm->_objectsManager.loadSprite("RES_SAN.RES"); + _characterSprite = _vm->_objectsManager->loadSprite("RES_SAN.RES"); if (_vm->_graphicsManager->_lineNbr == SCREEN_WIDTH) _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 307200); @@ -1010,33 +1010,33 @@ void TalkManager::animateObject(const Common::String &filename) { _vm->_graphicsManager->NB_SCREEN(true); _paletteBufferIdx = 20 * READ_LE_INT16((uint16 *)_characterBuffer + 42) + 110; _vm->_graphicsManager->NB_SCREEN(true); - _vm->_objectsManager.PERSO_ON = true; + _vm->_objectsManager->PERSO_ON = true; searchCharacterPalette(_paletteBufferIdx, true); startCharacterAnim0(_paletteBufferIdx, false); byte *oldAnswerBufferPtr = _vm->_globals->_answerBuffer; _vm->_globals->_answerBuffer = g_PTRNUL; _vm->_globals->_freezeCharacterFl = true; - _vm->_objectsManager.loadLinkFile(screenFilename); - _vm->_objectsManager.PERSO_ON = true; + _vm->_objectsManager->loadLinkFile(screenFilename); + _vm->_objectsManager->PERSO_ON = true; _vm->_globals->_actionMoveTo = false; - _vm->_objectsManager._zoneNum = -1; + _vm->_objectsManager->_zoneNum = -1; initCharacterAnim(); VISU_PARLE(); dialogWait(); _vm->_graphicsManager->initScreen(screenFilename, 2, true); _vm->_globals->_freezeCharacterFl = true; - _vm->_objectsManager._forceZoneFl = true; - _vm->_objectsManager._zoneNum = -1; + _vm->_objectsManager->_forceZoneFl = true; + _vm->_objectsManager->_zoneNum = -1; do { int mouseButton = _vm->_eventsManager->getMouseButton(); if (mouseButton == 1) - _vm->_objectsManager.handleLeftButton(); + _vm->_objectsManager->handleLeftButton(); else if (mouseButton == 2) - _vm->_objectsManager.handleRightButton(); + _vm->_objectsManager->handleRightButton(); _vm->_linesManager->checkZone(); if (_vm->_globals->_actionMoveTo) - _vm->_objectsManager.PARADISE(); + _vm->_objectsManager->PARADISE(); _vm->_eventsManager->refreshScreenAndEvents(); } while (!_vm->_globals->_exitId); dialogEndTalk(); @@ -1055,10 +1055,10 @@ void TalkManager::animateObject(const Common::String &filename) { _vm->_globals->freeMemory(_vm->_globals->_answerBuffer); _vm->_globals->_answerBuffer = oldAnswerBufferPtr; - _vm->_objectsManager._disableFl = true; - _vm->_objectsManager.loadLinkFile(curScreenFilename); + _vm->_objectsManager->_disableFl = true; + _vm->_objectsManager->loadLinkFile(curScreenFilename); _vm->_graphicsManager->initScreen(curScreenFilename, 2, true); - _vm->_objectsManager._disableFl = false; + _vm->_objectsManager->_disableFl = false; _vm->_globals->_freezeCharacterFl = false; if (_vm->_globals->_exitId == 101) _vm->_globals->_exitId = 0; @@ -1066,7 +1066,7 @@ void TalkManager::animateObject(const Common::String &filename) { _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); - _vm->_objectsManager.PERSO_ON = false; + _vm->_objectsManager->PERSO_ON = false; _vm->_eventsManager->_mouseCursorId = 4; _vm->_eventsManager->changeMouseCursor(4); _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); |