diff options
Diffstat (limited to 'engines/hopkins/hopkins.cpp')
-rw-r--r-- | engines/hopkins/hopkins.cpp | 2134 |
1 files changed, 1067 insertions, 1067 deletions
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 368b3fc9e8..67ed52b629 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -40,43 +40,43 @@ HopkinsEngine *g_vm; HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc), _randomSource("Hopkins") { g_vm = this; - _animationManager = new AnimationManager(this); - _computerManager = new ComputerManager(this); - _dialogsManager = new DialogsManager(this); - _debugger = new Debugger(this); - _eventsManager = new EventsManager(this); - _fileManager = new FileManager(this); - _fontManager = new FontManager(this); + _animMan = new AnimationManager(this); + _computer = new ComputerManager(this); + _dialog = new DialogsManager(this); + _debug = new Debugger(this); + _events = new EventsManager(this); + _fileIO = new FileManager(this); + _fontMan = new FontManager(this); _globals = new Globals(this); - _graphicsManager = new GraphicsManager(this); - _linesManager = new LinesManager(this); - _menuManager = new MenuManager(this); - _objectsManager = new ObjectsManager(this); - _saveLoadManager = new SaveLoadManager(this); - _scriptManager = new ScriptManager(this); - _soundManager = new SoundManager(this); - _talkManager = new TalkManager(this); + _graphicsMan = new GraphicsManager(this); + _linesMan = new LinesManager(this); + _menuMan = new MenuManager(this); + _objectsMan = new ObjectsManager(this); + _saveLoad = new SaveLoadManager(this); + _script = new ScriptManager(this); + _soundMan = new SoundManager(this); + _talkMan = new TalkManager(this); _startGameSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1; } HopkinsEngine::~HopkinsEngine() { - delete _talkManager; - delete _soundManager; - delete _scriptManager; - delete _saveLoadManager; - delete _objectsManager; - delete _menuManager; - delete _linesManager; - delete _graphicsManager; + delete _talkMan; + delete _soundMan; + delete _script; + delete _saveLoad; + delete _objectsMan; + delete _menuMan; + delete _linesMan; + delete _graphicsMan; delete _globals; - delete _fontManager; - delete _fileManager; - delete _eventsManager; - delete _debugger; - delete _dialogsManager; - delete _computerManager; - delete _animationManager; + delete _fontMan; + delete _fileIO; + delete _events; + delete _debug; + delete _dialog; + delete _computer; + delete _animMan; } Common::String HopkinsEngine::generateSaveName(int slot) { @@ -87,35 +87,35 @@ Common::String HopkinsEngine::generateSaveName(int slot) { * Returns true if it is currently okay to restore a game */ bool HopkinsEngine::canLoadGameStateCurrently() { - return !_globals->_exitId && !_globals->_cityMapEnabledFl && _eventsManager->_mouseFl; + return !_globals->_exitId && !_globals->_cityMapEnabledFl && _events->_mouseFl; } /** * Returns true if it is currently okay to save the game */ bool HopkinsEngine::canSaveGameStateCurrently() { - return !_globals->_exitId && !_globals->_cityMapEnabledFl && _eventsManager->_mouseFl; + return !_globals->_exitId && !_globals->_cityMapEnabledFl && _events->_mouseFl; } /** * Load the savegame at the specified slot index */ Common::Error HopkinsEngine::loadGameState(int slot) { - return _saveLoadManager->loadGame(slot); + return _saveLoad->loadGame(slot); } /** * Save the game to the given slot index, and with the given name */ Common::Error HopkinsEngine::saveGameState(int slot, const Common::String &desc) { - return _saveLoadManager->saveGame(slot, desc); + return _saveLoad->saveGame(slot, desc); } Common::Error HopkinsEngine::run() { - _saveLoadManager->initSaves(); + _saveLoad->initSaves(); _globals->setConfig(); - _fileManager->initCensorship(); + _fileIO->initCensorship(); initializeSystem(); if (!getIsDemo()) @@ -133,54 +133,54 @@ Common::Error HopkinsEngine::run() { } bool HopkinsEngine::runWin95Demo() { - _objectsManager->loadObjects(); - _objectsManager->changeObject(14); - _objectsManager->addObject(14); - _objectsManager->_helicopterFl = false; + _objectsMan->loadObjects(); + _objectsMan->changeObject(14); + _objectsMan->addObject(14); + _objectsMan->_helicopterFl = false; _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); if (_startGameSlot == -1) { - _graphicsManager->loadImage("H2"); - _graphicsManager->fadeInLong(); + _graphicsMan->loadImage("H2"); + _graphicsMan->fadeInLong(); - if (!_eventsManager->_escKeyFl) + if (!_events->_escKeyFl) playIntro(); } - _eventsManager->_rateCounter = 0; + _events->_rateCounter = 0; _globals->_eventMode = EVENTMODE_IGNORE; _globals->_speed = 1; for (int i = 1; i < 50; i++) { - _graphicsManager->copySurface(_graphicsManager->_backBuffer, 0, 0, 640, 440, _graphicsManager->_frontBuffer, 0, 0); - _eventsManager->refreshScreenAndEvents(); + _graphicsMan->copySurface(_graphicsMan->_backBuffer, 0, 0, 640, 440, _graphicsMan->_frontBuffer, 0, 0); + _events->refreshScreenAndEvents(); } _globals->_eventMode = EVENTMODE_DEFAULT; - if (_eventsManager->_rateCounter > 475) + if (_events->_rateCounter > 475) _globals->_speed = 2; - if (_eventsManager->_rateCounter > 700) + if (_events->_rateCounter > 700) _globals->_speed = 3; if (_startGameSlot == -1) { - _graphicsManager->fadeOutLong(); + _graphicsMan->fadeOutLong(); _globals->_eventMode = EVENTMODE_IGNORE; - _globals->_characterSpriteBuf = _fileManager->loadFile("PERSO.SPR"); + _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR"); } _globals->_characterType = 0; - _objectsManager->_mapCarPosX = _objectsManager->_mapCarPosY = 0; + _objectsMan->_mapCarPosX = _objectsMan->_mapCarPosY = 0; memset(_globals->_saveData, 0, 2000); _globals->_exitId = 0; if (_startGameSlot != -1) - _saveLoadManager->loadGame(_startGameSlot); + _saveLoad->loadGame(_startGameSlot); if (getLanguage() != Common::PL_POL) if (!displayAdultDisclaimer()) @@ -191,7 +191,7 @@ bool HopkinsEngine::runWin95Demo() { _globals->_exitId = 0; if (!_globals->_exitId) { - _globals->_exitId = _menuManager->menu(); + _globals->_exitId = _menuMan->menu(); if (_globals->_exitId == -1) { _globals->_characterSpriteBuf = _globals->freeMemory(_globals->_characterSpriteBuf); restoreSystem(); @@ -206,120 +206,120 @@ bool HopkinsEngine::runWin95Demo() { switch (_globals->_exitId) { case 1: - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 2, true); + _objectsMan->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 2, true); break; case 3: if (!_globals->_saveData->_data[svBankAttackAnimPlayedFl]) { - _soundManager->playSound(3); + _soundMan->playSound(3); if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS) - _graphicsManager->loadImage("fond"); + _graphicsMan->loadImage("fond"); else { if (_globals->_language == LANG_FR) - _graphicsManager->loadImage("fondfr"); + _graphicsMan->loadImage("fondfr"); else if (_globals->_language == LANG_EN) - _graphicsManager->loadImage("fondan"); + _graphicsMan->loadImage("fondan"); else if (_globals->_language == LANG_SP) - _graphicsManager->loadImage("fondes"); + _graphicsMan->loadImage("fondes"); } - _graphicsManager->fadeInLong(); - _eventsManager->delay(500); - _graphicsManager->fadeOutLong(); + _graphicsMan->fadeInLong(); + _events->delay(500); + _graphicsMan->fadeOutLong(); _globals->_eventMode = EVENTMODE_IGNORE; - _soundManager->_specialSoundNum = 2; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); + _soundMan->_specialSoundNum = 2; + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); if (!_globals->_censorshipFl) - _animationManager->playAnim("BANQUE.ANM", 200, 28, 200); + _animMan->playAnim("BANQUE.ANM", 200, 28, 200); else - _animationManager->playAnim("BANKUK.ANM", 200, 28, 200); - _soundManager->_specialSoundNum = 0; - _soundManager->removeSample(1); - _soundManager->removeSample(2); - _soundManager->removeSample(3); - _soundManager->removeSample(4); - _graphicsManager->fadeOutLong(); + _animMan->playAnim("BANKUK.ANM", 200, 28, 200); + _soundMan->_specialSoundNum = 0; + _soundMan->removeSample(1); + _soundMan->removeSample(2); + _soundMan->removeSample(3); + _soundMan->removeSample(4); + _graphicsMan->fadeOutLong(); _globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1; } - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; - _objectsManager->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); + _objectsMan->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); break; case 4: _globals->_disableInventFl = true; - _objectsManager->handleCityMap(); + _objectsMan->handleCityMap(); _globals->_disableInventFl = false; break; case 5: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 455; if (_globals->_saveData->_data[svFreedHostageFl]) { if (_globals->_saveData->_data[svFreedHostageFl] == 1) - _objectsManager->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); + _objectsMan->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); } else { - _objectsManager->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); + _objectsMan->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); } break; case 6: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 460; - _objectsManager->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); + _objectsMan->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); break; case 7: if (_globals->_saveData->_data[svBombBoxOpenedFl]) - _objectsManager->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsMan->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); else - _objectsManager->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsMan->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); break; case 8: - _linesManager->setMaxLineIdx(15); + _linesMan->setMaxLineIdx(15); _globals->_characterMaxPosY = 450; - _objectsManager->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); + _objectsMan->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); break; case 9: _globals->_characterMaxPosY = 440; - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); if (_globals->_saveData->_data[svBombDisarmedFl]) - _objectsManager->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); + _objectsMan->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); else bombExplosion(); break; case 10: - _objectsManager->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); + _objectsMan->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); break; case 11: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 450; - _objectsManager->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); + _objectsMan->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); break; case 12: _globals->_characterMaxPosY = 450; - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); if (_globals->_saveData->_data[svBombDisarmedFl]) { if (_globals->_language == LANG_FR) - _graphicsManager->loadImage("ENDFR"); + _graphicsMan->loadImage("ENDFR"); else - _graphicsManager->loadImage("ENDUK"); - _graphicsManager->fadeInLong(); - _eventsManager->mouseOn(); + _graphicsMan->loadImage("ENDUK"); + _graphicsMan->fadeInLong(); + _events->mouseOn(); do - _eventsManager->refreshScreenAndEvents(); - while (_eventsManager->getMouseButton() != 1); - _graphicsManager->fadeOutLong(); + _events->refreshScreenAndEvents(); + while (_events->getMouseButton() != 1); + _graphicsMan->fadeOutLong(); restoreSystem(); } else bombExplosion(); @@ -351,11 +351,11 @@ bool HopkinsEngine::runWin95Demo() { break; case 111: - _objectsManager->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); + _objectsMan->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); break; case 112: - _objectsManager->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); + _objectsMan->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); break; case 113: @@ -364,15 +364,15 @@ bool HopkinsEngine::runWin95Demo() { _globals->_saveData->_data[svLastPrevScreenId] = _globals->_screenId; _globals->_screenId = 113; _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; - _computerManager->showComputer(COMPUTER_HOPKINS); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->updateScreen(); - memset(_graphicsManager->_frontBuffer, 0, 307200); - memset(_graphicsManager->_backBuffer, 0, 307200); - _graphicsManager->clearPalette(); - _graphicsManager->resetDirtyRects(); + _computer->showComputer(COMPUTER_HOPKINS); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->updateScreen(); + memset(_graphicsMan->_frontBuffer, 0, 307200); + memset(_graphicsMan->_backBuffer, 0, 307200); + _graphicsMan->clearPalette(); + _graphicsMan->resetDirtyRects(); break; case 114: @@ -381,10 +381,10 @@ bool HopkinsEngine::runWin95Demo() { _globals->_screenId = 114; _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; _globals->_exitId = 0; - _computerManager->showComputer(COMPUTER_SAMANTHA); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); + _computer->showComputer(COMPUTER_SAMANTHA); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); break; case 115: @@ -393,47 +393,47 @@ bool HopkinsEngine::runWin95Demo() { _globals->_saveData->_data[svLastPrevScreenId] = _globals->_screenId; _globals->_screenId = 115; _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; - _computerManager->showComputer(COMPUTER_PUBLIC); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); + _computer->showComputer(COMPUTER_PUBLIC); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); break; case 150: - _soundManager->playSound(28); + _soundMan->playSound(28); _globals->_eventMode = EVENTMODE_ALT; // CHECKME! - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _animationManager->playAnim("JOUR1A.anm", 12, 12, 2000); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _animMan->playAnim("JOUR1A.anm", 12, 12, 2000); _globals->_eventMode = EVENTMODE_DEFAULT; _globals->_exitId = 300; break; case 151: - _soundManager->playSound(28); + _soundMan->playSound(28); _globals->_eventMode = EVENTMODE_ALT; // CHECKME! - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _graphicsManager->loadImage("njour3a"); - _graphicsManager->fadeInLong(); - _eventsManager->delay(5000); - _graphicsManager->fadeOutLong(); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _graphicsMan->loadImage("njour3a"); + _graphicsMan->fadeInLong(); + _events->delay(5000); + _graphicsMan->fadeOutLong(); _globals->_exitId = 300; _globals->_eventMode = EVENTMODE_DEFAULT; break; case 152: - _soundManager->playSound(28); + _soundMan->playSound(28); _globals->_eventMode = EVENTMODE_ALT; // CHECKME! - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _animationManager->playAnim("JOUR4A.anm", 12, 12, 2000); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _animMan->playAnim("JOUR4A.anm", 12, 12, 2000); _globals->_eventMode = EVENTMODE_DEFAULT; _globals->_exitId = 300; break; @@ -443,48 +443,48 @@ bool HopkinsEngine::runWin95Demo() { } bool HopkinsEngine::runLinuxDemo() { - _objectsManager->loadObjects(); - _objectsManager->changeObject(14); - _objectsManager->addObject(14); - _objectsManager->_helicopterFl = false; + _objectsMan->loadObjects(); + _objectsMan->changeObject(14); + _objectsMan->addObject(14); + _objectsMan->_helicopterFl = false; - _eventsManager->mouseOff(); + _events->mouseOff(); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); if (_startGameSlot == -1) { - _graphicsManager->loadImage("LINUX"); - _graphicsManager->fadeInLong(); - _eventsManager->delay(1500); - _graphicsManager->fadeOutLong(); + _graphicsMan->loadImage("LINUX"); + _graphicsMan->fadeInLong(); + _events->delay(1500); + _graphicsMan->fadeOutLong(); - _graphicsManager->loadImage("H2"); - _graphicsManager->fadeInLong(); - _eventsManager->delay(500); - _graphicsManager->fadeOutLong(); + _graphicsMan->loadImage("H2"); + _graphicsMan->fadeInLong(); + _events->delay(500); + _graphicsMan->fadeOutLong(); - if (!_eventsManager->_escKeyFl) + if (!_events->_escKeyFl) playIntro(); } _globals->_eventMode = EVENTMODE_DEFAULT; - _globals->_characterSpriteBuf = _fileManager->loadFile("PERSO.SPR"); + _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR"); _globals->_characterType = 0; - _objectsManager->_mapCarPosX = _objectsManager->_mapCarPosY = 0; + _objectsMan->_mapCarPosX = _objectsMan->_mapCarPosY = 0; memset(_globals->_saveData, 0, 2000); _globals->_exitId = 0; if (_startGameSlot != -1) - _saveLoadManager->loadGame(_startGameSlot); + _saveLoad->loadGame(_startGameSlot); for (;;) { if (_globals->_exitId == 300) _globals->_exitId = 0; if (!_globals->_exitId) { - _globals->_exitId = _menuManager->menu(); + _globals->_exitId = _menuMan->menu(); if (_globals->_exitId == -1) { if (!shouldQuit()) endLinuxDemo(); @@ -518,156 +518,156 @@ bool HopkinsEngine::runLinuxDemo() { break; case 1: - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true); + _objectsMan->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true); break; case 3: if (!_globals->_saveData->_data[svBankAttackAnimPlayedFl]) { - _soundManager->playSound(3); + _soundMan->playSound(3); if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS) - _graphicsManager->loadImage("fond"); + _graphicsMan->loadImage("fond"); else { if (_globals->_language == LANG_FR) - _graphicsManager->loadImage("fondfr"); + _graphicsMan->loadImage("fondfr"); else if (_globals->_language == LANG_EN) - _graphicsManager->loadImage("fondan"); + _graphicsMan->loadImage("fondan"); else if (_globals->_language == LANG_SP) - _graphicsManager->loadImage("fondes"); + _graphicsMan->loadImage("fondes"); } - _graphicsManager->fadeInLong(); - _eventsManager->delay(500); - _graphicsManager->fadeOutLong(); + _graphicsMan->fadeInLong(); + _events->delay(500); + _graphicsMan->fadeOutLong(); _globals->_eventMode = EVENTMODE_IGNORE; - _soundManager->_specialSoundNum = 2; + _soundMan->_specialSoundNum = 2; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _graphicsManager->_fadingFl = true; + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _graphicsMan->_fadingFl = true; if (!_globals->_censorshipFl) - _animationManager->playAnim("BANQUE.ANM", 200, 28, 200); + _animMan->playAnim("BANQUE.ANM", 200, 28, 200); else - _animationManager->playAnim("BANKUK.ANM", 200, 28, 200); - _soundManager->_specialSoundNum = 0; - _soundManager->removeSample(1); - _soundManager->removeSample(2); - _soundManager->removeSample(3); - _soundManager->removeSample(4); + _animMan->playAnim("BANKUK.ANM", 200, 28, 200); + _soundMan->_specialSoundNum = 0; + _soundMan->removeSample(1); + _soundMan->removeSample(2); + _soundMan->removeSample(3); + _soundMan->removeSample(4); _globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1; } - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; - _objectsManager->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); + _objectsMan->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); break; case 4: _globals->_disableInventFl = true; - _objectsManager->handleCityMap(); + _objectsMan->handleCityMap(); _globals->_disableInventFl = false; break; case 5: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 455; if (_globals->_saveData->_data[svFreedHostageFl] == 1) - _objectsManager->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); + _objectsMan->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); else - _objectsManager->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); + _objectsMan->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); break; case 6: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 460; - _objectsManager->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); + _objectsMan->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); break; case 7: if (_globals->_saveData->_data[svBombBoxOpenedFl]) - _objectsManager->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsMan->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); else - _objectsManager->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsMan->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); break; case 8: - _linesManager->setMaxLineIdx(15); + _linesMan->setMaxLineIdx(15); _globals->_characterMaxPosY = 450; - _objectsManager->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); + _objectsMan->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); break; case 9: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 440; if (!_globals->_saveData->_data[svBombDisarmedFl]) bombExplosion(); else - _objectsManager->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); + _objectsMan->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); break; case 10: - _objectsManager->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); + _objectsMan->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); break; case 11: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 450; - _objectsManager->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); + _objectsMan->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); break; case 12: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 450; if (_globals->_saveData->_data[svBombDisarmedFl]) - _objectsManager->PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false); + _objectsMan->PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false); else bombExplosion(); break; case 13: - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true); + _objectsMan->PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true); break; case 14: - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true); + _objectsMan->PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true); break; case 15: - _objectsManager->PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 29, false); + _objectsMan->PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 29, false); break; case 16: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; if (_globals->_saveData->_data[svForestAvailableFl] == 1) { - _objectsManager->PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true); + _objectsMan->PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true); } else if (!_globals->_saveData->_data[svForestAvailableFl]) { - _objectsManager->PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true); + _objectsMan->PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true); } break; case 25: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 445; - _objectsManager->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true); + _objectsMan->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true); break; case 26: - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true); + _objectsMan->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true); case 33: - _objectsManager->PERSONAGE("IM33", "IM33", "ANIM33", "IM33", 8, false); + _objectsMan->PERSONAGE("IM33", "IM33", "ANIM33", "IM33", 8, false); break; case 35: @@ -675,11 +675,11 @@ bool HopkinsEngine::runLinuxDemo() { break; case 111: - _objectsManager->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); + _objectsMan->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); break; case 112: - _objectsManager->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); + _objectsMan->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); break; case 113: @@ -688,16 +688,16 @@ bool HopkinsEngine::runLinuxDemo() { _globals->_saveData->_data[svLastPrevScreenId] = _globals->_screenId; _globals->_screenId = 113; _globals->_saveData->_data[svLastScreenId] = 113; - _computerManager->showComputer(COMPUTER_HOPKINS); + _computer->showComputer(COMPUTER_HOPKINS); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->updateScreen(); - memset(_graphicsManager->_frontBuffer, 0, 307200); - memset(_graphicsManager->_backBuffer, 0, 307200); - _graphicsManager->clearPalette(); - _graphicsManager->resetDirtyRects(); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->updateScreen(); + memset(_graphicsMan->_frontBuffer, 0, 307200); + memset(_graphicsMan->_backBuffer, 0, 307200); + _graphicsMan->clearPalette(); + _graphicsMan->resetDirtyRects(); break; case 114: @@ -706,10 +706,10 @@ bool HopkinsEngine::runLinuxDemo() { _globals->_saveData->_data[svLastPrevScreenId] = _globals->_screenId; _globals->_screenId = 114; _globals->_saveData->_data[svLastScreenId] = 114; - _computerManager->showComputer(COMPUTER_SAMANTHA); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); + _computer->showComputer(COMPUTER_SAMANTHA); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); break; case 115: @@ -718,50 +718,50 @@ bool HopkinsEngine::runLinuxDemo() { _globals->_saveData->_data[svLastPrevScreenId] = _globals->_screenId; _globals->_screenId = 115; _globals->_saveData->_data[svLastScreenId] = 115; - _computerManager->showComputer(COMPUTER_PUBLIC); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); + _computer->showComputer(COMPUTER_PUBLIC); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); break; case 150: - _soundManager->playSound(16); + _soundMan->playSound(16); _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("JOUR1A.anm", 12, 12, 2000); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _graphicsMan->_fadingFl = true; + _animMan->playAnim("JOUR1A.anm", 12, 12, 2000); _globals->_eventMode = EVENTMODE_DEFAULT; _globals->_exitId = 300; break; case 151: - _soundManager->playSound(16); + _soundMan->playSound(16); _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("JOUR3A.anm", 12, 12, 2000); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _graphicsMan->_fadingFl = true; + _animMan->playAnim("JOUR3A.anm", 12, 12, 2000); _globals->_eventMode = EVENTMODE_DEFAULT; _globals->_exitId = 300; break; case 152: - _soundManager->playSound(16); + _soundMan->playSound(16); _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("JOUR4A.anm", 12, 12, 2000); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _graphicsMan->_fadingFl = true; + _animMan->playAnim("JOUR4A.anm", 12, 12, 2000); _globals->_eventMode = EVENTMODE_DEFAULT; _globals->_exitId = 300; break; @@ -772,93 +772,93 @@ bool HopkinsEngine::runLinuxDemo() { bool HopkinsEngine::runFull() { if (_startGameSlot == -1 && getPlatform() == Common::kPlatformLinux) - _soundManager->playSound(16); + _soundMan->playSound(16); - _objectsManager->loadObjects(); - _objectsManager->changeObject(14); - _objectsManager->addObject(14); + _objectsMan->loadObjects(); + _objectsMan->changeObject(14); + _objectsMan->addObject(14); if (getPlatform() == Common::kPlatformLinux) { - _objectsManager->_helicopterFl = false; - _eventsManager->mouseOff(); + _objectsMan->_helicopterFl = false; + _events->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; + _objectsMan->_helicopterFl = false; _globals->_eventMode = EVENTMODE_IGNORE; // This code displays the game version. // It wasn't present in the original and could be put in the debugger // It has been added there for debug purposes if (_startGameSlot == -1) { - _graphicsManager->loadImage("VERSW"); - _graphicsManager->fadeInLong(); - _eventsManager->delay(500); - _graphicsManager->fadeOutLong(); + _graphicsMan->loadImage("VERSW"); + _graphicsMan->fadeInLong(); + _events->delay(500); + _graphicsMan->fadeOutLong(); } - _graphicsManager->clearVesaScreen(); + _graphicsMan->clearVesaScreen(); } else { // This piece of code, though named "display_version" in the original, // displays a "loading please wait" screen. if (_startGameSlot == -1) { - _graphicsManager->loadImage("VERSW"); - _graphicsManager->fadeInLong(); - _eventsManager->delay(500); - _graphicsManager->fadeOutLong(); + _graphicsMan->loadImage("VERSW"); + _graphicsMan->fadeInLong(); + _events->delay(500); + _graphicsMan->fadeOutLong(); } - _graphicsManager->clearVesaScreen(); + _graphicsMan->clearVesaScreen(); _globals->_eventMode = EVENTMODE_IGNORE; } - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); if (_startGameSlot == -1) { if (getPlatform() == Common::kPlatformLinux) { - _graphicsManager->loadImage("H2"); - _graphicsManager->fadeInLong(); - _eventsManager->delay(500); - _graphicsManager->fadeOutLong(); + _graphicsMan->loadImage("H2"); + _graphicsMan->fadeInLong(); + _events->delay(500); + _graphicsMan->fadeOutLong(); _globals->_speed = 2; _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("MP.ANM", 10, 16, 200); + _graphicsMan->_fadingFl = true; + _animMan->playAnim("MP.ANM", 10, 16, 200); } else { - _animationManager->playAnim("MP.ANM", 10, 16, 200); - _graphicsManager->fadeOutLong(); + _animMan->playAnim("MP.ANM", 10, 16, 200); + _graphicsMan->fadeOutLong(); } } - if (!_eventsManager->_escKeyFl && _startGameSlot == -1) { + if (!_events->_escKeyFl && _startGameSlot == -1) { playIntro(); if (shouldQuit()) return false; } if (getPlatform() != Common::kPlatformLinux && _startGameSlot == -1) { - _graphicsManager->fadeOutShort(); - _graphicsManager->loadImage("H2"); - _graphicsManager->fadeInLong(); - _eventsManager->delay(500); - _graphicsManager->fadeOutLong(); + _graphicsMan->fadeOutShort(); + _graphicsMan->loadImage("H2"); + _graphicsMan->fadeInLong(); + _events->delay(500); + _graphicsMan->fadeOutLong(); } _globals->_eventMode = EVENTMODE_DEFAULT; - _globals->_characterSpriteBuf = _fileManager->loadFile("PERSO.SPR"); + _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR"); _globals->_characterType = 0; - _objectsManager->_mapCarPosX = _objectsManager->_mapCarPosY = 0; + _objectsMan->_mapCarPosX = _objectsMan->_mapCarPosY = 0; memset(_globals->_saveData, 0, 2000); _globals->_exitId = 0; if (_startGameSlot != -1) - _saveLoadManager->loadGame(_startGameSlot); + _saveLoad->loadGame(_startGameSlot); for (;;) { if (_globals->_exitId == 300) _globals->_exitId = 0; if (!_globals->_exitId) { - _globals->_exitId = _menuManager->menu(); + _globals->_exitId = _menuMan->menu(); if (_globals->_exitId == -1) { _globals->_characterSpriteBuf = _globals->freeMemory(_globals->_characterSpriteBuf); restoreSystem(); @@ -873,311 +873,311 @@ bool HopkinsEngine::runFull() { switch (_globals->_exitId) { case 1: - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true); + _objectsMan->PERSONAGE2("IM01", "IM01", "ANIM01", "IM01", 1, true); break; case 3: if (!_globals->_saveData->_data[svBankAttackAnimPlayedFl]) { // Play the bank attack animation - _soundManager->playSound(3); + _soundMan->playSound(3); if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS) - _graphicsManager->loadImage("fond"); + _graphicsMan->loadImage("fond"); else { if (_globals->_language == LANG_FR) - _graphicsManager->loadImage("fondfr"); + _graphicsMan->loadImage("fondfr"); else if (_globals->_language == LANG_EN) - _graphicsManager->loadImage("fondan"); + _graphicsMan->loadImage("fondan"); else if (_globals->_language == LANG_SP) - _graphicsManager->loadImage("fondes"); + _graphicsMan->loadImage("fondes"); } - _graphicsManager->fadeInLong(); - _eventsManager->delay(500); - _graphicsManager->fadeOutLong(); + _graphicsMan->fadeInLong(); + _events->delay(500); + _graphicsMan->fadeOutLong(); _globals->_eventMode = EVENTMODE_IGNORE; - _soundManager->_specialSoundNum = 2; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); + _soundMan->_specialSoundNum = 2; + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) { if (getPlatform() == Common::kPlatformLinux) - _graphicsManager->_fadingFl = true; + _graphicsMan->_fadingFl = true; if (!_globals->_censorshipFl) - _animationManager->playAnim("BANQUE.ANM", 200, 28, 200); + _animMan->playAnim("BANQUE.ANM", 200, 28, 200); else - _animationManager->playAnim("BANKUK.ANM", 200, 28, 200); + _animMan->playAnim("BANKUK.ANM", 200, 28, 200); } else { - _animationManager->playAnim("BANQUE.ANM", 200, 28, 200); + _animMan->playAnim("BANQUE.ANM", 200, 28, 200); } - _soundManager->_specialSoundNum = 0; - _soundManager->removeSample(1); - _soundManager->removeSample(2); - _soundManager->removeSample(3); - _soundManager->removeSample(4); + _soundMan->_specialSoundNum = 0; + _soundMan->removeSample(1); + _soundMan->removeSample(2); + _soundMan->removeSample(3); + _soundMan->removeSample(4); if (getPlatform() != Common::kPlatformLinux) { // Copy the end of the animation into the secondary buffer and fade out the screen - Common::fill(_graphicsManager->_frontBuffer, _graphicsManager->_frontBuffer + + Common::fill(_graphicsMan->_frontBuffer, _graphicsMan->_frontBuffer + SCREEN_WIDTH * 2 * SCREEN_HEIGHT, 0); - _graphicsManager->fadeOutLong(); + _graphicsMan->fadeOutLong(); } _globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1; } - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; - _objectsManager->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); + _objectsMan->PERSONAGE2("IM03", "IM03", "ANIM03", "IM03", 2, false); break; case 4: _globals->_disableInventFl = true; - _objectsManager->handleCityMap(); + _objectsMan->handleCityMap(); _globals->_disableInventFl = false; break; case 5: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 455; if (_globals->_saveData->_data[svFreedHostageFl] == 1) - _objectsManager->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); + _objectsMan->PERSONAGE2("IM05", "IM05A", "ANIM05B", "IM05", 3, false); else - _objectsManager->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); + _objectsMan->PERSONAGE2("IM05", "IM05", "ANIM05", "IM05", 3, false); break; case 6: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 460; - _objectsManager->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); + _objectsMan->PERSONAGE2("IM06", "IM06", "ANIM06", "IM06", 2, true); break; case 7: if (_globals->_saveData->_data[svBombBoxOpenedFl]) - _objectsManager->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsMan->PERSONAGE("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true); else - _objectsManager->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); + _objectsMan->PERSONAGE("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true); break; case 8: - _linesManager->setMaxLineIdx(15); + _linesMan->setMaxLineIdx(15); _globals->_characterMaxPosY = 450; - _objectsManager->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); + _objectsMan->PERSONAGE2("IM08", "IM08", "ANIM08", "IM08", 2, true); break; case 9: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 440; if (_globals->_saveData->_data[svBombDisarmedFl]) - _objectsManager->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); + _objectsMan->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); else bombExplosion(); break; case 10: - _objectsManager->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); + _objectsMan->PERSONAGE("IM10", "IM10", "ANIM10", "IM10", 9, false); break; case 11: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 450; - _objectsManager->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); + _objectsMan->PERSONAGE2("IM11", "IM11", "ANIM11", "IM11", 2, false); break; case 12: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 450; if (_globals->_saveData->_data[svBombDisarmedFl]) - _objectsManager->PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false); + _objectsMan->PERSONAGE2("IM12", "IM12", "ANIM12", "IM12", 1, false); else bombExplosion(); break; case 13: - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true); + _objectsMan->PERSONAGE2("IM13", "IM13", "ANIM13", "IM13", 1, true); break; case 14: - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM14", "IM14", "ANIM14", "IM14", 1, true); + _objectsMan->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); + _objectsMan->PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 29, false); else - _objectsManager->PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 18, false); + _objectsMan->PERSONAGE("IM15", "IM15", "ANIM15", "IM15", 18, false); break; case 16: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; if (_globals->_saveData->_data[svForestAvailableFl] == 1) - _objectsManager->PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true); + _objectsMan->PERSONAGE2("IM16", "IM16A", "ANIM16", "IM16", 7, true); else - _objectsManager->PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true); + _objectsMan->PERSONAGE2("IM16", "IM16", "ANIM16", "IM16", 7, true); break; case 17: - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; if (_globals->_saveData->_data[svHutBurningFl] == 1) - _objectsManager->PERSONAGE2("IM17", "IM17A", "ANIM17", "IM17", 11, true); + _objectsMan->PERSONAGE2("IM17", "IM17A", "ANIM17", "IM17", 11, true); else if (!_globals->_saveData->_data[svHutBurningFl]) - _objectsManager->PERSONAGE2("IM17", "IM17", "ANIM17", "IM17", 11, true); + _objectsMan->PERSONAGE2("IM17", "IM17", "ANIM17", "IM17", 11, true); if (_globals->_exitId == 18) { _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _soundManager->stopSound(); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _soundMan->stopSound(); if (getPlatform() == Common::kPlatformLinux) { - _soundManager->playSound(29); - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("PURG1A.ANM", 12, 18, 50); + _soundMan->playSound(29); + _graphicsMan->_fadingFl = true; + _animMan->playAnim("PURG1A.ANM", 12, 18, 50); } else if (getPlatform() == Common::kPlatformWindows) { - _soundManager->playSound(29); - _animationManager->playAnim("PURG1A.ANM", 12, 18, 50); - _graphicsManager->fadeOutShort(); + _soundMan->playSound(29); + _animMan->playAnim("PURG1A.ANM", 12, 18, 50); + _graphicsMan->fadeOutShort(); } else { - _soundManager->playSound(6); - _animationManager->playAnim("PURG1A.ANM", 12, 18, 50); - _graphicsManager->fadeOutShort(); + _soundMan->playSound(6); + _animMan->playAnim("PURG1A.ANM", 12, 18, 50); + _graphicsMan->fadeOutShort(); } _globals->_eventMode = EVENTMODE_DEFAULT; } break; case 18: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) - _objectsManager->PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 29, false); + _objectsMan->PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 29, false); else - _objectsManager->PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 6, false); + _objectsMan->PERSONAGE2("IM18", "IM18", "ANIM18", "IM18", 6, false); break; case 19: - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 440; if (_globals->_saveData->_data[svHeavenGuardGoneFl]) - _objectsManager->PERSONAGE2("IM19", "IM19A", "ANIM19", "IM19", 6, true); + _objectsMan->PERSONAGE2("IM19", "IM19A", "ANIM19", "IM19", 6, true); else - _objectsManager->PERSONAGE2("IM19", "IM19", "ANIM19", "IM19", 6, true); + _objectsMan->PERSONAGE2("IM19", "IM19", "ANIM19", "IM19", 6, true); break; case 20: - _linesManager->setMaxLineIdx(10); + _linesMan->setMaxLineIdx(10); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM20", "IM20", "ANIM20", "IM20", 6, true); + _objectsMan->PERSONAGE2("IM20", "IM20", "ANIM20", "IM20", 6, true); if (_globals->_exitId == 17) { _globals->_eventMode = EVENTMODE_IGNORE; - _soundManager->stopSound(); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _soundManager->playSound(6); + _soundMan->stopSound(); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _soundMan->playSound(6); if (getPlatform() == Common::kPlatformLinux) - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("PURG2A.ANM", 12, 18, 50); + _graphicsMan->_fadingFl = true; + _animMan->playAnim("PURG2A.ANM", 12, 18, 50); if (getPlatform() != Common::kPlatformLinux) - _graphicsManager->fadeOutShort(); + _graphicsMan->fadeOutShort(); _globals->_eventMode = EVENTMODE_DEFAULT; } break; case 22: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 445; - _objectsManager->PERSONAGE2("IM22", "IM22", "ANIM22", "IM22", 6, true); + _objectsMan->PERSONAGE2("IM22", "IM22", "ANIM22", "IM22", 6, true); break; case 23: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM23", "IM23", "ANIM23", "IM23", 6, true); + _objectsMan->PERSONAGE2("IM23", "IM23", "ANIM23", "IM23", 6, true); break; case 24: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; if (_globals->_saveData->_data[svCinemaDogGoneFl] == 1) - _objectsManager->PERSONAGE2("IM24", "IM24A", "ANIM24", "IM24", 1, true); + _objectsMan->PERSONAGE2("IM24", "IM24A", "ANIM24", "IM24", 1, true); else - _objectsManager->PERSONAGE2("IM24", "IM24", "ANIM24", "IM24", 1, true); + _objectsMan->PERSONAGE2("IM24", "IM24", "ANIM24", "IM24", 1, true); break; case 25: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 445; if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) - _objectsManager->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true); + _objectsMan->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 30, true); else - _objectsManager->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 8, true); + _objectsMan->PERSONAGE2("IM25", "IM25", "ANIM25", "IM25", 8, true); break; case 26: - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) - _objectsManager->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true); + _objectsMan->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 30, true); else - _objectsManager->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 8, true); + _objectsMan->PERSONAGE2("IM26", "IM26", "ANIM26", "IM26", 8, true); break; case 27: - _linesManager->setMaxLineIdx(15); + _linesMan->setMaxLineIdx(15); _globals->_characterMaxPosY = 440; if (_globals->_saveData->_data[svPoolDogGoneFl] == 1) - _objectsManager->PERSONAGE2("IM27", "IM27A", "ANIM27", "IM27", 27, true); + _objectsMan->PERSONAGE2("IM27", "IM27A", "ANIM27", "IM27", 27, true); else - _objectsManager->PERSONAGE2("IM27", "IM27", "ANIM27", "IM27", 27, true); + _objectsMan->PERSONAGE2("IM27", "IM27", "ANIM27", "IM27", 27, true); break; case 28: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 450; if (_globals->_saveData->_data[svCinemaCurtainCond1] != 1 || _globals->_saveData->_data[svCinemaCurtainCond2] != 1) - _objectsManager->PERSONAGE2("IM28", "IM28", "ANIM28", "IM28", 1, false); + _objectsMan->PERSONAGE2("IM28", "IM28", "ANIM28", "IM28", 1, false); else - _objectsManager->PERSONAGE2("IM28A", "IM28", "ANIM28", "IM28", 1, false); + _objectsMan->PERSONAGE2("IM28A", "IM28", "ANIM28", "IM28", 1, false); break; case 29: - _linesManager->setMaxLineIdx(50); + _linesMan->setMaxLineIdx(50); _globals->_characterMaxPosY = 445; - _objectsManager->PERSONAGE2("IM29", "IM29", "ANIM29", "IM29", 1, true); + _objectsMan->PERSONAGE2("IM29", "IM29", "ANIM29", "IM29", 1, true); break; case 30: - _linesManager->setMaxLineIdx(15); + _linesMan->setMaxLineIdx(15); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM30", "IM30", "ANIM30", "IM30", 24, false); + _objectsMan->PERSONAGE2("IM30", "IM30", "ANIM30", "IM30", 24, false); break; case 31: - _objectsManager->PERSONAGE("IM31", "IM31", "ANIM31", "IM31", 10, true); + _objectsMan->PERSONAGE("IM31", "IM31", "ANIM31", "IM31", 10, true); break; case 32: - _linesManager->setMaxLineIdx(20); + _linesMan->setMaxLineIdx(20); _globals->_characterMaxPosY = 445; - _objectsManager->PERSONAGE2("IM32", "IM32", "ANIM32", "IM32", 2, true); + _objectsMan->PERSONAGE2("IM32", "IM32", "ANIM32", "IM32", 2, true); break; case 33: - _objectsManager->PERSONAGE("IM33", "IM33", "ANIM33", "IM33", 8, false); + _objectsMan->PERSONAGE("IM33", "IM33", "ANIM33", "IM33", 8, false); break; case 34: - _objectsManager->PERSONAGE("IM34", "IM34", "ANIM34", "IM34", 2, false); + _objectsMan->PERSONAGE("IM34", "IM34", "ANIM34", "IM34", 2, false); break; case 35: @@ -1187,21 +1187,21 @@ bool HopkinsEngine::runFull() { case 39: case 40: case 41: { - _linesManager->setMaxLineIdx(40); + _linesMan->setMaxLineIdx(40); _globals->_characterMaxPosY = 435; _globals->_disableInventFl = false; - _objectsManager->_forestFl = true; + _objectsMan->_forestFl = true; Common::String im = Common::String::format("IM%d", _globals->_exitId); - _soundManager->playSound(13); - if (_objectsManager->_forestSprite == NULL) { - _objectsManager->_forestSprite = _objectsManager->loadSprite("HOPDEG.SPR"); - _soundManager->loadSample(1, "SOUND41.WAV"); + _soundMan->playSound(13); + if (_objectsMan->_forestSprite == NULL) { + _objectsMan->_forestSprite = _objectsMan->loadSprite("HOPDEG.SPR"); + _soundMan->loadSample(1, "SOUND41.WAV"); } - _objectsManager->PERSONAGE2(im, im, "BANDIT", im, 13, false); + _objectsMan->PERSONAGE2(im, im, "BANDIT", im, 13, false); if (_globals->_exitId < 35 || _globals->_exitId > 49) { - _objectsManager->_forestSprite = _globals->freeMemory(_objectsManager->_forestSprite); - _objectsManager->_forestFl = false; - _soundManager->removeSample(1); + _objectsMan->_forestSprite = _globals->freeMemory(_objectsMan->_forestSprite); + _objectsMan->_forestFl = false; + _soundMan->removeSample(1); } break; } @@ -1212,132 +1212,132 @@ bool HopkinsEngine::runFull() { break; case 51: - _linesManager->setMaxLineIdx(10); + _linesMan->setMaxLineIdx(10); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM51", "IM51", "ANIM51", "IM51", 14, true); + _objectsMan->PERSONAGE2("IM51", "IM51", "ANIM51", "IM51", 14, true); break; case 52: - _linesManager->setMaxLineIdx(15); + _linesMan->setMaxLineIdx(15); _globals->_characterMaxPosY = 445; - _objectsManager->PERSONAGE2("IM52", "IM52", "ANIM52", "IM52", 14, true); + _objectsMan->PERSONAGE2("IM52", "IM52", "ANIM52", "IM52", 14, true); break; case 54: - _linesManager->setMaxLineIdx(30); + _linesMan->setMaxLineIdx(30); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM54", "IM54", "ANIM54", "IM54", 14, true); + _objectsMan->PERSONAGE2("IM54", "IM54", "ANIM54", "IM54", 14, true); break; case 55: - _linesManager->setMaxLineIdx(30); + _linesMan->setMaxLineIdx(30); _globals->_characterMaxPosY = 460; - _objectsManager->PERSONAGE2("IM55", "IM55", "ANIM55", "IM55", 14, false); + _objectsMan->PERSONAGE2("IM55", "IM55", "ANIM55", "IM55", 14, false); break; case 56: - _linesManager->setMaxLineIdx(30); + _linesMan->setMaxLineIdx(30); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM56", "IM56", "ANIM56", "IM56", 14, false); + _objectsMan->PERSONAGE2("IM56", "IM56", "ANIM56", "IM56", 14, false); break; case 57: - _linesManager->setMaxLineIdx(30); + _linesMan->setMaxLineIdx(30); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM57", "IM57", "ANIM57", "IM57", 14, true); + _objectsMan->PERSONAGE2("IM57", "IM57", "ANIM57", "IM57", 14, true); break; case 58: - _linesManager->setMaxLineIdx(30); + _linesMan->setMaxLineIdx(30); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM58", "IM58", "ANIM58", "IM58", 14, false); + _objectsMan->PERSONAGE2("IM58", "IM58", "ANIM58", "IM58", 14, false); break; case 59: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 445; - _objectsManager->PERSONAGE2("IM59", "IM59", "ANIM59", "IM59", 21, false); + _objectsMan->PERSONAGE2("IM59", "IM59", "ANIM59", "IM59", 21, false); break; case 60: - _linesManager->setMaxLineIdx(30); + _linesMan->setMaxLineIdx(30); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM60", "IM60", "ANIM60", "IM60", 21, false); + _objectsMan->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); + _objectsMan->PERSONAGE("IM61", "IM61", "ANIM61", "IM61", 21, false); break; case 62: - _linesManager->setMaxLineIdx(8); + _linesMan->setMaxLineIdx(8); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM62", "IM62", NULL, "IM62", 21, false); + _objectsMan->PERSONAGE2("IM62", "IM62", NULL, "IM62", 21, false); break; case 63: - _linesManager->setMaxLineIdx(30); + _linesMan->setMaxLineIdx(30); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM63", "IM63", "ANIM63", "IM63", 21, false); + _objectsMan->PERSONAGE2("IM63", "IM63", "ANIM63", "IM63", 21, false); break; case 64: - _linesManager->setMaxLineIdx(30); + _linesMan->setMaxLineIdx(30); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM64", "IM64", "ANIM64", "IM64", 21, true); + _objectsMan->PERSONAGE2("IM64", "IM64", "ANIM64", "IM64", 21, true); break; case 65: - _linesManager->setMaxLineIdx(30); + _linesMan->setMaxLineIdx(30); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM65", "IM65", "ANIM65", "IM65", 21, false); + _objectsMan->PERSONAGE2("IM65", "IM65", "ANIM65", "IM65", 21, false); break; case 66: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 445; - _objectsManager->PERSONAGE2("IM66", "IM66", "ANIM66", "IM66", 21, false); + _objectsMan->PERSONAGE2("IM66", "IM66", "ANIM66", "IM66", 21, false); break; case 67: - _linesManager->setMaxLineIdx(8); + _linesMan->setMaxLineIdx(8); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM67", "IM67", NULL, "IM67", 21, false); + _objectsMan->PERSONAGE2("IM67", "IM67", NULL, "IM67", 21, false); break; case 68: - _linesManager->setMaxLineIdx(8); + _linesMan->setMaxLineIdx(8); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM68", "IM68", "ANIM68", "IM68", 21, true); + _objectsMan->PERSONAGE2("IM68", "IM68", "ANIM68", "IM68", 21, true); break; case 69: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 445; - _objectsManager->PERSONAGE2("IM69", "IM69", "ANIM69", "IM69", 21, false); + _objectsMan->PERSONAGE2("IM69", "IM69", "ANIM69", "IM69", 21, false); break; case 70: - _linesManager->setMaxLineIdx(8); + _linesMan->setMaxLineIdx(8); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM70", "IM70", NULL, "IM70", 21, false); + _objectsMan->PERSONAGE2("IM70", "IM70", NULL, "IM70", 21, false); break; case 71: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 445; - _objectsManager->PERSONAGE2("IM71", "IM71", "ANIM71", "IM71", 21, false); + _objectsMan->PERSONAGE2("IM71", "IM71", "ANIM71", "IM71", 21, false); break; case 73: - _linesManager->setMaxLineIdx(15); + _linesMan->setMaxLineIdx(15); _globals->_characterMaxPosY = 445; if (_globals->_saveData->_data[svSecondElevatorAvailableFl] == 1) - _objectsManager->PERSONAGE2("IM73", "IM73A", "ANIM73", "IM73", 21, true); + _objectsMan->PERSONAGE2("IM73", "IM73A", "ANIM73", "IM73", 21, true); else - _objectsManager->PERSONAGE2("IM73", "IM73", "ANIM73", "IM73", 21, true); + _objectsMan->PERSONAGE2("IM73", "IM73", "ANIM73", "IM73", 21, true); break; case 75: @@ -1405,67 +1405,67 @@ bool HopkinsEngine::runFull() { break; case 93: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 445; if (_globals->_saveData->_data[svEscapeLeftJailFl]) { if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) - _objectsManager->PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 29, true); + _objectsMan->PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 29, true); else - _objectsManager->PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 26, true); + _objectsMan->PERSONAGE2("IM93", "IM93C", "ANIM93", "IM93", 26, true); } else { if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) - _objectsManager->PERSONAGE2("IM93", "IM93", "ANIM93", "IM93", 29, true); + _objectsMan->PERSONAGE2("IM93", "IM93", "ANIM93", "IM93", 29, true); else - _objectsManager->PERSONAGE2("IM93", "IM93", "ANIM93", "IM93", 26, true); + _objectsMan->PERSONAGE2("IM93", "IM93", "ANIM93", "IM93", 26, true); } break; case 94: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 440; - _objectsManager->PERSONAGE2("IM94", "IM94", "ANIM94", "IM94", 19, true); + _objectsMan->PERSONAGE2("IM94", "IM94", "ANIM94", "IM94", 19, true); break; case 95: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM95", "IM95", "ANIM95", "IM95", 19, false); + _objectsMan->PERSONAGE2("IM95", "IM95", "ANIM95", "IM95", 19, false); break; case 96: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM96", "IM96", "ANIM96", "IM96", 19, false); + _objectsMan->PERSONAGE2("IM96", "IM96", "ANIM96", "IM96", 19, false); break; case 97: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM97", "IM97", "ANIM97", "IM97", 19, false); + _objectsMan->PERSONAGE2("IM97", "IM97", "ANIM97", "IM97", 19, false); if (_globals->_exitId == 18) { _globals->_eventMode = EVENTMODE_IGNORE; - _soundManager->stopSound(); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _soundManager->playSound(6); - _animationManager->playAnim("PURG1A.ANM", 12, 18, 50); - _graphicsManager->fadeOutShort(); + _soundMan->stopSound(); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _soundMan->playSound(6); + _animMan->playAnim("PURG1A.ANM", 12, 18, 50); + _graphicsMan->fadeOutShort(); _globals->_eventMode = EVENTMODE_DEFAULT; } break; case 98: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM98", "IM98", "ANIM98", "IM98", 19, true); + _objectsMan->PERSONAGE2("IM98", "IM98", "ANIM98", "IM98", 19, true); break; case 99: - _linesManager->setMaxLineIdx(5); + _linesMan->setMaxLineIdx(5); _globals->_characterMaxPosY = 435; - _objectsManager->PERSONAGE2("IM99", "IM99", "ANIM99", "IM99", 19, true); + _objectsMan->PERSONAGE2("IM99", "IM99", "ANIM99", "IM99", 19, true); break; case 100: @@ -1473,11 +1473,11 @@ bool HopkinsEngine::runFull() { break; case 111: - _objectsManager->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); + _objectsMan->PERSONAGE("IM111", "IM111", "ANIM111", "IM111", 10, false); break; case 112: - _objectsManager->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); + _objectsMan->PERSONAGE("IM112", "IM112", "ANIM112", "IM112", 10, false); break; case 113: @@ -1486,15 +1486,15 @@ bool HopkinsEngine::runFull() { _globals->_saveData->_data[svLastPrevScreenId] = _globals->_prevScreenId; _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; _globals->_exitId = 0; - _computerManager->showComputer(COMPUTER_HOPKINS); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->updateScreen(); - memset(_graphicsManager->_frontBuffer, 0, 307200); - memset(_graphicsManager->_backBuffer, 0, 307200); - _graphicsManager->clearPalette(); - _graphicsManager->resetDirtyRects(); + _computer->showComputer(COMPUTER_HOPKINS); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->updateScreen(); + memset(_graphicsMan->_frontBuffer, 0, 307200); + memset(_graphicsMan->_backBuffer, 0, 307200); + _graphicsMan->clearPalette(); + _graphicsMan->resetDirtyRects(); break; case 114: @@ -1503,10 +1503,10 @@ bool HopkinsEngine::runFull() { _globals->_screenId = 114; _globals->_saveData->_data[svLastPrevScreenId] = _globals->_prevScreenId; _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; - _computerManager->showComputer(COMPUTER_SAMANTHA); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); + _computer->showComputer(COMPUTER_SAMANTHA); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); break; case 115: @@ -1515,50 +1515,50 @@ bool HopkinsEngine::runFull() { _globals->_saveData->_data[svLastPrevScreenId] = _globals->_prevScreenId; _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; _globals->_exitId = 0; - _computerManager->showComputer(COMPUTER_PUBLIC); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); + _computer->showComputer(COMPUTER_PUBLIC); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); break; case 150: - _soundManager->playSound(16); + _soundMan->playSound(16); _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); if (getPlatform() == Common::kPlatformLinux) - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("JOUR1A.ANM", 12, 12, 2000); + _graphicsMan->_fadingFl = true; + _animMan->playAnim("JOUR1A.ANM", 12, 12, 2000); _globals->_eventMode = EVENTMODE_DEFAULT; _globals->_exitId = 300; break; case 151: - _soundManager->playSound(16); + _soundMan->playSound(16); _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); if (getPlatform() == Common::kPlatformLinux) - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("JOUR3A.ANM", 12, 12, 2000); + _graphicsMan->_fadingFl = true; + _animMan->playAnim("JOUR3A.ANM", 12, 12, 2000); _globals->_eventMode = EVENTMODE_DEFAULT; _globals->_exitId = 300; break; case 152: - _soundManager->playSound(16); + _soundMan->playSound(16); _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); if (getPlatform() == Common::kPlatformLinux) - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("JOUR4A.ANM", 12, 12, 2000); + _graphicsMan->_fadingFl = true; + _animMan->playAnim("JOUR4A.ANM", 12, 12, 2000); _globals->_eventMode = EVENTMODE_DEFAULT; _globals->_exitId = 300; break; @@ -1571,15 +1571,15 @@ bool HopkinsEngine::runFull() { case 199: _globals->_characterSpriteBuf = _globals->freeMemory(_globals->_characterSpriteBuf); _globals->_eventMode = EVENTMODE_IGNORE; - _soundManager->stopSound(); - _soundManager->playSound(23); + _soundMan->stopSound(); + _soundMan->playSound(23); _globals->_exitId = handleBaseMap(); // Handles the base map (non-Windows) //_globals->_exitId = WBASE(); // Handles the 3D Doom level (Windows) - _soundManager->stopSound(); - _globals->_characterSpriteBuf = _fileManager->loadFile("PERSO.SPR"); + _soundMan->stopSound(); + _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR"); _globals->_characterType = 0; _globals->_eventMode = EVENTMODE_DEFAULT; - _graphicsManager->_lineNbr = SCREEN_WIDTH; + _graphicsMan->_lineNbr = SCREEN_WIDTH; break; } } @@ -1598,10 +1598,10 @@ int HopkinsEngine::getRandomNumber(int maxNumber) { void HopkinsEngine::initializeSystem() { // Set graphics mode - _graphicsManager->setGraphicalMode(SCREEN_WIDTH, SCREEN_HEIGHT); + _graphicsMan->setGraphicalMode(SCREEN_WIDTH, SCREEN_HEIGHT); // Synchronize the sound settings from ScummVM - _soundManager->syncSoundSettings(); + _soundMan->syncSoundSettings(); const Common::FSNode gameDataDir(ConfMan.get("path")); SearchMan.addSubDirectoryMatching(gameDataDir, "SYSTEM"); @@ -1620,19 +1620,19 @@ void HopkinsEngine::initializeSystem() { _globals->clearAll(); - _eventsManager->initMouseData(); - _fontManager->initData(); + _events->initMouseData(); + _fontMan->initData(); - _dialogsManager->loadIcons(); - _objectsManager->_headSprites = _fileManager->loadFile("TETE.SPR"); + _dialog->loadIcons(); + _objectsMan->_headSprites = _fileIO->loadFile("TETE.SPR"); - _eventsManager->setMouseOn(); - _eventsManager->_mouseFl = false; + _events->setMouseOn(); + _events->_mouseFl = false; _globals->loadCharacterData(); - _eventsManager->_mouseOffset.x = 0; - _eventsManager->_mouseOffset.y = 0; + _events->_mouseOffset.x = 0; + _events->_mouseOffset.y = 0; } /** @@ -1647,217 +1647,217 @@ void HopkinsEngine::playIntro() { byte paletteData2[PALETTE_EXT_BLOCK_SIZE]; memset(&paletteData, 0, PALETTE_EXT_BLOCK_SIZE); - _eventsManager->refreshScreenAndEvents(); - _eventsManager->_mouseFl = false; + _events->refreshScreenAndEvents(); + _events->_mouseFl = false; _globals->_eventMode = EVENTMODE_IGNORE; - _eventsManager->refreshScreenAndEvents(); - _soundManager->playSound(16); - _animationManager->setClearAnimFlag(); - _animationManager->playAnim("J1.anm", 12, 12, 50); - if (shouldQuit() || _eventsManager->_escKeyFl) + _events->refreshScreenAndEvents(); + _soundMan->playSound(16); + _animMan->setClearAnimFlag(); + _animMan->playAnim("J1.anm", 12, 12, 50); + if (shouldQuit() || _events->_escKeyFl) return; - _soundManager->mixVoice(1, 3); - _animationManager->playAnim("J2.anm", 12, 12, 50); + _soundMan->mixVoice(1, 3); + _animMan->playAnim("J2.anm", 12, 12, 50); - if (shouldQuit() || _eventsManager->_escKeyFl) + if (shouldQuit() || _events->_escKeyFl) return; - _soundManager->mixVoice(2, 3); - _animationManager->playAnim("J3.anm", 12, 12, 50); + _soundMan->mixVoice(2, 3); + _animMan->playAnim("J3.anm", 12, 12, 50); - if (shouldQuit() || _eventsManager->_escKeyFl) + if (shouldQuit() || _events->_escKeyFl) return; - _soundManager->mixVoice(3, 3); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _graphicsManager->updateScreen(); - _soundManager->playSound(11); - _graphicsManager->loadImage("intro1"); - _graphicsManager->scrollScreen(0); - _graphicsManager->_scrollOffset = 0; - _graphicsManager->setColorPercentage(252, 100, 100, 100); - _graphicsManager->setColorPercentage(253, 100, 100, 100); - _graphicsManager->setColorPercentage(251, 100, 100, 100); - _graphicsManager->setColorPercentage(254, 0, 0, 0); + _soundMan->mixVoice(3, 3); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _graphicsMan->updateScreen(); + _soundMan->playSound(11); + _graphicsMan->loadImage("intro1"); + _graphicsMan->scrollScreen(0); + _graphicsMan->_scrollOffset = 0; + _graphicsMan->setColorPercentage(252, 100, 100, 100); + _graphicsMan->setColorPercentage(253, 100, 100, 100); + _graphicsMan->setColorPercentage(251, 100, 100, 100); + _graphicsMan->setColorPercentage(254, 0, 0, 0); for (int i = 0; i <= 4; i++) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->fadeInLong(); - if (_graphicsManager->_largeScreenFl) { - _graphicsManager->_scrollStatus = 2; - _graphicsManager->_scrollPosX = 0; + _graphicsMan->fadeInLong(); + if (_graphicsMan->_largeScreenFl) { + _graphicsMan->_scrollStatus = 2; + _graphicsMan->_scrollPosX = 0; bool loopCond = false; do { - _graphicsManager->_scrollPosX += 2; - if (_graphicsManager->_scrollPosX > (SCREEN_WIDTH - 2)) { - _graphicsManager->_scrollPosX = SCREEN_WIDTH; + _graphicsMan->_scrollPosX += 2; + if (_graphicsMan->_scrollPosX > (SCREEN_WIDTH - 2)) { + _graphicsMan->_scrollPosX = SCREEN_WIDTH; loopCond = true; } - if (_eventsManager->getMouseX() < _graphicsManager->_scrollPosX + 10) - _eventsManager->setMouseXY(_eventsManager->_mousePos.x + 4, _eventsManager->getMouseY()); - _eventsManager->refreshScreenAndEvents(); - } while (!shouldQuit() && !loopCond && _graphicsManager->_scrollPosX != SCREEN_WIDTH); + if (_events->getMouseX() < _graphicsMan->_scrollPosX + 10) + _events->setMouseXY(_events->_mousePos.x + 4, _events->getMouseY()); + _events->refreshScreenAndEvents(); + } while (!shouldQuit() && !loopCond && _graphicsMan->_scrollPosX != SCREEN_WIDTH); - _eventsManager->refreshScreenAndEvents(); - _graphicsManager->_scrollStatus = 0; + _events->refreshScreenAndEvents(); + _graphicsMan->_scrollStatus = 0; if (shouldQuit()) return; } - _soundManager->mixVoice(4, 3); - _graphicsManager->fadeOutLong(); - _graphicsManager->_scrollStatus = 0; - _graphicsManager->loadImage("intro2"); - _graphicsManager->scrollScreen(0); - _animationManager->loadAnim("INTRO2"); - _graphicsManager->displayAllBob(); - _soundManager->playSound(23); - _objectsManager->stopBobAnimation(3); - _objectsManager->stopBobAnimation(5); - _graphicsManager->_scrollOffset = 0; - _graphicsManager->setColorPercentage(252, 100, 100, 100); - _graphicsManager->setColorPercentage(253, 100, 100, 100); - _graphicsManager->setColorPercentage(251, 100, 100, 100); - _graphicsManager->setColorPercentage(254, 0, 0, 0); + _soundMan->mixVoice(4, 3); + _graphicsMan->fadeOutLong(); + _graphicsMan->_scrollStatus = 0; + _graphicsMan->loadImage("intro2"); + _graphicsMan->scrollScreen(0); + _animMan->loadAnim("INTRO2"); + _graphicsMan->displayAllBob(); + _soundMan->playSound(23); + _objectsMan->stopBobAnimation(3); + _objectsMan->stopBobAnimation(5); + _graphicsMan->_scrollOffset = 0; + _graphicsMan->setColorPercentage(252, 100, 100, 100); + _graphicsMan->setColorPercentage(253, 100, 100, 100); + _graphicsMan->setColorPercentage(251, 100, 100, 100); + _graphicsMan->setColorPercentage(254, 0, 0, 0); for (int i = 0; i <= 4; i++) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->fadeInLong(); + _graphicsMan->fadeInLong(); for (uint i = 0; i < 200 / _globals->_speed; ++i) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); - _objectsManager->setBobAnimation(3); - _soundManager->mixVoice(5, 3); - _objectsManager->stopBobAnimation(3); - _eventsManager->refreshScreenAndEvents(); - memcpy(&paletteData2, _graphicsManager->_palette, 796); + _objectsMan->setBobAnimation(3); + _soundMan->mixVoice(5, 3); + _objectsMan->stopBobAnimation(3); + _events->refreshScreenAndEvents(); + memcpy(&paletteData2, _graphicsMan->_palette, 796); - _graphicsManager->setPaletteVGA256WithRefresh(paletteData, _graphicsManager->_frontBuffer); - _graphicsManager->endDisplayBob(); + _graphicsMan->setPaletteVGA256WithRefresh(paletteData, _graphicsMan->_frontBuffer); + _graphicsMan->endDisplayBob(); - if (shouldQuit() || _eventsManager->_escKeyFl) + if (shouldQuit() || _events->_escKeyFl) return; - _soundManager->_specialSoundNum = 5; - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("ELEC.ANM", 10, 26, 200); - _soundManager->_specialSoundNum = 0; + _soundMan->_specialSoundNum = 5; + _graphicsMan->_fadingFl = true; + _animMan->playAnim("ELEC.ANM", 10, 26, 200); + _soundMan->_specialSoundNum = 0; - if (shouldQuit() || _eventsManager->_escKeyFl) + if (shouldQuit() || _events->_escKeyFl) return; - _graphicsManager->loadImage("intro2"); - _graphicsManager->scrollScreen(0); - _animationManager->loadAnim("INTRO2"); - _graphicsManager->displayAllBob(); - _soundManager->playSound(23); - _objectsManager->stopBobAnimation(3); - _objectsManager->stopBobAnimation(5); - _objectsManager->stopBobAnimation(1); - _graphicsManager->_scrollOffset = 0; - _graphicsManager->setColorPercentage(252, 100, 100, 100); - _graphicsManager->setColorPercentage(253, 100, 100, 100); - _graphicsManager->setColorPercentage(251, 100, 100, 100); - _graphicsManager->setColorPercentage(254, 0, 0, 0); + _graphicsMan->loadImage("intro2"); + _graphicsMan->scrollScreen(0); + _animMan->loadAnim("INTRO2"); + _graphicsMan->displayAllBob(); + _soundMan->playSound(23); + _objectsMan->stopBobAnimation(3); + _objectsMan->stopBobAnimation(5); + _objectsMan->stopBobAnimation(1); + _graphicsMan->_scrollOffset = 0; + _graphicsMan->setColorPercentage(252, 100, 100, 100); + _graphicsMan->setColorPercentage(253, 100, 100, 100); + _graphicsMan->setColorPercentage(251, 100, 100, 100); + _graphicsMan->setColorPercentage(254, 0, 0, 0); for (int i = 0; i <= 3; i++) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->setPaletteVGA256WithRefresh(paletteData2, _graphicsManager->_frontBuffer); + _graphicsMan->setPaletteVGA256WithRefresh(paletteData2, _graphicsMan->_frontBuffer); int introIndex = 0; - while (!shouldQuit() && !_eventsManager->_escKeyFl) { + while (!shouldQuit() && !_events->_escKeyFl) { if (introIndex == 12) { - _objectsManager->setBobAnimation(3); - _eventsManager->refreshScreenAndEvents(); - _soundManager->mixVoice(6, 3); - _eventsManager->refreshScreenAndEvents(); - _objectsManager->stopBobAnimation(3); + _objectsMan->setBobAnimation(3); + _events->refreshScreenAndEvents(); + _soundMan->mixVoice(6, 3); + _events->refreshScreenAndEvents(); + _objectsMan->stopBobAnimation(3); } - Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager->_palette[0]); + Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsMan->_palette[0]); for (int i = 1, maxPalVal = 4 * introIndex; i <= PALETTE_BLOCK_SIZE; i++) { - if (_graphicsManager->_palette[i] > maxPalVal) - _graphicsManager->_palette[i] -= maxPalVal; + if (_graphicsMan->_palette[i] > maxPalVal) + _graphicsMan->_palette[i] -= maxPalVal; } - _graphicsManager->setPaletteVGA256WithRefresh(_graphicsManager->_palette, _graphicsManager->_frontBuffer); + _graphicsMan->setPaletteVGA256WithRefresh(_graphicsMan->_palette, _graphicsMan->_frontBuffer); for (int i = 1; i < 2 * introIndex; i++) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); - _graphicsManager->setPaletteVGA256WithRefresh(paletteData2, _graphicsManager->_frontBuffer); + _graphicsMan->setPaletteVGA256WithRefresh(paletteData2, _graphicsMan->_frontBuffer); for (int i = 1; i < 20 - introIndex; i++) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); introIndex += 2; if (introIndex > 15) { - _graphicsManager->setPaletteVGA256WithRefresh(paletteData, _graphicsManager->_frontBuffer); + _graphicsMan->setPaletteVGA256WithRefresh(paletteData, _graphicsMan->_frontBuffer); for (uint j = 1; j < 100 / _globals->_speed; ++j) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); - _objectsManager->setBobAnimation(3); - _soundManager->mixVoice(7, 3); - _objectsManager->stopBobAnimation(3); + _objectsMan->setBobAnimation(3); + _soundMan->mixVoice(7, 3); + _objectsMan->stopBobAnimation(3); for (uint k = 1; k < 60 / _globals->_speed; ++k) - _eventsManager->refreshScreenAndEvents(); - _objectsManager->setBobAnimation(5); + _events->refreshScreenAndEvents(); + _objectsMan->setBobAnimation(5); for (uint l = 0; l < 20 / _globals->_speed; ++l) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); - Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager->_palette[0]); - _graphicsManager->setPaletteVGA256WithRefresh(_graphicsManager->_palette, _graphicsManager->_frontBuffer); + Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsMan->_palette[0]); + _graphicsMan->setPaletteVGA256WithRefresh(_graphicsMan->_palette, _graphicsMan->_frontBuffer); for (uint m = 0; m < 50 / _globals->_speed; ++m) { if (m == 30 / _globals->_speed) { - _objectsManager->setBobAnimation(3); - _soundManager->mixVoice(8, 3); - _objectsManager->stopBobAnimation(3); + _objectsMan->setBobAnimation(3); + _soundMan->mixVoice(8, 3); + _objectsMan->stopBobAnimation(3); } - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); } - _graphicsManager->fadeOutLong(); - _graphicsManager->endDisplayBob(); - _soundManager->playSound(3); - _soundManager->_specialSoundNum = 1; - _animationManager->setClearAnimFlag(); - _animationManager->playAnim("INTRO1.anm", 10, 24, 18); - _soundManager->_specialSoundNum = 0; - if (shouldQuit() || _eventsManager->_escKeyFl) + _graphicsMan->fadeOutLong(); + _graphicsMan->endDisplayBob(); + _soundMan->playSound(3); + _soundMan->_specialSoundNum = 1; + _animMan->setClearAnimFlag(); + _animMan->playAnim("INTRO1.anm", 10, 24, 18); + _soundMan->_specialSoundNum = 0; + if (shouldQuit() || _events->_escKeyFl) return; - _animationManager->playAnim("INTRO2.anm", 10, 24, 18); - if (shouldQuit() || _eventsManager->_escKeyFl) + _animMan->playAnim("INTRO2.anm", 10, 24, 18); + if (shouldQuit() || _events->_escKeyFl) return; - _animationManager->playAnim("INTRO3.anm", 10, 24, 200); - if (shouldQuit() || _eventsManager->_escKeyFl) + _animMan->playAnim("INTRO3.anm", 10, 24, 200); + if (shouldQuit() || _events->_escKeyFl) return; - _graphicsManager->_fadingFl = true; - _animationManager->unsetClearAnimFlag(); - _animationManager->playAnim("J4.anm", 12, 12, 1000); + _graphicsMan->_fadingFl = true; + _animMan->unsetClearAnimFlag(); + _animMan->playAnim("J4.anm", 12, 12, 1000); break; } } - _eventsManager->_escKeyFl = false; + _events->_escKeyFl = false; } /** @@ -1868,17 +1868,17 @@ void HopkinsEngine::displayNotAvailable() { return; if (_globals->_language == LANG_FR) - _graphicsManager->loadImage("ndfr"); + _graphicsMan->loadImage("ndfr"); else - _graphicsManager->loadImage("nduk"); + _graphicsMan->loadImage("nduk"); - _graphicsManager->fadeInLong(); - if (_soundManager->_voiceOffFl) - _eventsManager->delay(500); + _graphicsMan->fadeInLong(); + if (_soundMan->_voiceOffFl) + _events->delay(500); else - _soundManager->mixVoice(628, 4); + _soundMan->mixVoice(628, 4); - _graphicsManager->fadeOutLong(); + _graphicsMan->fadeOutLong(); _globals->_exitId = 4; } @@ -1890,199 +1890,199 @@ void HopkinsEngine::handleNotAvailable(int nextScreen) { } void HopkinsEngine::displayEndDemo() { - _soundManager->playSound(28); + _soundMan->playSound(28); if (_globals->_language == LANG_FR) - _graphicsManager->loadImage("endfr"); + _graphicsMan->loadImage("endfr"); else - _graphicsManager->loadImage("enduk"); + _graphicsMan->loadImage("enduk"); - _graphicsManager->fadeInLong(); - _eventsManager->delay(1500); - _graphicsManager->fadeOutLong(); + _graphicsMan->fadeInLong(); + _events->delay(1500); + _graphicsMan->fadeOutLong(); _globals->_exitId = 0; } void HopkinsEngine::bombExplosion() { - _graphicsManager->_lineNbr = SCREEN_WIDTH; - _graphicsManager->setScreenWidth(SCREEN_WIDTH); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); + _graphicsMan->_lineNbr = SCREEN_WIDTH; + _graphicsMan->setScreenWidth(SCREEN_WIDTH); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); _globals->_eventMode = EVENTMODE_IGNORE; - _soundManager->_specialSoundNum = 199; - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); - _soundManager->_specialSoundNum = 0; - _graphicsManager->loadImage("IM15"); - _animationManager->loadAnim("ANIM15"); - _graphicsManager->displayAllBob(); - _objectsManager->stopBobAnimation(7); + _soundMan->_specialSoundNum = 199; + _graphicsMan->_fadingFl = true; + _animMan->playAnim("BOMBE2A.ANM", 50, 14, 500); + _soundMan->_specialSoundNum = 0; + _graphicsMan->loadImage("IM15"); + _animMan->loadAnim("ANIM15"); + _graphicsMan->displayAllBob(); + _objectsMan->stopBobAnimation(7); for (int idx = 0; idx < 5; ++idx) { - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); } - _graphicsManager->fadeInLong(); - _eventsManager->mouseOff(); + _graphicsMan->fadeInLong(); + _events->mouseOff(); for (int idx = 0; idx < 20; ++idx) { - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); } _globals->_introSpeechOffFl = true; - _talkManager->startStaticCharacterDialogue("vire.pe2"); + _talkMan->startStaticCharacterDialogue("vire.pe2"); _globals->_introSpeechOffFl = false; - _objectsManager->setBobAnimation(7); + _objectsMan->setBobAnimation(7); for (int idx = 0; idx < 100; ++idx) { - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); } - _graphicsManager->fadeOutLong(); - _graphicsManager->endDisplayBob(); + _graphicsMan->fadeOutLong(); + _graphicsMan->endDisplayBob(); _globals->_eventMode = EVENTMODE_DEFAULT; _globals->_exitId = 151; } void HopkinsEngine::restoreSystem() { quitGame(); - _eventsManager->refreshEvents(); + _events->refreshEvents(); } void HopkinsEngine::endLinuxDemo() { _globals->_linuxEndDemoFl = true; - _graphicsManager->resetDirtyRects(); - _objectsManager->_forestFl = false; - _eventsManager->_breakoutFl = false; + _graphicsMan->resetDirtyRects(); + _objectsMan->_forestFl = false; + _events->_breakoutFl = false; _globals->_disableInventFl = true; - _graphicsManager->loadImage("BOX"); - _soundManager->playSound(28); - _graphicsManager->fadeInLong(); - _eventsManager->mouseOn(); - _eventsManager->changeMouseCursor(0); - _eventsManager->_mouseCursorId = 0; - _eventsManager->_mouseSpriteId = 0; + _graphicsMan->loadImage("BOX"); + _soundMan->playSound(28); + _graphicsMan->fadeInLong(); + _events->mouseOn(); + _events->changeMouseCursor(0); + _events->_mouseCursorId = 0; + _events->_mouseSpriteId = 0; bool mouseClicked = false; do { - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); - if (_eventsManager->getMouseButton() == 1) + if (_events->getMouseButton() == 1) mouseClicked = true; } while (!mouseClicked && !shouldQuit()); // Original tried to open a web browser link here. Since ScummVM doesn't support // that, it's being skipped in favor of simply exiting - _graphicsManager->fadeOutLong(); + _graphicsMan->fadeOutLong(); } void HopkinsEngine::handleConflagration() { _globals->_disableInventFl = true; _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->loadImage("IM71"); - _animationManager->loadAnim("ANIM71"); - _graphicsManager->setColorPercentage(252, 100, 100, 100); - _graphicsManager->setColorPercentage(253, 100, 100, 100); - _graphicsManager->setColorPercentage(251, 100, 100, 100); - _graphicsManager->setColorPercentage(254, 0, 0, 0); - _graphicsManager->displayAllBob(); + _graphicsMan->loadImage("IM71"); + _animMan->loadAnim("ANIM71"); + _graphicsMan->setColorPercentage(252, 100, 100, 100); + _graphicsMan->setColorPercentage(253, 100, 100, 100); + _graphicsMan->setColorPercentage(251, 100, 100, 100); + _graphicsMan->setColorPercentage(254, 0, 0, 0); + _graphicsMan->displayAllBob(); for (int cpt = 0; cpt <= 4; cpt++) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); - _graphicsManager->fadeInLong(); + _graphicsMan->fadeInLong(); _globals->_eventMode = EVENTMODE_IGNORE; for (int cpt = 0; cpt <= 249; cpt++) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); _globals->_introSpeechOffFl = true; - _talkManager->startAnimatedCharacterDialogue("SVGARD1.pe2"); + _talkMan->startAnimatedCharacterDialogue("SVGARD1.pe2"); _globals->_introSpeechOffFl = false; for (int cpt = 0; cpt <= 49; cpt++) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); - _graphicsManager->fadeOutLong(); - _graphicsManager->endDisplayBob(); + _graphicsMan->fadeOutLong(); + _graphicsMan->endDisplayBob(); _globals->_saveData->_data[svBaseFireFl] = 1; _globals->_disableInventFl = false; } void HopkinsEngine::playSubmarineCutscene() { _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->_lineNbr = SCREEN_WIDTH; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _soundManager->playSound(25); - _animationManager->setClearAnimFlag(); - _animationManager->playAnim("base00a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("base05a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("base10a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("base20a.anm", 10, 18, 18); + _graphicsMan->_lineNbr = SCREEN_WIDTH; + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _soundMan->playSound(25); + _animMan->setClearAnimFlag(); + _animMan->playAnim("base00a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("base05a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("base10a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("base20a.anm", 10, 18, 18); // CHECKME: The original code was doing the opposite test, which was a bug. - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("base30a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("base40a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("base50a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("OC00a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("OC05a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("OC10a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("OC20a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) { - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("OC30a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("base30a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("base40a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("base50a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("OC00a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("OC05a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("OC10a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("OC20a.anm", 10, 18, 18); + if (!_events->_escKeyFl) { + _graphicsMan->_fadingFl = true; + _animMan->playAnim("OC30a.anm", 10, 18, 18); } - _eventsManager->_escKeyFl = false; - _animationManager->unsetClearAnimFlag(); + _events->_escKeyFl = false; + _animMan->unsetClearAnimFlag(); _globals->_exitId = 85; } void HopkinsEngine::playUnderwaterBaseCutscene() { - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _soundManager->playSound(26); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _soundMan->playSound(26); _globals->_eventMode = EVENTMODE_IGNORE; _globals->_disableInventFl = true; - _graphicsManager->_fadingFl = true; - _animationManager->playSequence("abase.seq", 50, 15, 50, false, false, true); - _graphicsManager->loadImage("IM92"); - _animationManager->loadAnim("ANIM92"); - _graphicsManager->displayAllBob(); - _objectsManager->loadLinkFile("IM92"); + _graphicsMan->_fadingFl = true; + _animMan->playSequence("abase.seq", 50, 15, 50, false, false, true); + _graphicsMan->loadImage("IM92"); + _animMan->loadAnim("ANIM92"); + _graphicsMan->displayAllBob(); + _objectsMan->loadLinkFile("IM92"); /* for (int cpt = 0; cpt <= 4 && !shouldQuit(); cpt++) _eventsManager->refreshScreenAndEvents(); */ - _graphicsManager->fadeInLong(); - _objectsManager->enableHidingBehavior(); + _graphicsMan->fadeInLong(); + _objectsMan->enableHidingBehavior(); do - _eventsManager->refreshScreenAndEvents(); - while (!shouldQuit() && _objectsManager->getBobAnimDataIdx(8) != 22); + _events->refreshScreenAndEvents(); + while (!shouldQuit() && _objectsMan->getBobAnimDataIdx(8) != 22); if (!shouldQuit()) { - _graphicsManager->fadeOutLong(); - _graphicsManager->endDisplayBob(); - _objectsManager->resetHidingItems(); + _graphicsMan->fadeOutLong(); + _graphicsMan->endDisplayBob(); + _objectsMan->resetHidingItems(); _globals->_disableInventFl = false; _globals->_exitId = 93; _globals->_eventMode = EVENTMODE_DEFAULT; @@ -2091,198 +2091,198 @@ void HopkinsEngine::playUnderwaterBaseCutscene() { void HopkinsEngine::playEnding() { _globals->_characterSpriteBuf = _globals->freeMemory(_globals->_characterSpriteBuf); - _dialogsManager->disableInvent(); + _dialog->disableInvent(); _globals->_disableInventFl = true; - _graphicsManager->_scrollOffset = 0; + _graphicsMan->_scrollOffset = 0; _globals->_cityMapEnabledFl = false; _globals->_eventMode = EVENTMODE_IGNORE; - _soundManager->playSound(26); - _linesManager->_route = NULL; + _soundMan->playSound(26); + _linesMan->_route = NULL; _globals->_freezeCharacterFl = true; _globals->_exitId = 0; - _soundManager->loadSample(1, "SOUND90.WAV"); - _graphicsManager->loadImage("IM100"); - _animationManager->loadAnim("ANIM100"); - _graphicsManager->displayAllBob(); - _eventsManager->mouseOn(); - _objectsManager->stopBobAnimation(7); - _objectsManager->stopBobAnimation(8); - _objectsManager->stopBobAnimation(9); - _graphicsManager->setColorPercentage(252, 100, 100, 100); - _graphicsManager->setColorPercentage(253, 100, 100, 100); - _graphicsManager->setColorPercentage(251, 100, 100, 100); - _graphicsManager->setColorPercentage(254, 0, 0, 0); - _eventsManager->changeMouseCursor(0); + _soundMan->loadSample(1, "SOUND90.WAV"); + _graphicsMan->loadImage("IM100"); + _animMan->loadAnim("ANIM100"); + _graphicsMan->displayAllBob(); + _events->mouseOn(); + _objectsMan->stopBobAnimation(7); + _objectsMan->stopBobAnimation(8); + _objectsMan->stopBobAnimation(9); + _graphicsMan->setColorPercentage(252, 100, 100, 100); + _graphicsMan->setColorPercentage(253, 100, 100, 100); + _graphicsMan->setColorPercentage(251, 100, 100, 100); + _graphicsMan->setColorPercentage(254, 0, 0, 0); + _events->changeMouseCursor(0); for (int cpt = 0; cpt <= 4; cpt++) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); - _graphicsManager->fadeInLong(); + _graphicsMan->fadeInLong(); _globals->_eventMode = EVENTMODE_IGNORE; do - _eventsManager->refreshScreenAndEvents(); - while (_objectsManager->getBobAnimDataIdx(6) != 54); + _events->refreshScreenAndEvents(); + while (_objectsMan->getBobAnimDataIdx(6) != 54); _globals->_introSpeechOffFl = true; - _talkManager->startAnimatedCharacterDialogue("GM4.PE2"); + _talkMan->startAnimatedCharacterDialogue("GM4.PE2"); _globals->_disableInventFl = true; - _objectsManager->stopBobAnimation(6); - _objectsManager->stopBobAnimation(10); - _objectsManager->setBobAnimation(9); - _objectsManager->setBobAnimation(7); + _objectsMan->stopBobAnimation(6); + _objectsMan->stopBobAnimation(10); + _objectsMan->setBobAnimation(9); + _objectsMan->setBobAnimation(7); do - _eventsManager->refreshScreenAndEvents(); - while (_objectsManager->getBobAnimDataIdx(7) != 54); + _events->refreshScreenAndEvents(); + while (_objectsMan->getBobAnimDataIdx(7) != 54); - _soundManager->playSample(1); + _soundMan->playSample(1); do - _eventsManager->refreshScreenAndEvents(); - while (_objectsManager->getBobAnimDataIdx(7) != 65); + _events->refreshScreenAndEvents(); + while (_objectsMan->getBobAnimDataIdx(7) != 65); _globals->_introSpeechOffFl = true; - _talkManager->startAnimatedCharacterDialogue("DUELB4.PE2"); - _eventsManager->mouseOff(); + _talkMan->startAnimatedCharacterDialogue("DUELB4.PE2"); + _events->mouseOff(); _globals->_disableInventFl = true; do - _eventsManager->refreshScreenAndEvents(); - while (_objectsManager->getBobAnimDataIdx(7) != 72); + _events->refreshScreenAndEvents(); + while (_objectsMan->getBobAnimDataIdx(7) != 72); _globals->_introSpeechOffFl = true; - _talkManager->startAnimatedCharacterDialogue("DUELH1.PE2"); + _talkMan->startAnimatedCharacterDialogue("DUELH1.PE2"); do - _eventsManager->refreshScreenAndEvents(); - while (_objectsManager->getBobAnimDataIdx(7) != 81); + _events->refreshScreenAndEvents(); + while (_objectsMan->getBobAnimDataIdx(7) != 81); _globals->_introSpeechOffFl = true; - _talkManager->startAnimatedCharacterDialogue("DUELB5.PE2"); + _talkMan->startAnimatedCharacterDialogue("DUELB5.PE2"); do - _eventsManager->refreshScreenAndEvents(); - while (_objectsManager->getBobAnimDataIdx(7) != 120); + _events->refreshScreenAndEvents(); + while (_objectsMan->getBobAnimDataIdx(7) != 120); - _objectsManager->stopBobAnimation(7); + _objectsMan->stopBobAnimation(7); if (_globals->_saveData->_data[svGameWonFl] == 1) { - _soundManager->_specialSoundNum = 200; - _soundManager->_skipRefreshFl = true; - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("BERM.ANM", 100, 24, 300); - _graphicsManager->endDisplayBob(); - _soundManager->removeSample(1); - _graphicsManager->loadImage("PLAN3"); - _graphicsManager->fadeInLong(); - - _eventsManager->_rateCounter = 0; - if (!_eventsManager->_escKeyFl) { + _soundMan->_specialSoundNum = 200; + _soundMan->_skipRefreshFl = true; + _graphicsMan->_fadingFl = true; + _animMan->playAnim("BERM.ANM", 100, 24, 300); + _graphicsMan->endDisplayBob(); + _soundMan->removeSample(1); + _graphicsMan->loadImage("PLAN3"); + _graphicsMan->fadeInLong(); + + _events->_rateCounter = 0; + if (!_events->_escKeyFl) { do - _eventsManager->refreshEvents(); - while (_eventsManager->_rateCounter < 2000 / _globals->_speed && !_eventsManager->_escKeyFl); + _events->refreshEvents(); + while (_events->_rateCounter < 2000 / _globals->_speed && !_events->_escKeyFl); } - _eventsManager->_escKeyFl = false; - _graphicsManager->fadeOutLong(); + _events->_escKeyFl = false; + _graphicsMan->fadeOutLong(); _globals->_eventMode = EVENTMODE_IGNORE; - _soundManager->_specialSoundNum = 0; - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("JOUR2A.anm", 12, 12, 1000); - _soundManager->playSound(11); - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - _animationManager->playAnim("FF1a.anm", 18, 18, 9); - _animationManager->playAnim("FF1a.anm", 9, 18, 9); - _animationManager->playAnim("FF1a.anm", 9, 18, 18); - _animationManager->playAnim("FF1a.anm", 9, 18, 9); - _animationManager->playAnim("FF2a.anm", 24, 24, 100); + _soundMan->_specialSoundNum = 0; + _graphicsMan->_fadingFl = true; + _animMan->playAnim("JOUR2A.anm", 12, 12, 1000); + _soundMan->playSound(11); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + _animMan->playAnim("FF1a.anm", 18, 18, 9); + _animMan->playAnim("FF1a.anm", 9, 18, 9); + _animMan->playAnim("FF1a.anm", 9, 18, 18); + _animMan->playAnim("FF1a.anm", 9, 18, 9); + _animMan->playAnim("FF2a.anm", 24, 24, 100); displayCredits(); _globals->_eventMode = EVENTMODE_DEFAULT; _globals->_exitId = 300; - _dialogsManager->enableInvent(); + _dialog->enableInvent(); _globals->_disableInventFl = false; } else { - _soundManager->_specialSoundNum = 200; - _soundManager->_skipRefreshFl = true; - _animationManager->playAnim2("BERM.ANM", 100, 24, 300); - _objectsManager->stopBobAnimation(7); - _objectsManager->setBobAnimation(8); + _soundMan->_specialSoundNum = 200; + _soundMan->_skipRefreshFl = true; + _animMan->playAnim2("BERM.ANM", 100, 24, 300); + _objectsMan->stopBobAnimation(7); + _objectsMan->setBobAnimation(8); _globals->_introSpeechOffFl = true; - _talkManager->startAnimatedCharacterDialogue("GM5.PE2"); + _talkMan->startAnimatedCharacterDialogue("GM5.PE2"); _globals->_disableInventFl = true; do - _eventsManager->refreshScreenAndEvents(); - while (_objectsManager->getBobAnimDataIdx(8) != 5); + _events->refreshScreenAndEvents(); + while (_objectsMan->getBobAnimDataIdx(8) != 5); - _soundManager->directPlayWav("SOUND41.WAV"); + _soundMan->directPlayWav("SOUND41.WAV"); do - _eventsManager->refreshScreenAndEvents(); - while (_objectsManager->getBobAnimDataIdx(8) != 21); + _events->refreshScreenAndEvents(); + while (_objectsMan->getBobAnimDataIdx(8) != 21); - _graphicsManager->fadeOutLong(); - _graphicsManager->endDisplayBob(); - _soundManager->removeSample(1); - _soundManager->playSound(16); + _graphicsMan->fadeOutLong(); + _graphicsMan->endDisplayBob(); + _soundMan->removeSample(1); + _soundMan->playSound(16); _globals->_eventMode = EVENTMODE_IGNORE; - _soundManager->_specialSoundNum = 0; - _dialogsManager->enableInvent(); + _soundMan->_specialSoundNum = 0; + _dialog->enableInvent(); _globals->_disableInventFl = false; - _animationManager->playAnim("JOUR4A.anm", 12, 12, 1000); + _animMan->playAnim("JOUR4A.anm", 12, 12, 1000); _globals->_eventMode = EVENTMODE_DEFAULT; _globals->_exitId = 300; } - _globals->_characterSpriteBuf = _fileManager->loadFile("PERSO.SPR"); + _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR"); _globals->_characterType = 0; _globals->_eventMode = EVENTMODE_DEFAULT; } void HopkinsEngine::playPlaneCutscene() { - _soundManager->playSound(28); + _soundMan->playSound(28); _globals->_eventMode = EVENTMODE_IGNORE; - _graphicsManager->lockScreen(); - _graphicsManager->clearScreen(); - _graphicsManager->unlockScreen(); - _graphicsManager->clearPalette(); - - _animationManager->unsetClearAnimFlag(); - _animationManager->playAnim("aerop00a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("serop10a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("aerop20a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("aerop30a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("aerop40a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("aerop50a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("aerop60a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("aerop70a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("trans00a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("trans10a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("trans15a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("trans20a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("trans30a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) - _animationManager->playAnim("trans40a.anm", 10, 18, 18); - if (!_eventsManager->_escKeyFl) { - _graphicsManager->_fadingFl = true; - _animationManager->playAnim("PARA00a.anm", 9, 9, 9); + _graphicsMan->lockScreen(); + _graphicsMan->clearScreen(); + _graphicsMan->unlockScreen(); + _graphicsMan->clearPalette(); + + _animMan->unsetClearAnimFlag(); + _animMan->playAnim("aerop00a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("serop10a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("aerop20a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("aerop30a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("aerop40a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("aerop50a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("aerop60a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("aerop70a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("trans00a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("trans10a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("trans15a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("trans20a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("trans30a.anm", 10, 18, 18); + if (!_events->_escKeyFl) + _animMan->playAnim("trans40a.anm", 10, 18, 18); + if (!_events->_escKeyFl) { + _graphicsMan->_fadingFl = true; + _animMan->playAnim("PARA00a.anm", 9, 9, 9); } - _eventsManager->_escKeyFl = false; - _animationManager->unsetClearAnimFlag(); + _events->_escKeyFl = false; + _animMan->unsetClearAnimFlag(); } void HopkinsEngine::loadBaseMap() { @@ -2291,7 +2291,7 @@ void HopkinsEngine::loadBaseMap() { if (f.exists(filename)) { // PBASE file exists, so go ahead and load it - _graphicsManager->loadImage("PBASE"); + _graphicsMan->loadImage("PBASE"); } else { // PBASE file doesn't exist, so draw a substitute screen drawBaseMap(); @@ -2299,7 +2299,7 @@ void HopkinsEngine::loadBaseMap() { } void HopkinsEngine::drawBaseMap() { - memset(_graphicsManager->_backBuffer, 0, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); + memset(_graphicsMan->_backBuffer, 0, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); // List of rectangle areas to draw for exit points const int rects[] = { @@ -2317,16 +2317,16 @@ void HopkinsEngine::drawBaseMap() { Common::Rect r(rectP[0], rectP[1], rectP[2], rectP[3]); for (int yp = r.top; yp <= r.bottom; ++yp) { - byte *pDest = _graphicsManager->_backBuffer + yp * SCREEN_WIDTH + r.left; + byte *pDest = _graphicsMan->_backBuffer + yp * SCREEN_WIDTH + r.left; Common::fill(pDest, pDest + r.width(), 0xff); } } // Copy the calculated screen - memcpy(_graphicsManager->_frontBuffer, _graphicsManager->_backBuffer, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); + memcpy(_graphicsMan->_frontBuffer, _graphicsMan->_backBuffer, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); // Write some explanatory text - _fontManager->displayText(40, 200, "ScummVM base map - select a square for different rooms", 255); + _fontMan->displayText(40, 200, "ScummVM base map - select a square for different rooms", 255); } int HopkinsEngine::handleBaseMap() { @@ -2336,21 +2336,21 @@ int HopkinsEngine::handleBaseMap() { loadBaseMap(); // Set needed colors - _graphicsManager->setColorPercentage(252, 100, 100, 100); - _graphicsManager->setColorPercentage(253, 100, 100, 100); - _graphicsManager->setColorPercentage(251, 100, 100, 100); - _graphicsManager->setColorPercentage(254, 0, 0, 0); - _eventsManager->changeMouseCursor(0); - _graphicsManager->fadeInLong(); + _graphicsMan->setColorPercentage(252, 100, 100, 100); + _graphicsMan->setColorPercentage(253, 100, 100, 100); + _graphicsMan->setColorPercentage(251, 100, 100, 100); + _graphicsMan->setColorPercentage(254, 0, 0, 0); + _events->changeMouseCursor(0); + _graphicsMan->fadeInLong(); bool loopCond = false; int zone; do { if (shouldQuit()) return 0; - int mouseButton = _eventsManager->getMouseButton(); - int posX = _eventsManager->getMouseX(); - int posY = _eventsManager->getMouseY(); + int mouseButton = _events->getMouseButton(); + int posX = _events->getMouseX(); + int posY = _events->getMouseY(); zone = 0; if ((posX - 181 <= 16) && (posY - 66 <= 22) && (posX - 181 >= 0) && (posY - 66 >= 0)) @@ -2371,22 +2371,22 @@ int HopkinsEngine::handleBaseMap() { (posX - 106 >= 0) && (posY - 267 >= 0)) zone = 6; if (zone) { - _eventsManager->changeMouseCursor(4); + _events->changeMouseCursor(4); _globals->_baseMapColor += 25; if (_globals->_baseMapColor > 100) _globals->_baseMapColor = 0; - _graphicsManager->setColorPercentage2(251, _globals->_baseMapColor, _globals->_baseMapColor, _globals->_baseMapColor); + _graphicsMan->setColorPercentage2(251, _globals->_baseMapColor, _globals->_baseMapColor, _globals->_baseMapColor); } else { - _eventsManager->changeMouseCursor(0); - _graphicsManager->setColorPercentage2(251, 100, 100, 100); + _events->changeMouseCursor(0); + _graphicsMan->setColorPercentage2(251, 100, 100, 100); } - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); if ((mouseButton == 1) && zone) loopCond = true; } while (!loopCond); _globals->_disableInventFl = false; - _graphicsManager->fadeOutLong(); + _graphicsMan->fadeOutLong(); int result; switch (zone) { @@ -2421,13 +2421,13 @@ void HopkinsEngine::loadCredits() { byte *bufPtr; switch (_globals->_language) { case LANG_EN: - bufPtr = _fileManager->loadFile("CREAN.TXT"); + bufPtr = _fileIO->loadFile("CREAN.TXT"); break; case LANG_FR: - bufPtr = _fileManager->loadFile("CREFR.TXT"); + bufPtr = _fileIO->loadFile("CREFR.TXT"); break; case LANG_SP: - bufPtr = _fileManager->loadFile("CREES.TXT"); + bufPtr = _fileIO->loadFile("CREES.TXT"); break; default: error("Unhandled language"); @@ -2476,7 +2476,7 @@ void HopkinsEngine::displayCredits(int startPosY, byte *buffer, char color) { if (!curChar) break; if (curChar > 31) - strWidth += _objectsManager->getWidth(_fontManager->_font, curChar - 32); + strWidth += _objectsMan->getWidth(_fontMan->_font, curChar - 32); } int startPosX = 320 - strWidth / 2; int endPosX = strWidth + startPosX; @@ -2494,16 +2494,16 @@ void HopkinsEngine::displayCredits(int startPosY, byte *buffer, char color) { _globals->_creditsEndY = MAX(_globals->_creditsEndY, endPosY); Common::String message = Common::String((char *)buffer); - _fontManager->displayText(startPosX, startPosY, message, color); + _fontMan->displayText(startPosX, startPosY, message, color); } void HopkinsEngine::displayCredits() { loadCredits(); _globals->_creditsPosY = 436; - _graphicsManager->loadImage("GENERIC"); - _graphicsManager->fadeInLong(); - _soundManager->playSound(28); - _eventsManager->_mouseFl = false; + _graphicsMan->loadImage("GENERIC"); + _graphicsMan->fadeInLong(); + _soundMan->playSound(28); + _events->_mouseFl = false; _globals->_eventMode = EVENTMODE_CREDITS; _globals->_creditsStartX = _globals->_creditsEndX = _globals->_creditsStartY = _globals->_creditsEndY = -1; int soundId = 28; @@ -2537,52 +2537,52 @@ void HopkinsEngine::displayCredits() { } --_globals->_creditsPosY; if (_globals->_creditsStartX != -1 || _globals->_creditsEndX != -1 || _globals->_creditsStartY != -1 || _globals->_creditsEndY != -1) { - _eventsManager->refreshScreenAndEvents(); - _graphicsManager->copySurface(_graphicsManager->_backBuffer, 60, 50, 520, 380, _graphicsManager->_frontBuffer, 60, 50); + _events->refreshScreenAndEvents(); + _graphicsMan->copySurface(_graphicsMan->_backBuffer, 60, 50, 520, 380, _graphicsMan->_frontBuffer, 60, 50); } else { - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); } if (_globals->_creditsItem[_globals->_creditsLineNumb - 1]._linePosY <= 39) { _globals->_creditsPosY = 440; ++soundId; if (soundId > 31) soundId = 28; - _soundManager->playSound(soundId); + _soundMan->playSound(soundId); } _globals->_creditsStartX = -1; _globals->_creditsEndX = -1; _globals->_creditsStartY = -1; _globals->_creditsEndY = -1; - } while ((_eventsManager->getMouseButton() != 1) && (!shouldQuit())); - _graphicsManager->fadeOutLong(); + } while ((_events->getMouseButton() != 1) && (!shouldQuit())); + _graphicsMan->fadeOutLong(); _globals->_eventMode = EVENTMODE_IGNORE; - _eventsManager->_mouseFl = true; + _events->_mouseFl = true; } void HopkinsEngine::handleOceanMouseEvents() { - _fontManager->hideText(9); - if (_eventsManager->_mouseCursorId != 16) + _fontMan->hideText(9); + if (_events->_mouseCursorId != 16) return; - _eventsManager->getMouseX(); - if (_objectsManager->_zoneNum <= 0) + _events->getMouseX(); + if (_objectsMan->_zoneNum <= 0) return; - int oldPosX = _eventsManager->getMouseX(); - int oldPosY = _eventsManager->getMouseY(); + int oldPosX = _events->getMouseX(); + int oldPosY = _events->getMouseY(); bool displAnim = false; int oldX; - switch (_objectsManager->_zoneNum) { + switch (_objectsMan->_zoneNum) { case 1: switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "27,26,25,24,23,22,21,20,19,18,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "27,26,25,24,23,22,21,20,19,18,-1,", 6, false); break; case DIR_RIGHT: - _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "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->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "9,10,11,12,13,14,15,16,17,18,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "9,10,11,12,13,14,15,16,17,18,-1,", 6, false); break; default: break; @@ -2590,7 +2590,7 @@ void HopkinsEngine::handleOceanMouseEvents() { _globals->_oceanDirection = DIR_LEFT; _globals->_exitId = 1; - oldX = _objectsManager->getSpriteX(0); + oldX = _objectsMan->getSpriteX(0); for (;;) { if (_globals->_speed == 1) oldX -= 2; @@ -2598,10 +2598,10 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX -= 4; else if (_globals->_speed == 3) oldX -= 6; - _objectsManager->setSpriteX(0, oldX); + _objectsMan->setSpriteX(0, oldX); setSubmarineSprites(); - _eventsManager->refreshScreenAndEvents(); - if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) { + _events->refreshScreenAndEvents(); + if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY) { displAnim = true; break; } @@ -2613,20 +2613,20 @@ void HopkinsEngine::handleOceanMouseEvents() { case 2: switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "27,28,29,30,31,32,33,34,35,36,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "27,28,29,30,31,32,33,34,35,36,-1,", 6, false); break; case DIR_DOWN: - _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "9,8,7,6,5,4,3,2,1,0,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "9,8,7,6,5,4,3,2,1,0,-1,", 6, false); break; case DIR_LEFT: - _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "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 = _objectsMan->getSpriteX(0); for (;;) { if (_globals->_speed == 1) oldX += 2; @@ -2634,10 +2634,10 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX += 4; else if (_globals->_speed == 3) oldX += 6; - _objectsManager->setSpriteX(0, oldX); + _objectsMan->setSpriteX(0, oldX); setSubmarineSprites(); - _eventsManager->refreshScreenAndEvents(); - if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) { + _events->refreshScreenAndEvents(); + if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY) { displAnim = true; break; } @@ -2648,7 +2648,7 @@ void HopkinsEngine::handleOceanMouseEvents() { case 3: switch (_globals->_oceanDirection) { case DIR_RIGHT: - oldX = _objectsManager->getSpriteX(0); + oldX = _objectsMan->getSpriteX(0); do { if (_globals->_speed == 1) oldX += 2; @@ -2656,22 +2656,22 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX += 4; else if (_globals->_speed == 3) oldX += 6; - _objectsManager->setSpriteX(0, oldX); + _objectsMan->setSpriteX(0, oldX); setSubmarineSprites(); - _eventsManager->refreshScreenAndEvents(); - if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) { + _events->refreshScreenAndEvents(); + if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY) { displAnim = true; break; } } while (oldX <= 235); if (!displAnim) - _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "36,35,34,33,32,31,30,29,28,27,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "36,35,34,33,32,31,30,29,28,27,-1,", 6, false); break; case DIR_DOWN: - _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "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 = _objectsMan->getSpriteX(0); do { if (_globals->_speed == 1) oldX -= 2; @@ -2679,16 +2679,16 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX -= 4; else if (_globals->_speed == 3) oldX -= 6; - _objectsManager->setSpriteX(0, oldX); + _objectsMan->setSpriteX(0, oldX); setSubmarineSprites(); - _eventsManager->refreshScreenAndEvents(); - if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) { + _events->refreshScreenAndEvents(); + if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY) { displAnim = true; break; } } while (oldX > 236); if (!displAnim) - _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "18,19,20,21,22,23,24,25,26,27,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "18,19,20,21,22,23,24,25,26,27,-1,", 6, false); break; default: break; @@ -2699,10 +2699,10 @@ void HopkinsEngine::handleOceanMouseEvents() { case 4: switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "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 = _objectsMan->getSpriteX(0); do { if (_globals->_speed == 1) oldX += 2; @@ -2710,19 +2710,19 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX += 4; else if (_globals->_speed == 3) oldX += 6; - _objectsManager->setSpriteX(0, oldX); + _objectsMan->setSpriteX(0, oldX); setSubmarineSprites(); - _eventsManager->refreshScreenAndEvents(); - if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) { + _events->refreshScreenAndEvents(); + if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY) { displAnim = true; break; } } while (oldX <= 235); if (!displAnim) - _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "0,1,2,3,4,5,6,7,8,9,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "0,1,2,3,4,5,6,7,8,9,-1,", 6, false); break; case DIR_LEFT: - oldX = _objectsManager->getSpriteX(0); + oldX = _objectsMan->getSpriteX(0); for (;;) { if (_globals->_speed == 1) oldX -= 2; @@ -2730,15 +2730,15 @@ void HopkinsEngine::handleOceanMouseEvents() { oldX -= 4; else if (_globals->_speed == 3) oldX -= 6; - _objectsManager->setSpriteX(0, oldX); + _objectsMan->setSpriteX(0, oldX); setSubmarineSprites(); - _eventsManager->refreshScreenAndEvents(); - if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) + _events->refreshScreenAndEvents(); + if (_events->getMouseButton() == 1 && oldPosX == _events->getMouseX() && _events->getMouseY() == oldPosY) break; if (oldX <= 236) { if (!displAnim) - _objectsManager->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "18,17,16,15,14,13,12,11,10,9,-1,", 6, false); + _objectsMan->showSpecialActionAnimationWithFlip(_globals->_characterSpriteBuf, "18,17,16,15,14,13,12,11,10,9,-1,", 6, false); break; } } @@ -2755,16 +2755,16 @@ void HopkinsEngine::handleOceanMouseEvents() { void HopkinsEngine::setSubmarineSprites() { switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager->setSpriteIndex(0, 27); + _objectsMan->setSpriteIndex(0, 27); break; case DIR_RIGHT: - _objectsManager->setSpriteIndex(0, 0); + _objectsMan->setSpriteIndex(0, 0); break; case DIR_DOWN: - _objectsManager->setSpriteIndex(0, 9); + _objectsMan->setSpriteIndex(0, 9); break; case DIR_LEFT: - _objectsManager->setSpriteIndex(0, 18); + _objectsMan->setSpriteIndex(0, 18); break; default: break; @@ -2773,83 +2773,83 @@ void HopkinsEngine::setSubmarineSprites() { void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFilename, Directions defaultDirection, int16 exit1, int16 exit2, int16 exit3, int16 exit4, int16 soundId) { _globals->_cityMapEnabledFl = false; - _graphicsManager->_noFadingFl = false; + _graphicsMan->_noFadingFl = false; _globals->_freezeCharacterFl = false; _globals->_exitId = 0; _globals->_disableInventFl = true; - _soundManager->playSound(soundId); - _globals->_characterSpriteBuf = _fileManager->loadFile("VAISSEAU.SPR"); + _soundMan->playSound(soundId); + _globals->_characterSpriteBuf = _fileIO->loadFile("VAISSEAU.SPR"); if (backgroundFilename.size()) - _graphicsManager->loadImage(backgroundFilename); + _graphicsMan->loadImage(backgroundFilename); if (curExitId == 77) - _objectsManager->loadLinkFile("IM77"); + _objectsMan->loadLinkFile("IM77"); else if (curExitId == 84) - _objectsManager->loadLinkFile("IM84"); + _objectsMan->loadLinkFile("IM84"); else if (curExitId == 91) - _objectsManager->loadLinkFile("IM91"); + _objectsMan->loadLinkFile("IM91"); else - _objectsManager->loadLinkFile("ocean"); + _objectsMan->loadLinkFile("ocean"); if (!exit1) - _linesManager->disableZone(1); + _linesMan->disableZone(1); if (!exit2) - _linesManager->disableZone(2); + _linesMan->disableZone(2); if (!exit3) - _linesManager->disableZone(3); + _linesMan->disableZone(3); if (!exit4) - _linesManager->disableZone(4); + _linesMan->disableZone(4); if (_globals->_oceanDirection == DIR_NONE) _globals->_oceanDirection = defaultDirection; switch (_globals->_oceanDirection) { case DIR_UP: - _objectsManager->_characterPos.x = 236; - _objectsManager->_startSpriteIndex = 27; + _objectsMan->_characterPos.x = 236; + _objectsMan->_startSpriteIndex = 27; break; case DIR_RIGHT: - _objectsManager->_characterPos.x = -20; - _objectsManager->_startSpriteIndex = 0; + _objectsMan->_characterPos.x = -20; + _objectsMan->_startSpriteIndex = 0; break; case DIR_DOWN: - _objectsManager->_characterPos.x = 236; - _objectsManager->_startSpriteIndex = 9; + _objectsMan->_characterPos.x = 236; + _objectsMan->_startSpriteIndex = 9; break; case DIR_LEFT: - _objectsManager->_characterPos.x = 415; - _objectsManager->_startSpriteIndex = 18; + _objectsMan->_characterPos.x = 415; + _objectsMan->_startSpriteIndex = 18; break; default: break; } - _objectsManager->addStaticSprite(_globals->_characterSpriteBuf, Common::Point(_objectsManager->_characterPos.x, 110), 0, _objectsManager->_startSpriteIndex, 0, false, 0, 0); - _graphicsManager->setColorPercentage(252, 100, 100, 100); - _graphicsManager->setColorPercentage(253, 100, 100, 100); - _graphicsManager->setColorPercentage(251, 100, 100, 100); - _graphicsManager->setColorPercentage(254, 0, 0, 0); - _objectsManager->animateSprite(0); - _linesManager->_route = NULL; - _eventsManager->mouseOn(); - _eventsManager->changeMouseCursor(4); + _objectsMan->addStaticSprite(_globals->_characterSpriteBuf, Common::Point(_objectsMan->_characterPos.x, 110), 0, _objectsMan->_startSpriteIndex, 0, false, 0, 0); + _graphicsMan->setColorPercentage(252, 100, 100, 100); + _graphicsMan->setColorPercentage(253, 100, 100, 100); + _graphicsMan->setColorPercentage(251, 100, 100, 100); + _graphicsMan->setColorPercentage(254, 0, 0, 0); + _objectsMan->animateSprite(0); + _linesMan->_route = NULL; + _events->mouseOn(); + _events->changeMouseCursor(4); for (int cpt = 0; cpt <= 4; cpt++) - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); - if (!_graphicsManager->_noFadingFl) - _graphicsManager->fadeInLong(); - _graphicsManager->_noFadingFl = false; + if (!_graphicsMan->_noFadingFl) + _graphicsMan->fadeInLong(); + _graphicsMan->_noFadingFl = false; _globals->_eventMode = EVENTMODE_IGNORE; for (;;) { - int mouseButton = _eventsManager->getMouseButton(); + int mouseButton = _events->getMouseButton(); if (mouseButton && mouseButton == 1) handleOceanMouseEvents(); - _linesManager->checkZone(); + _linesMan->checkZone(); setSubmarineSprites(); - _eventsManager->refreshScreenAndEvents(); + _events->refreshScreenAndEvents(); if (_globals->_exitId || shouldQuit()) break; } @@ -2862,42 +2862,42 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi _globals->_exitId = exit3; else if (_globals->_exitId == 4) _globals->_exitId = exit4; - _graphicsManager->fadeOutLong(); - _objectsManager->removeSprite(0); - _objectsManager->clearScreen(); - _globals->_characterSpriteBuf = _fileManager->loadFile("PERSO.SPR"); + _graphicsMan->fadeOutLong(); + _objectsMan->removeSprite(0); + _objectsMan->clearScreen(); + _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR"); _globals->_characterType = 0; } void HopkinsEngine::syncSoundSettings() { Engine::syncSoundSettings(); - _soundManager->syncSoundSettings(); + _soundMan->syncSoundSettings(); } bool HopkinsEngine::displayAdultDisclaimer() { int xp, yp; int buttonIndex; - _graphicsManager->_minX = 0; - _graphicsManager->_minY = 0; - _graphicsManager->_maxX = SCREEN_WIDTH; - _graphicsManager->_maxY = SCREEN_HEIGHT - 1; - _eventsManager->_breakoutFl = false; - _objectsManager->_forestFl = false; + _graphicsMan->_minX = 0; + _graphicsMan->_minY = 0; + _graphicsMan->_maxX = SCREEN_WIDTH; + _graphicsMan->_maxY = SCREEN_HEIGHT - 1; + _events->_breakoutFl = false; + _objectsMan->_forestFl = false; _globals->_disableInventFl = true; _globals->_exitId = 0; - _graphicsManager->loadImage("ADULT"); - _graphicsManager->fadeInLong(); - _eventsManager->mouseOn(); - _eventsManager->changeMouseCursor(0); - _eventsManager->_mouseCursorId = 0; - _eventsManager->_mouseSpriteId = 0; + _graphicsMan->loadImage("ADULT"); + _graphicsMan->fadeInLong(); + _events->mouseOn(); + _events->changeMouseCursor(0); + _events->_mouseCursorId = 0; + _events->_mouseSpriteId = 0; do { - xp = _eventsManager->getMouseX(); - yp = _eventsManager->getMouseY(); + xp = _events->getMouseX(); + yp = _events->getMouseY(); buttonIndex = 0; if (xp >= 37 && xp <= 169 && yp >= 406 && yp <= 445) @@ -2905,21 +2905,21 @@ bool HopkinsEngine::displayAdultDisclaimer() { else if (xp >= 424 && xp <= 602 && yp >= 406 && yp <= 445) buttonIndex = 1; - _eventsManager->refreshScreenAndEvents(); - } while (!shouldQuit() && (buttonIndex == 0 || _eventsManager->getMouseButton() != 1)); + _events->refreshScreenAndEvents(); + } while (!shouldQuit() && (buttonIndex == 0 || _events->getMouseButton() != 1)); _globals->_disableInventFl = false; - _graphicsManager->fadeOutLong(); + _graphicsMan->fadeOutLong(); if (buttonIndex != 2) { // Quit game return false; } else { // Continue - _graphicsManager->_minX = 0; - _graphicsManager->_maxY = 20; - _graphicsManager->_maxX = SCREEN_WIDTH; - _graphicsManager->_maxY = SCREEN_HEIGHT - 20; + _graphicsMan->_minX = 0; + _graphicsMan->_maxY = 20; + _graphicsMan->_maxX = SCREEN_WIDTH; + _graphicsMan->_maxY = SCREEN_HEIGHT - 20; return true; } } |