diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/anim.cpp | 438 | ||||
-rw-r--r-- | engines/hopkins/computer.cpp | 346 | ||||
-rw-r--r-- | engines/hopkins/debugger.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/dialogs.cpp | 478 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 154 | ||||
-rw-r--r-- | engines/hopkins/font.cpp | 68 | ||||
-rw-r--r-- | engines/hopkins/globals.cpp | 16 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 104 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 2134 | ||||
-rw-r--r-- | engines/hopkins/hopkins.h | 30 | ||||
-rw-r--r-- | engines/hopkins/lines.cpp | 172 | ||||
-rw-r--r-- | engines/hopkins/menu.cpp | 62 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 1428 | ||||
-rw-r--r-- | engines/hopkins/saveload.cpp | 22 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 1808 | ||||
-rw-r--r-- | engines/hopkins/sound.cpp | 30 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 494 |
17 files changed, 3893 insertions, 3893 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 9f898a6715..888e4ea971 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -61,9 +61,9 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui if (_vm->shouldQuit()) return; - _vm->_eventsManager->mouseOff(); + _vm->_events->mouseOff(); - byte *screenP = _vm->_graphicsManager->_backBuffer; + byte *screenP = _vm->_graphicsMan->_backBuffer; Common::String tmpStr; // The Windows 95 demo only contains the interlaced version of the BOMBE1 and BOMBE2 videos @@ -77,48 +77,48 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui error("File not found - %s", tmpStr.c_str()); f.skip(6); - f.read(_vm->_graphicsManager->_palette, 800); + f.read(_vm->_graphicsMan->_palette, 800); f.skip(4); size_t nbytes = f.readUint32LE(); f.skip(14); f.read(screenP, nbytes); if (_clearAnimationFl) { - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->clearScreen(); - _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->clearScreen(); + _vm->_graphicsMan->unlockScreen(); } if (skipSeqFl) { - _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); } else { - _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager->updateScreen(); + _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsMan->updateScreen(); } - _vm->_eventsManager->_rateCounter = 0; - _vm->_eventsManager->_escKeyFl = false; - _vm->_soundManager->loadAnimSound(); + _vm->_events->_rateCounter = 0; + _vm->_events->_escKeyFl = false; + _vm->_soundMan->loadAnimSound(); if (_vm->_globals->_eventMode == 1) { // Do pre-animation delay do { - if (_vm->_eventsManager->_escKeyFl) + if (_vm->_events->_escKeyFl) break; - _vm->_eventsManager->refreshEvents(); - } while (!_vm->shouldQuit() && _vm->_eventsManager->_rateCounter < rate1); + _vm->_events->refreshEvents(); + } while (!_vm->shouldQuit() && _vm->_events->_rateCounter < rate1); } - if (!_vm->_eventsManager->_escKeyFl) { - _vm->_eventsManager->_rateCounter = 0; + if (!_vm->_events->_escKeyFl) { + _vm->_events->_rateCounter = 0; int frameNumber = 0; while (!_vm->shouldQuit()) { ++frameNumber; - _vm->_soundManager->playAnimSound(frameNumber); + _vm->_soundMan->playAnimSound(frameNumber); byte imageStr[17]; // Read frame header @@ -132,49 +132,49 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui if (_vm->_globals->_eventMode == 1) { do { - if (_vm->_eventsManager->_escKeyFl) + if (_vm->_events->_escKeyFl) break; - _vm->_eventsManager->refreshEvents(); - _vm->_soundManager->checkSoundEnd(); - } while (!_vm->shouldQuit() && _vm->_eventsManager->_rateCounter < rate2); + _vm->_events->refreshEvents(); + _vm->_soundMan->checkSoundEnd(); + } while (!_vm->shouldQuit() && _vm->_events->_rateCounter < rate2); } - if (!_vm->_eventsManager->_escKeyFl) { - _vm->_eventsManager->_rateCounter = 0; - _vm->_graphicsManager->lockScreen(); + if (!_vm->_events->_escKeyFl) { + _vm->_events->_rateCounter = 0; + _vm->_graphicsMan->lockScreen(); if (*screenP != kByteStop) - _vm->_graphicsManager->copyVideoVbe16(screenP); - _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsMan->copyVideoVbe16(screenP); + _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager->updateScreen(); - _vm->_soundManager->checkSoundEnd(); + _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsMan->updateScreen(); + _vm->_soundMan->checkSoundEnd(); } } } - if (_vm->_globals->_eventMode == 1 && !_vm->_eventsManager->_escKeyFl) { + if (_vm->_globals->_eventMode == 1 && !_vm->_events->_escKeyFl) { // Do post-animation delay do { - if (_vm->_eventsManager->_escKeyFl) + if (_vm->_events->_escKeyFl) break; - _vm->_eventsManager->refreshEvents(); - _vm->_soundManager->checkSoundEnd(); - } while (_vm->_eventsManager->_rateCounter < rate3); + _vm->_events->refreshEvents(); + _vm->_soundMan->checkSoundEnd(); + } while (_vm->_events->_rateCounter < rate3); } - if (!_vm->_eventsManager->_escKeyFl) { - _vm->_eventsManager->_rateCounter = 0; - _vm->_soundManager->checkSoundEnd(); + if (!_vm->_events->_escKeyFl) { + _vm->_events->_rateCounter = 0; + _vm->_soundMan->checkSoundEnd(); } - if (_vm->_graphicsManager->_fadingFl) { + if (_vm->_graphicsMan->_fadingFl) { byte *screenCopy = _vm->_globals->allocMemory(307200); f.seek(6); - f.read(_vm->_graphicsManager->_palette, 800); + f.read(_vm->_graphicsMan->_palette, 800); f.skip(4); nbytes = f.readUint32LE(); f.skip(14); @@ -193,17 +193,17 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui f.read(screenP, READ_LE_UINT32(imageStr + 8)); if (*screenP != kByteStop) - _vm->_graphicsManager->copyWinscanVbe3(screenP, screenCopy); + _vm->_graphicsMan->copyWinscanVbe3(screenP, screenCopy); } - _vm->_graphicsManager->fadeOutDefaultLength(screenCopy); + _vm->_graphicsMan->fadeOutDefaultLength(screenCopy); _vm->_globals->freeMemory(screenCopy); } - _vm->_graphicsManager->_fadingFl = false; + _vm->_graphicsMan->_fadingFl = false; f.close(); - _vm->_graphicsManager->_skipVideoLockFl = false; + _vm->_graphicsMan->_skipVideoLockFl = false; - _vm->_eventsManager->mouseOn(); + _vm->_events->mouseOn(); } /** @@ -217,63 +217,63 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u if (_vm->shouldQuit()) return; - _vm->_eventsManager->mouseOff(); + _vm->_events->mouseOff(); while (!_vm->shouldQuit()) { - memcpy(_vm->_graphicsManager->_oldPalette, _vm->_graphicsManager->_palette, 769); + memcpy(_vm->_graphicsMan->_oldPalette, _vm->_graphicsMan->_palette, 769); - _vm->_graphicsManager->backupScreen(); + _vm->_graphicsMan->backupScreen(); - if (!_vm->_graphicsManager->_lineNbr) - _vm->_graphicsManager->_scrollOffset = 0; + if (!_vm->_graphicsMan->_lineNbr) + _vm->_graphicsMan->_scrollOffset = 0; - screenP = _vm->_graphicsManager->_backBuffer; + screenP = _vm->_graphicsMan->_backBuffer; if (!f.open(filename)) error("Error opening file - %s", filename.c_str()); f.skip(6); - f.read(_vm->_graphicsManager->_palette, 800); + f.read(_vm->_graphicsMan->_palette, 800); f.skip(4); size_t nbytes = f.readUint32LE(); f.skip(14); f.read(screenP, nbytes); - _vm->_graphicsManager->clearPalette(); - oldScrollPosX = _vm->_graphicsManager->_scrollPosX; - _vm->_graphicsManager->setScreenWidth(SCREEN_WIDTH); - _vm->_graphicsManager->scrollScreen(0); - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->clearScreen(); - _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager->_maxX = SCREEN_WIDTH; - _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - - _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager->updateScreen(); - - _vm->_eventsManager->_rateCounter = 0; - _vm->_eventsManager->_escKeyFl = false; - _vm->_soundManager->loadAnimSound(); + _vm->_graphicsMan->clearPalette(); + oldScrollPosX = _vm->_graphicsMan->_scrollPosX; + _vm->_graphicsMan->setScreenWidth(SCREEN_WIDTH); + _vm->_graphicsMan->scrollScreen(0); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->clearScreen(); + _vm->_graphicsMan->unlockScreen(); + _vm->_graphicsMan->_maxX = SCREEN_WIDTH; + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + + _vm->_graphicsMan->unlockScreen(); + _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsMan->updateScreen(); + + _vm->_events->_rateCounter = 0; + _vm->_events->_escKeyFl = false; + _vm->_soundMan->loadAnimSound(); if (_vm->_globals->_eventMode == 1) { - while (!_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate1) { - _vm->_eventsManager->refreshEvents(); + while (!_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate1) { + _vm->_events->refreshEvents(); } } break; } - if (!_vm->_eventsManager->_escKeyFl) { - _vm->_eventsManager->_rateCounter = 0; + if (!_vm->_events->_escKeyFl) { + _vm->_events->_rateCounter = 0; int frameNumber = 0; for (;;) { - if (_vm->_eventsManager->_escKeyFl) + if (_vm->_events->_escKeyFl) break; ++frameNumber; - _vm->_soundManager->playAnimSound(frameNumber); + _vm->_soundMan->playAnimSound(frameNumber); byte imageStr[17]; if (f.read(imageStr, 16) != 16) break; @@ -284,38 +284,38 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u f.read(screenP, READ_LE_UINT32(imageStr + 8)); if (_vm->_globals->_eventMode == 1) { - while (!_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate2) { - _vm->_eventsManager->refreshEvents(); - _vm->_soundManager->checkSoundEnd(); + while (!_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate2) { + _vm->_events->refreshEvents(); + _vm->_soundMan->checkSoundEnd(); } } - _vm->_eventsManager->_rateCounter = 0; - _vm->_graphicsManager->lockScreen(); + _vm->_events->_rateCounter = 0; + _vm->_graphicsMan->lockScreen(); if (*screenP != kByteStop) { - _vm->_graphicsManager->copyVideoVbe16(screenP); + _vm->_graphicsMan->copyVideoVbe16(screenP); } - _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager->updateScreen(); - _vm->_soundManager->checkSoundEnd(); + _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsMan->updateScreen(); + _vm->_soundMan->checkSoundEnd(); } if (_vm->_globals->_eventMode == 1) { - while (!_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate3) { - _vm->_eventsManager->refreshEvents(); - _vm->_soundManager->checkSoundEnd(); + while (!_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate3) { + _vm->_events->refreshEvents(); + _vm->_soundMan->checkSoundEnd(); } } } - _vm->_graphicsManager->_skipVideoLockFl = false; + _vm->_graphicsMan->_skipVideoLockFl = false; f.close(); - if (_vm->_graphicsManager->_fadingFl) { + if (_vm->_graphicsMan->_fadingFl) { f.seek(6); - f.read(_vm->_graphicsManager->_palette, 800); + f.read(_vm->_graphicsMan->_palette, 800); f.skip(4); size_t nbytes = f.readUint32LE(); f.skip(14); @@ -334,42 +334,42 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u f.read(screenP, READ_LE_UINT32(imageStr + 8)); if (*screenP != kByteStop) - _vm->_graphicsManager->copyWinscanVbe3(screenP, ptra); + _vm->_graphicsMan->copyWinscanVbe3(screenP, ptra); } - _vm->_graphicsManager->fadeOutDefaultLength(ptra); + _vm->_graphicsMan->fadeOutDefaultLength(ptra); ptra = _vm->_globals->freeMemory(ptra); } - _vm->_graphicsManager->_fadingFl = false; - - _vm->_graphicsManager->restoreScreen(); - - memcpy(_vm->_graphicsManager->_palette, _vm->_graphicsManager->_oldPalette, 769); - _vm->_graphicsManager->clearPalette(); - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->clearScreen(); - _vm->_graphicsManager->unlockScreen(); - - _vm->_graphicsManager->_scrollPosX = oldScrollPosX; - _vm->_graphicsManager->scrollScreen(oldScrollPosX); - if (_vm->_graphicsManager->_largeScreenFl) { - _vm->_graphicsManager->setScreenWidth(2 * SCREEN_WIDTH); - _vm->_graphicsManager->_maxX = 2 * SCREEN_WIDTH; - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->copy16BitRect(_vm->_graphicsManager->_frontBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsMan->_fadingFl = false; + + _vm->_graphicsMan->restoreScreen(); + + memcpy(_vm->_graphicsMan->_palette, _vm->_graphicsMan->_oldPalette, 769); + _vm->_graphicsMan->clearPalette(); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->clearScreen(); + _vm->_graphicsMan->unlockScreen(); + + _vm->_graphicsMan->_scrollPosX = oldScrollPosX; + _vm->_graphicsMan->scrollScreen(oldScrollPosX); + if (_vm->_graphicsMan->_largeScreenFl) { + _vm->_graphicsMan->setScreenWidth(2 * SCREEN_WIDTH); + _vm->_graphicsMan->_maxX = 2 * SCREEN_WIDTH; + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_frontBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } else { - _vm->_graphicsManager->setScreenWidth(SCREEN_WIDTH); - _vm->_graphicsManager->_maxX = SCREEN_WIDTH; - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->clearScreen(); - _vm->_graphicsManager->copy16BitRect(_vm->_graphicsManager->_frontBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsMan->setScreenWidth(SCREEN_WIDTH); + _vm->_graphicsMan->_maxX = SCREEN_WIDTH; + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->clearScreen(); + _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_frontBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } - _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsMan->unlockScreen(); + _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager->fadeInShort(); - _vm->_graphicsManager->updateScreen(); + _vm->_graphicsMan->fadeInShort(); + _vm->_graphicsMan->updateScreen(); - _vm->_eventsManager->mouseOn(); + _vm->_events->mouseOn(); } /** @@ -454,7 +454,7 @@ int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) { Bank[idx]._loadedFl = true; Bank[idx]._filename = filename; - byte *fileDataPtr = _vm->_fileManager->loadFile(filename); + byte *fileDataPtr = _vm->_fileIO->loadFile(filename); Bank[idx]._fileHeader = 0; if (fileDataPtr[1] == 'L' && fileDataPtr[2] == 'E') @@ -472,8 +472,8 @@ int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) { int objectDataIdx = 0; for(objectDataIdx = 0; objectDataIdx <= 249; objectDataIdx++) { - int width = _vm->_objectsManager->getWidth(fileDataPtr, objectDataIdx); - int height = _vm->_objectsManager->getHeight(fileDataPtr, objectDataIdx); + int width = _vm->_objectsMan->getWidth(fileDataPtr, objectDataIdx); + int height = _vm->_objectsMan->getHeight(fileDataPtr, objectDataIdx); if (!width && !height) break; } @@ -495,7 +495,7 @@ int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) { Common::File f; if (f.exists(ofsFilename)) { - byte *ofsData = _vm->_fileManager->loadFile(ofsFilename); + byte *ofsData = _vm->_fileIO->loadFile(ofsFilename); byte *curOfsData = ofsData; for (int objIdx = 0; objIdx < Bank[idx]._objDataIdx; ++objIdx, curOfsData += 8) { int x1 = READ_LE_INT16(curOfsData); @@ -503,9 +503,9 @@ int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) { int x2 = READ_LE_INT16(curOfsData + 4); int y2 = READ_LE_INT16(curOfsData + 6); - _vm->_objectsManager->setOffsetXY(Bank[idx]._data, objIdx, x1, y1, 0); + _vm->_objectsMan->setOffsetXY(Bank[idx]._data, objIdx, x1, y1, 0); if (Bank[idx]._fileHeader == 2) - _vm->_objectsManager->setOffsetXY(Bank[idx]._data, objIdx, x2, y2, 1); + _vm->_objectsMan->setOffsetXY(Bank[idx]._data, objIdx, x2, y2, 1); } _vm->_globals->freeMemory(ofsData); @@ -567,22 +567,22 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui if (_vm->shouldQuit()) return; - _vm->_eventsManager->_mouseFl = false; + _vm->_events->_mouseFl = false; if (!noColFl) { - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); - _vm->_graphicsManager->backupScreen(); + _vm->_graphicsMan->backupScreen(); - if (!_vm->_graphicsManager->_lineNbr) - _vm->_graphicsManager->_scrollOffset = 0; + if (!_vm->_graphicsMan->_lineNbr) + _vm->_graphicsMan->_scrollOffset = 0; } - byte *screenP = _vm->_graphicsManager->_backBuffer; + byte *screenP = _vm->_graphicsMan->_backBuffer; Common::File f; if (!f.open(file)) error("Error opening file - %s", file.c_str()); f.skip(6); - f.read(_vm->_graphicsManager->_palette, 800); + f.read(_vm->_graphicsMan->_palette, 800); f.skip(4); size_t nbytes = f.readUint32LE(); f.skip(14); @@ -590,44 +590,44 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui if (skipSeqFl) { if (!_vm->getIsDemo()) { - _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0); + _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0); } - _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); } else { - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager->updateScreen(); + _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsMan->updateScreen(); } bool skipFl = false; if (noColFl) - _vm->_graphicsManager->fadeInDefaultLength(screenP); - _vm->_eventsManager->_rateCounter = 0; - _vm->_eventsManager->_escKeyFl = false; - _vm->_soundManager->loadAnimSound(); + _vm->_graphicsMan->fadeInDefaultLength(screenP); + _vm->_events->_rateCounter = 0; + _vm->_events->_escKeyFl = false; + _vm->_soundMan->loadAnimSound(); if (_vm->_globals->_eventMode == 1) { do { - if (_vm->shouldQuit() || (_vm->_eventsManager->_escKeyFl && !skipEscFl)) { + if (_vm->shouldQuit() || (_vm->_events->_escKeyFl && !skipEscFl)) { skipFl = true; break; } - _vm->_eventsManager->_escKeyFl = false; - _vm->_eventsManager->refreshEvents(); - _vm->_soundManager->checkSoundEnd(); - } while (_vm->_eventsManager->_rateCounter < rate1); + _vm->_events->_escKeyFl = false; + _vm->_events->refreshEvents(); + _vm->_soundMan->checkSoundEnd(); + } while (_vm->_events->_rateCounter < rate1); } - _vm->_eventsManager->_rateCounter = 0; + _vm->_events->_rateCounter = 0; if (!skipFl) { int soundNumber = 0; for (;;) { ++soundNumber; - _vm->_soundManager->playAnimSound(soundNumber); + _vm->_soundMan->playAnimSound(soundNumber); byte imageStr[17]; if (f.read(imageStr, 16) != 16) break; @@ -639,55 +639,55 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui f.read(screenP, READ_LE_UINT32(imageStr + 8)); if (_vm->_globals->_eventMode == 1) { do { - if (_vm->shouldQuit() || (_vm->_eventsManager->_escKeyFl && !skipEscFl)) { + if (_vm->shouldQuit() || (_vm->_events->_escKeyFl && !skipEscFl)) { skipFl = true; break; } - _vm->_eventsManager->_escKeyFl = false; - _vm->_eventsManager->refreshEvents(); - _vm->_soundManager->checkSoundEnd(); - } while (_vm->_eventsManager->_rateCounter < rate2); + _vm->_events->_escKeyFl = false; + _vm->_events->refreshEvents(); + _vm->_soundMan->checkSoundEnd(); + } while (_vm->_events->_rateCounter < rate2); } if (skipFl) break; - _vm->_eventsManager->_rateCounter = 0; - _vm->_graphicsManager->lockScreen(); + _vm->_events->_rateCounter = 0; + _vm->_graphicsMan->lockScreen(); if (*screenP != kByteStop) - _vm->_graphicsManager->copyVideoVbe16a(screenP); - _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsMan->copyVideoVbe16a(screenP); + _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager->updateScreen(); - _vm->_soundManager->checkSoundEnd(); + _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsMan->updateScreen(); + _vm->_soundMan->checkSoundEnd(); } } if (_vm->_globals->_eventMode == 1 && !skipFl) { do { - if (_vm->shouldQuit() || (_vm->_eventsManager->_escKeyFl && !skipEscFl)) { + if (_vm->shouldQuit() || (_vm->_events->_escKeyFl && !skipEscFl)) { skipFl = true; break; } - _vm->_eventsManager->_escKeyFl = false; - _vm->_eventsManager->refreshEvents(); - _vm->_soundManager->checkSoundEnd(); - } while (_vm->_eventsManager->_rateCounter < rate3); + _vm->_events->_escKeyFl = false; + _vm->_events->refreshEvents(); + _vm->_soundMan->checkSoundEnd(); + } while (_vm->_events->_rateCounter < rate3); } if (!skipFl) - _vm->_eventsManager->_rateCounter = 0; + _vm->_events->_rateCounter = 0; - _vm->_graphicsManager->_skipVideoLockFl = false; + _vm->_graphicsMan->_skipVideoLockFl = false; f.close(); if (!noColFl) { - _vm->_graphicsManager->restoreScreen(); + _vm->_graphicsMan->restoreScreen(); - _vm->_eventsManager->_mouseFl = true; + _vm->_events->_mouseFl = true; } } @@ -703,47 +703,47 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u if (_vm->shouldQuit()) return; - _vm->_eventsManager->_mouseFl = false; - screenP = _vm->_graphicsManager->_backBuffer; + _vm->_events->_mouseFl = false; + screenP = _vm->_graphicsMan->_backBuffer; if (!f.open(file)) error("File not found - %s", file.c_str()); f.skip(6); - f.read(_vm->_graphicsManager->_palette, 800); + f.read(_vm->_graphicsMan->_palette, 800); f.skip(4); size_t nbytes = f.readUint32LE(); f.skip(14); f.read(screenP, nbytes); if (skipSeqFl) { - _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); } else { - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); - _vm->_graphicsManager->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); + _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager->updateScreen(); + _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsMan->updateScreen(); } - _vm->_eventsManager->_rateCounter = 0; - _vm->_eventsManager->_escKeyFl = false; - _vm->_soundManager->loadAnimSound(); + _vm->_events->_rateCounter = 0; + _vm->_events->_escKeyFl = false; + _vm->_soundMan->loadAnimSound(); if (_vm->_globals->_eventMode == 1) { do { - _vm->_eventsManager->refreshEvents(); - _vm->_soundManager->checkSoundEnd(); - } while (!_vm->shouldQuit() && !_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate1); + _vm->_events->refreshEvents(); + _vm->_soundMan->checkSoundEnd(); + } while (!_vm->shouldQuit() && !_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate1); } break; } - if (!_vm->_eventsManager->_escKeyFl) { - _vm->_eventsManager->_rateCounter = 0; + if (!_vm->_events->_escKeyFl) { + _vm->_events->_rateCounter = 0; frameNumber = 0; while (!_vm->shouldQuit()) { - _vm->_soundManager->playAnimSound(frameNumber++); + _vm->_soundMan->playAnimSound(frameNumber++); byte imageStr[17]; if (f.read(imageStr, 16) != 16) @@ -756,37 +756,37 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u f.read(screenP, READ_LE_UINT32(imageStr + 8)); if (_vm->_globals->_eventMode == 1) { do { - _vm->_eventsManager->refreshEvents(); - } while (!_vm->shouldQuit() && !_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate2); + _vm->_events->refreshEvents(); + } while (!_vm->shouldQuit() && !_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate2); } - _vm->_eventsManager->_rateCounter = 0; - _vm->_graphicsManager->lockScreen(); + _vm->_events->_rateCounter = 0; + _vm->_graphicsMan->lockScreen(); if (*screenP != kByteStop) - _vm->_graphicsManager->copyVideoVbe16a(screenP); - _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsMan->copyVideoVbe16a(screenP); + _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager->updateScreen(); - _vm->_soundManager->checkSoundEnd(); + _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsMan->updateScreen(); + _vm->_soundMan->checkSoundEnd(); } } if (_vm->_globals->_eventMode == 1) { // Wait for third rate delay do { - _vm->_eventsManager->refreshEvents(); - _vm->_soundManager->checkSoundEnd(); - } while (!_vm->shouldQuit() && !_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate3); + _vm->_events->refreshEvents(); + _vm->_soundMan->checkSoundEnd(); + } while (!_vm->shouldQuit() && !_vm->_events->_escKeyFl && _vm->_events->_rateCounter < rate3); } - _vm->_eventsManager->_rateCounter = 0; + _vm->_events->_rateCounter = 0; - if (_vm->_graphicsManager->_fadingFl) { + if (_vm->_graphicsMan->_fadingFl) { byte *ptra = _vm->_globals->allocMemory(307200); f.seek(6); - f.read(_vm->_graphicsManager->_palette, 800); + f.read(_vm->_graphicsMan->_palette, 800); f.skip(4); size_t nbytes = f.readUint32LE(); f.skip(14); @@ -804,15 +804,15 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u f.read(screenP, READ_LE_UINT32(imageStr + 8)); if (*screenP != kByteStop) - _vm->_graphicsManager->copyWinscanVbe(screenP, ptra); + _vm->_graphicsMan->copyWinscanVbe(screenP, ptra); } - _vm->_graphicsManager->fadeOutDefaultLength(ptra); + _vm->_graphicsMan->fadeOutDefaultLength(ptra); ptra = _vm->_globals->freeMemory(ptra); } - _vm->_graphicsManager->_fadingFl = false; + _vm->_graphicsMan->_fadingFl = false; f.close(); - _vm->_eventsManager->_mouseFl = true; + _vm->_events->_mouseFl = true; } void AnimationManager::initAnimBqe() { diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp index 2184bfae30..ed9c6eba88 100644 --- a/engines/hopkins/computer.cpp +++ b/engines/hopkins/computer.cpp @@ -72,34 +72,34 @@ void ComputerManager::setVideoMode() { * Sets up Textual entry mode */ void ComputerManager::setTextMode() { - _vm->_graphicsManager->clearPalette(); - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->clearScreen(); - _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsMan->clearPalette(); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->clearScreen(); + _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsManager->_lineNbr = SCREEN_WIDTH; - _vm->_fontManager->_font = _vm->_globals->freeMemory(_vm->_fontManager->_font); + _vm->_graphicsMan->_lineNbr = SCREEN_WIDTH; + _vm->_fontMan->_font = _vm->_globals->freeMemory(_vm->_fontMan->_font); Common::String filename = "STFONT.SPR"; Common::File f; if (!f.exists(filename)) filename = "FONTE.SPR"; // Used by the BeOS and OS/2 versions as an alternative - _vm->_fontManager->_font = _vm->_fileManager->loadFile(filename); - _vm->_fontManager->_fontFixedWidth = 8; - _vm->_fontManager->_fontFixedHeight = 8; + _vm->_fontMan->_font = _vm->_fileIO->loadFile(filename); + _vm->_fontMan->_fontFixedWidth = 8; + _vm->_fontMan->_fontFixedHeight = 8; - _vm->_graphicsManager->loadImage("WINTEXT"); - _vm->_graphicsManager->fadeInLong(); + _vm->_graphicsMan->loadImage("WINTEXT"); + _vm->_graphicsMan->fadeInLong(); loadMenu(); - _vm->_eventsManager->_mouseFl = false; + _vm->_events->_mouseFl = false; } /** * Clear the screen */ void ComputerManager::clearScreen() { - _vm->_graphicsManager->loadImage("WINTEXT"); - _vm->_graphicsManager->fadeInLong(); + _vm->_graphicsMan->loadImage("WINTEXT"); + _vm->_graphicsMan->fadeInLong(); } /** @@ -125,8 +125,8 @@ void ComputerManager::setTextPosition(int yp, int xp) { * @param mode Which computer to display */ void ComputerManager::showComputer(ComputerEnum mode) { - _vm->_eventsManager->_escKeyFl = false; - _vm->_graphicsManager->resetDirtyRects(); + _vm->_events->_escKeyFl = false; + _vm->_graphicsMan->resetDirtyRects(); setVideoMode(); setTextColor(4); setTextPosition(2, 4); @@ -157,7 +157,7 @@ void ComputerManager::showComputer(ComputerEnum mode) { if (passwordMatch) { while (!_vm->shouldQuit()) { - _vm->_eventsManager->_escKeyFl = false; + _vm->_events->_escKeyFl = false; clearScreen(); setTextColor(4); setTextPosition(2, 4); @@ -199,7 +199,7 @@ void ComputerManager::showComputer(ComputerEnum mode) { bool numericFlag = false; char keyPressed; do { - keyPressed = _vm->_eventsManager->waitKeyPress(); + keyPressed = _vm->_events->waitKeyPress(); if (_vm->shouldQuit()) return; @@ -259,26 +259,26 @@ void ComputerManager::showComputer(ComputerEnum mode) { } } } - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->clearScreen(); - _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager->updateScreen(); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->clearScreen(); + _vm->_graphicsMan->unlockScreen(); + _vm->_graphicsMan->updateScreen(); restoreFBIRoom(); } else { // Password doesn't match - Access Denied setTextColor(4); setTextPosition(16, 25); outText(Common::String(_menuText[5]._line)); - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_eventsManager->delay(1000); - - memset(_vm->_graphicsManager->_frontBuffer, 0, 307199); - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->clearScreen(); - _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager->updateScreen(); + _vm->_events->refreshScreenAndEvents(); + _vm->_events->delay(1000); + + memset(_vm->_graphicsMan->_frontBuffer, 0, 307199); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->clearScreen(); + _vm->_graphicsMan->unlockScreen(); + _vm->_graphicsMan->updateScreen(); restoreFBIRoom(); - _vm->_eventsManager->mouseOff(); + _vm->_events->mouseOff(); } if (mode == COMPUTER_HOPKINS) @@ -286,7 +286,7 @@ void ComputerManager::showComputer(ComputerEnum mode) { else // Free access or Samantha _vm->_globals->_exitId = 14; - _vm->_graphicsManager->resetDirtyRects(); + _vm->_graphicsMan->resetDirtyRects(); } static const char _englishText[] = @@ -353,8 +353,8 @@ static const char _spanishText[] = */ void ComputerManager::loadMenu() { char *ptr; - if (_vm->_fileManager->fileExists("COMPUTAN.TXT")) { - ptr = (char *)_vm->_fileManager->loadFile("COMPUTAN.TXT"); + if (_vm->_fileIO->fileExists("COMPUTAN.TXT")) { + ptr = (char *)_vm->_fileIO->loadFile("COMPUTAN.TXT"); } else if (_vm->_globals->_language == LANG_FR) { ptr = (char *)_vm->_globals->allocMemory(sizeof(_frenchText)); strcpy(ptr, _frenchText); @@ -403,12 +403,12 @@ void ComputerManager::displayMessage(int xp, int yp, int textIdx) { int x2 = 0; int textIndex = 0; - bool oldMouseFlag = _vm->_eventsManager->_mouseFl; - _vm->_eventsManager->_mouseFl = false; + bool oldMouseFlag = _vm->_events->_mouseFl; + _vm->_events->_mouseFl = false; - _vm->_fontManager->displayTextVesa(xp, yp, "_", 252); + _vm->_fontMan->displayTextVesa(xp, yp, "_", 252); do { - curChar = _vm->_eventsManager->waitKeyPress(); + curChar = _vm->_events->waitKeyPress(); if (_vm->shouldQuit()) return; @@ -422,67 +422,67 @@ void ComputerManager::displayMessage(int xp, int yp, int textIdx) { // BackSpace if (curChar == 8 && textIndex > 0) { _inputBuf[textIndex--] = 0; - x1 -= _vm->_fontManager->_fontFixedWidth; - x2 = x1 + 2 * _vm->_fontManager->_fontFixedWidth; - _vm->_graphicsManager->copyRect(_vm->_graphicsManager->_backBuffer, x1, yp, 3 * _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager->_frontBuffer, x1, yp); - _vm->_graphicsManager->addDirtyRect(x1, yp, x2, yp + 12); - _vm->_fontManager->displayTextVesa(x1, yp, "_", 252); + x1 -= _vm->_fontMan->_fontFixedWidth; + x2 = x1 + 2 * _vm->_fontMan->_fontFixedWidth; + _vm->_graphicsMan->copyRect(_vm->_graphicsMan->_backBuffer, x1, yp, 3 * _vm->_fontMan->_fontFixedWidth, 12, _vm->_graphicsMan->_frontBuffer, x1, yp); + _vm->_graphicsMan->addDirtyRect(x1, yp, x2, yp + 12); + _vm->_fontMan->displayTextVesa(x1, yp, "_", 252); } if (mappedChar != '*') { char newChar = mappedChar; - _vm->_graphicsManager->copyRect(_vm->_graphicsManager->_backBuffer, x1, yp, _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager->_frontBuffer, x1, yp); - _vm->_graphicsManager->addDirtyRect(x1, yp, _vm->_fontManager->_fontFixedWidth + x1, yp + 12); + _vm->_graphicsMan->copyRect(_vm->_graphicsMan->_backBuffer, x1, yp, _vm->_fontMan->_fontFixedWidth, 12, _vm->_graphicsMan->_frontBuffer, x1, yp); + _vm->_graphicsMan->addDirtyRect(x1, yp, _vm->_fontMan->_fontFixedWidth + x1, yp + 12); _inputBuf[textIndex] = newChar; Common::String charString = Common::String::format("%c_", newChar); - _vm->_fontManager->displayTextVesa(x1, yp, charString, 252); + _vm->_fontMan->displayTextVesa(x1, yp, charString, 252); ++textIndex; - x1 += _vm->_fontManager->_fontFixedWidth; + x1 += _vm->_fontMan->_fontFixedWidth; } - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } while (textIndex != textIdx && curChar != 13); - _vm->_graphicsManager->copyRect(_vm->_graphicsManager->_backBuffer, x1, yp, _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager->_frontBuffer, x1, yp); - _vm->_graphicsManager->addDirtyRect(x1, yp, _vm->_fontManager->_fontFixedWidth + x1, yp + 12); + _vm->_graphicsMan->copyRect(_vm->_graphicsMan->_backBuffer, x1, yp, _vm->_fontMan->_fontFixedWidth, 12, _vm->_graphicsMan->_frontBuffer, x1, yp); + _vm->_graphicsMan->addDirtyRect(x1, yp, _vm->_fontMan->_fontFixedWidth + x1, yp + 12); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); _inputBuf[textIndex] = 0; - _vm->_eventsManager->_mouseFl = oldMouseFlag; + _vm->_events->_mouseFl = oldMouseFlag; } /** * Outputs a text string */ void ComputerManager::outText(const Common::String &msg) { - _vm->_fontManager->renderTextDisplay(_textPosition.x, _textPosition.y, msg, _textColor); + _vm->_fontMan->renderTextDisplay(_textPosition.x, _textPosition.y, msg, _textColor); } /** * Outputs a text string */ void ComputerManager::outText2(const Common::String &msg) { - _vm->_fontManager->displayTextVesa(_textPosition.x, _textPosition.y, msg, _textColor); + _vm->_fontMan->displayTextVesa(_textPosition.x, _textPosition.y, msg, _textColor); } /** * Restores the scene for the FBI headquarters room */ void ComputerManager::restoreFBIRoom() { - _vm->_graphicsManager->fadeOutShort(); + _vm->_graphicsMan->fadeOutShort(); - _vm->_globals->freeMemory(_vm->_fontManager->_font); - _vm->_fontManager->_font = _vm->_fileManager->loadFile("FONTE3.SPR"); - _vm->_fontManager->_fontFixedWidth = 12; - _vm->_fontManager->_fontFixedHeight = 21; + _vm->_globals->freeMemory(_vm->_fontMan->_font); + _vm->_fontMan->_font = _vm->_fileIO->loadFile("FONTE3.SPR"); + _vm->_fontMan->_fontFixedWidth = 12; + _vm->_fontMan->_fontFixedHeight = 21; - _vm->_eventsManager->_mouseFl = true; + _vm->_events->_mouseFl = true; } /** * Display texts for the given menu entry */ void ComputerManager::readText(int idx) { - _vm->_eventsManager->_escKeyFl = false; + _vm->_events->_escKeyFl = false; Common::String filename; if (_vm->_globals->_language == LANG_EN) @@ -492,8 +492,8 @@ void ComputerManager::readText(int idx) { else if (_vm->_globals->_language == LANG_SP) filename = "THOPKES.TXT"; - byte *ptr = _vm->_fileManager->loadFile(filename); - uint16 fileSize = _vm->_fileManager->fileSize(filename); + byte *ptr = _vm->_fileIO->loadFile(filename); + uint16 fileSize = _vm->_fileIO->fileSize(filename); int pos; for (pos = 0; pos < fileSize; pos++) { if (ptr[pos] == '%') { @@ -516,7 +516,7 @@ void ComputerManager::readText(int idx) { outText(curStr); ++lineNum; - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); curStr = ""; } else if (curChar != '%') { curStr += curChar; @@ -525,7 +525,7 @@ void ComputerManager::readText(int idx) { assert(pos <= fileSize); } while (curChar != '%'); - _vm->_eventsManager->waitKeyPress(); + _vm->_events->waitKeyPress(); ptr = _vm->_globals->freeMemory(ptr); } @@ -533,13 +533,13 @@ void ComputerManager::readText(int idx) { * Display breakout when Games sub-menu is selected */ void ComputerManager::displayGamesSubMenu() { - const byte *oldSpriteData = _vm->_objectsManager->_sprite[0]._spriteData; + const byte *oldSpriteData = _vm->_objectsMan->_sprite[0]._spriteData; uint oldSpeed = _vm->_globals->_speed; _vm->_globals->_speed = 1; - _vm->_eventsManager->changeMouseCursor(0); + _vm->_events->changeMouseCursor(0); _breakoutSpr = NULL; - _vm->_eventsManager->_breakoutFl = true; + _vm->_events->_breakoutFl = true; _breakoutLevel = (int16 *)NULL; _breakoutBrickNbr = 0; _breakoutScore = 0; @@ -548,36 +548,36 @@ void ComputerManager::displayGamesSubMenu() { _ballRightFl = false; _ballUpFl = false; _breakoutLevelNbr = 0; - _vm->_graphicsManager->_minY = 0; - _vm->_graphicsManager->_maxX = 320; - _vm->_graphicsManager->_maxY = 200; - _vm->_soundManager->loadSample(1, "SOUND37.WAV"); - _vm->_soundManager->loadSample(2, "SOUND38.WAV"); - _vm->_soundManager->loadSample(3, "SOUND39.WAV"); - _breakoutSpr = _vm->_fileManager->loadFile("CASSE.SPR"); + _vm->_graphicsMan->_minY = 0; + _vm->_graphicsMan->_maxX = 320; + _vm->_graphicsMan->_maxY = 200; + _vm->_soundMan->loadSample(1, "SOUND37.WAV"); + _vm->_soundMan->loadSample(2, "SOUND38.WAV"); + _vm->_soundMan->loadSample(3, "SOUND39.WAV"); + _breakoutSpr = _vm->_fileIO->loadFile("CASSE.SPR"); loadHiscore(); setModeVGA256(); newLevel(); - _vm->_graphicsManager->updateScreen(); + _vm->_graphicsMan->updateScreen(); playBreakout(); - _vm->_graphicsManager->resetDirtyRects(); + _vm->_graphicsMan->resetDirtyRects(); _breakoutSpr = _vm->_globals->freeMemory(_breakoutSpr); _breakoutLevel = (int16 *)_vm->_globals->freeMemory((byte *)_breakoutLevel); - _vm->_objectsManager->_sprite[0]._spriteData = oldSpriteData; + _vm->_objectsMan->_sprite[0]._spriteData = oldSpriteData; - _vm->_soundManager->removeSample(1); - _vm->_soundManager->removeSample(2); - _vm->_soundManager->removeSample(3); + _vm->_soundMan->removeSample(1); + _vm->_soundMan->removeSample(2); + _vm->_soundMan->removeSample(3); _vm->_globals->_speed = oldSpeed; - _vm->_eventsManager->_breakoutFl = false; + _vm->_events->_breakoutFl = false; setVideoMode(); setTextColor(15); clearScreen(); - _vm->_graphicsManager->_maxX = 680; - _vm->_graphicsManager->_minY = 0; - _vm->_graphicsManager->_maxY = 460; + _vm->_graphicsMan->_maxX = 680; + _vm->_graphicsMan->_minY = 0; + _vm->_graphicsMan->_maxY = 460; } /** @@ -585,7 +585,7 @@ void ComputerManager::displayGamesSubMenu() { */ void ComputerManager::loadHiscore() { byte *ptr = _vm->_globals->allocMemory(100); - _vm->_saveLoadManager->load("HISCORE.DAT", ptr); + _vm->_saveLoad->load("HISCORE.DAT", ptr); for (int scoreIndex = 0; scoreIndex < 6; ++scoreIndex) { for (int i = 0; i < 5; ++i) { @@ -611,23 +611,23 @@ void ComputerManager::loadHiscore() { * VGA 256 col */ void ComputerManager::setModeVGA256() { - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->clearScreen(); - _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager->clearPalette(); - _vm->_graphicsManager->setScreenWidth(320); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->clearScreen(); + _vm->_graphicsMan->unlockScreen(); + _vm->_graphicsMan->clearPalette(); + _vm->_graphicsMan->setScreenWidth(320); } /** * Load new level */ void ComputerManager::newLevel() { - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->removeSprite(1); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->removeSprite(1); ++_breakoutLives; if (_breakoutLives > 11) _breakoutLives = 11; - _vm->_graphicsManager->loadVgaImage("CASSEF.PCX"); + _vm->_graphicsMan->loadVgaImage("CASSEF.PCX"); displayLives(); _breakoutLevel = (int16 *)_vm->_globals->freeMemory((byte *)_breakoutLevel); @@ -643,19 +643,19 @@ void ComputerManager::newLevel() { } f.close(); - _breakoutLevel = (int16 *)_vm->_fileManager->loadFile(file); + _breakoutLevel = (int16 *)_vm->_fileIO->loadFile(file); displayBricks(); - _vm->_objectsManager->addStaticSprite(_breakoutSpr, Common::Point(150, 192), 0, 13, 0, false, 0, 0); - _vm->_objectsManager->addStaticSprite(_breakoutSpr, Common::Point(164, 187), 1, 14, 0, false, 0, 0); + _vm->_objectsMan->addStaticSprite(_breakoutSpr, Common::Point(150, 192), 0, 13, 0, false, 0, 0); + _vm->_objectsMan->addStaticSprite(_breakoutSpr, Common::Point(164, 187), 1, 14, 0, false, 0, 0); _ballPosition = Common::Point(164, 187); _padPositionX = 150; - _vm->_objectsManager->animateSprite(0); - _vm->_objectsManager->animateSprite(1); + _vm->_objectsMan->animateSprite(0); + _vm->_objectsMan->animateSprite(1); - _vm->_eventsManager->mouseOn(); - _vm->_soundManager->playSample(3, 5); + _vm->_events->mouseOn(); + _vm->_soundMan->playSample(3, 5); } /** @@ -681,25 +681,25 @@ void ComputerManager::displayBricks() { switch (cellType) { case 1: - _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 21); + _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 21); break; case 2: - _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 22); + _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 22); break; case 3: - _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 17); + _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 17); break; case 4: - _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 20); + _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 20); break; case 5: - _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 19); + _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 19); break; case 6: - _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 18); + _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 18); break; case 31: - _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 23); + _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 23); break; } } @@ -712,12 +712,12 @@ void ComputerManager::displayBricks() { */ void ComputerManager::displayLives() { for (int i = 0, xp = 10; i <= 11; i++, xp += 7) - _vm->_graphicsManager->fastDisplay2(_breakoutSpr, xp, 10, 15); + _vm->_graphicsMan->fastDisplay2(_breakoutSpr, xp, 10, 15); for (int i = 0, xp = 10; i < _breakoutLives - 1; i++, xp += 7) - _vm->_graphicsManager->fastDisplay2(_breakoutSpr, xp, 10, 14); + _vm->_graphicsMan->fastDisplay2(_breakoutSpr, xp, 10, 14); - _vm->_graphicsManager->updateScreen(); + _vm->_graphicsMan->updateScreen(); } /** @@ -728,27 +728,27 @@ void ComputerManager::playBreakout() { while (!_vm->shouldQuit()) { while (!_vm->shouldQuit()) { // Set up the racket and ball - _vm->_eventsManager->mouseOff(); + _vm->_events->mouseOff(); _ballPosition = Common::Point(_padPositionX + 14, 187); - _vm->_objectsManager->setSpriteY(1, 187); - _vm->_objectsManager->setSpriteX(1, _ballPosition.x); + _vm->_objectsMan->setSpriteY(1, 187); + _vm->_objectsMan->setSpriteX(1, _ballPosition.x); - _vm->_graphicsManager->resetDirtyRects(); - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager->fadeInBreakout(); + _vm->_graphicsMan->resetDirtyRects(); + _vm->_events->refreshScreenAndEvents(); + _vm->_graphicsMan->fadeInBreakout(); // Wait for mouse press to start playing do { - _padPositionX = _vm->_eventsManager->getMouseX(); - if (_vm->_eventsManager->_mousePos.x <= 4) + _padPositionX = _vm->_events->getMouseX(); + if (_vm->_events->_mousePos.x <= 4) _padPositionX = 5; if (_padPositionX > 282) _padPositionX = 282; - _vm->_objectsManager->setSpriteX(0, _padPositionX); - _vm->_objectsManager->setSpriteX(1, _padPositionX + 14); - _vm->_objectsManager->setSpriteY(1, 187); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (!_vm->shouldQuit() && _vm->_eventsManager->getMouseButton() != 1); + _vm->_objectsMan->setSpriteX(0, _padPositionX); + _vm->_objectsMan->setSpriteX(1, _padPositionX + 14); + _vm->_objectsMan->setSpriteY(1, 187); + _vm->_events->refreshScreenAndEvents(); + } while (!_vm->shouldQuit() && _vm->_events->getMouseButton() != 1); _breakoutSpeed = 1; _ballPosition = Common::Point(_padPositionX + 14, 187); @@ -757,16 +757,16 @@ void ComputerManager::playBreakout() { // Play loop do { - _vm->_soundManager->checkSounds(); + _vm->_soundMan->checkSounds(); - _padPositionX = _vm->_eventsManager->getMouseX(); - if (_vm->_eventsManager->_mousePos.x <= 4) + _padPositionX = _vm->_events->getMouseX(); + if (_vm->_events->_mousePos.x <= 4) _padPositionX = 5; if (_padPositionX > 282) _padPositionX = 282; - _vm->_objectsManager->setSpriteX(0, _padPositionX); + _vm->_objectsMan->setSpriteX(0, _padPositionX); lastBreakoutEvent = moveBall(); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } while (!_vm->shouldQuit() && !lastBreakoutEvent); if (lastBreakoutEvent != 1) break; @@ -779,10 +779,10 @@ void ComputerManager::playBreakout() { continue; } - _vm->_graphicsManager->fadeOutBreakout(); - _vm->_eventsManager->mouseOn(); - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->removeSprite(1); + _vm->_graphicsMan->fadeOutBreakout(); + _vm->_events->mouseOn(); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->removeSprite(1); if (_breakoutScore > _breakoutHiscore) getScoreName(); if (displayHiscores() != 1) @@ -800,7 +800,7 @@ void ComputerManager::playBreakout() { } if (lastBreakoutEvent != 2) return; - _vm->_graphicsManager->fadeOutBreakout(); + _vm->_graphicsMan->fadeOutBreakout(); newLevel(); } } @@ -810,14 +810,14 @@ void ComputerManager::playBreakout() { * @return The selected button index: 1 = Game, 2 = Quit */ int ComputerManager::displayHiscores() { - _vm->_graphicsManager->resetDirtyRects(); + _vm->_graphicsMan->resetDirtyRects(); loadHiscore(); - _vm->_graphicsManager->loadVgaImage("HISCORE.PCX"); - byte *ptr = _vm->_fileManager->loadFile("ALPHA.SPR"); - _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0); + _vm->_graphicsMan->loadVgaImage("HISCORE.PCX"); + byte *ptr = _vm->_fileIO->loadFile("ALPHA.SPR"); + _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0); int yp; int xp; @@ -835,24 +835,24 @@ int ComputerManager::displayHiscores() { displayHiscoreLine(ptr, 9 * i + 199, yp, _score[scoreIndex]._score[i]); } - _vm->_graphicsManager->fadeInBreakout(); - _vm->_graphicsManager->resetDirtyRects(); + _vm->_graphicsMan->fadeInBreakout(); + _vm->_graphicsMan->resetDirtyRects(); int buttonIndex = 0; do { - _vm->_eventsManager->refreshEvents(); - xp = _vm->_eventsManager->getMouseX(); - yp = _vm->_eventsManager->getMouseY(); + _vm->_events->refreshEvents(); + xp = _vm->_events->getMouseX(); + yp = _vm->_events->getMouseY(); - if (_vm->_eventsManager->getMouseButton() == 1 && ABS(xp - 79) <= 33 && ABS(yp - 396) <= 13) + if (_vm->_events->getMouseButton() == 1 && ABS(xp - 79) <= 33 && ABS(yp - 396) <= 13) buttonIndex = 1; - else if (_vm->_eventsManager->getMouseButton() == 1 && ABS(xp - 583) <= 32 && ABS(yp - 396) <= 13) + else if (_vm->_events->getMouseButton() == 1 && ABS(xp - 583) <= 32 && ABS(yp - 396) <= 13) buttonIndex = 2; - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } while (!buttonIndex && !_vm->shouldQuit()); - _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager->fadeOutBreakout(); + _vm->_events->mouseOff(); + _vm->_graphicsMan->fadeOutBreakout(); _vm->_globals->freeMemory(ptr); return buttonIndex; } @@ -861,17 +861,17 @@ int ComputerManager::displayHiscores() { * Display a screen to enter player name in the case of a new hiscore */ void ComputerManager::getScoreName() { - _vm->_graphicsManager->loadVgaImage("NAME.PCX"); - _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0); - byte *ptr = _vm->_fileManager->loadFile("ALPHA.SPR"); - _vm->_graphicsManager->fadeInBreakout(); + _vm->_graphicsMan->loadVgaImage("NAME.PCX"); + _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0); + byte *ptr = _vm->_fileIO->loadFile("ALPHA.SPR"); + _vm->_graphicsMan->fadeInBreakout(); for (int strPos = 0; strPos <= 4; strPos++) { displayHiscoreLine(ptr, 9 * strPos + 140, 78, 1); - char curChar = toupper(_vm->_eventsManager->waitKeyPress()); + char curChar = toupper(_vm->_events->waitKeyPress()); if ((curChar < '0') && (curChar > 'Z')) curChar = ' '; if ((curChar > '9') && (curChar < 'A')) @@ -881,7 +881,7 @@ void ComputerManager::getScoreName() { displayHiscoreLine(ptr, 9 * strPos + 140, 78, curChar); for (int idx = 0; idx < 12; ++idx) - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } _score[5]._score = " "; @@ -895,7 +895,7 @@ void ComputerManager::getScoreName() { for (int i = scoreLen, scorePos = 8; i >= 0; i--) { _score[5]._score.setChar(score[i], scorePos--); } - _vm->_graphicsManager->fadeOutBreakout(); + _vm->_graphicsMan->fadeOutBreakout(); _vm->_globals->freeMemory(ptr); saveScore(); } @@ -944,7 +944,7 @@ void ComputerManager::displayScoreChar(int charPos, int charDisp) { if (charDisp >= '0' && charDisp <= '9') idx = charDisp - 45; - _vm->_graphicsManager->fastDisplay2(_breakoutSpr, xp, 11, idx); + _vm->_graphicsMan->fastDisplay2(_breakoutSpr, xp, 11, idx); } /** @@ -995,7 +995,7 @@ void ComputerManager::saveScore() { ptr[curBufPtr + 15] = 0; } - _vm->_saveLoadManager->saveFile("HISCORE.DAT", ptr, 100); + _vm->_saveLoad->saveFile("HISCORE.DAT", ptr, 100); _vm->_globals->freeMemory(ptr); } @@ -1013,7 +1013,7 @@ void ComputerManager::displayHiscoreLine(byte *objectData, int x, int y, int cur idx = curChar - 'A' + 10; else if (curChar == 1) idx = 37; - _vm->_graphicsManager->fastDisplay2(objectData, x, y, idx); + _vm->_graphicsMan->fastDisplay2(objectData, x, y, idx); } /** @@ -1058,21 +1058,21 @@ int ComputerManager::moveBall() { _lastBreakoutMoveSpeed = moveSpeed; if (_ballPosition.x <= 6) { - _vm->_soundManager->playSample(2, 6); + _vm->_soundMan->playSample(2, 6); _ballPosition.x = randVal + 6; _ballRightFl = !_ballRightFl; } else if (_ballPosition.x > 307) { - _vm->_soundManager->playSample(2, 6); + _vm->_soundMan->playSample(2, 6); _ballPosition.x = 307 - randVal; _ballRightFl = !_ballRightFl; } if (_ballPosition.y <= 6) { - _vm->_soundManager->playSample(2, 6); + _vm->_soundMan->playSample(2, 6); _ballPosition.y = randVal + 7; _ballUpFl = !_ballUpFl; } else if (_ballPosition.y >= 186 && _ballPosition.y <= 194) { - _vm->_soundManager->playSample(2, 6); + _vm->_soundMan->playSample(2, 6); int ballPosXRight = _ballPosition.x + 6; if ((_ballPosition.x > _padPositionX - 2) && (ballPosXRight < _padPositionX + 36)) { _ballUpFl = false; @@ -1097,8 +1097,8 @@ int ComputerManager::moveBall() { if (_ballPosition.y > 194) retVal = 1; checkBallCollisions(); - _vm->_objectsManager->setSpriteX(1, _ballPosition.x); - _vm->_objectsManager->setSpriteY(1, _ballPosition.y); + _vm->_objectsMan->setSpriteX(1, _ballPosition.x); + _vm->_objectsMan->setSpriteY(1, _ballPosition.y); if (!_breakoutBrickNbr) retVal = 2; return retVal; @@ -1183,10 +1183,10 @@ void ComputerManager::checkBallCollisions() { } if (collisionFl) { if (cellType == 31) { - _vm->_soundManager->playSample(2, 6); + _vm->_soundMan->playSample(2, 6); } else { - _vm->_soundManager->playSample(1, 5); - _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellUp, 16); + _vm->_soundMan->playSample(1, 5); + _vm->_graphicsMan->fastDisplay2(_breakoutSpr, cellLeft, cellUp, 16); switch (cellType) { case 1: _breakoutScore += 10; diff --git a/engines/hopkins/debugger.cpp b/engines/hopkins/debugger.cpp index d012f54e9c..246270c1c2 100644 --- a/engines/hopkins/debugger.cpp +++ b/engines/hopkins/debugger.cpp @@ -42,7 +42,7 @@ bool Debugger::cmd_DirtyRects(int argc, const char **argv) { DebugPrintf("%s: [on | off]\n", argv[0]); return true; } else { - _vm->_graphicsManager->_showDirtyRects = !strcmp(argv[1], "on"); + _vm->_graphicsMan->_showDirtyRects = !strcmp(argv[1], "on"); return false; } } diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp index 47e2d048c2..8eec73e5d0 100644 --- a/engines/hopkins/dialogs.cpp +++ b/engines/hopkins/dialogs.cpp @@ -62,24 +62,24 @@ void DialogsManager::clearAll() { } void DialogsManager::loadIcons() { - _inventoryIcons = _vm->_fileManager->loadFile("ICONE.SPR"); + _inventoryIcons = _vm->_fileIO->loadFile("ICONE.SPR"); } void DialogsManager::drawInvent(Common::Point oldBorder, int oldBorderSpriteIndex, Common::Point newBorder, int newBorderSpriteIndex) { if (!_inventDisplayedFl) return; - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight); + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight); if (oldBorder.x && oldBorder.y) - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _inventBuf2, oldBorder.x + 300, oldBorder.y + 300, oldBorderSpriteIndex + 1); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _inventBuf2, oldBorder.x + 300, oldBorder.y + 300, oldBorderSpriteIndex + 1); if (newBorder.x && newBorder.y) - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _inventBuf2, newBorder.x + 300, newBorder.y + 300, newBorderSpriteIndex); - _vm->_graphicsManager->addDirtyRect(_inventX, _inventY, _inventX + _inventWidth, _inventY + _inventHeight); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _inventBuf2, newBorder.x + 300, newBorder.y + 300, newBorderSpriteIndex); + _vm->_graphicsMan->addDirtyRect(_inventX, _inventY, _inventX + _inventWidth, _inventY + _inventHeight); } void DialogsManager::showOptionsDialog() { - _vm->_eventsManager->changeMouseCursor(0); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->changeMouseCursor(0); + _vm->_events->refreshScreenAndEvents(); Common::String filename; if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) filename = "OPTION.SPR"; @@ -92,119 +92,119 @@ void DialogsManager::showOptionsDialog() { filename = "OPTIES.SPR"; } - _vm->_globals->_optionDialogSpr = _vm->_fileManager->loadFile(filename); + _vm->_globals->_optionDialogSpr = _vm->_fileIO->loadFile(filename); _vm->_globals->_optionDialogFl = true; - int scrollOffset = _vm->_graphicsManager->_scrollOffset; + int scrollOffset = _vm->_graphicsMan->_scrollOffset; bool doneFlag = false; do { - if (_vm->_eventsManager->getMouseButton()) { - Common::Point mousePos(_vm->_eventsManager->getMouseX(), _vm->_eventsManager->getMouseY()); + if (_vm->_events->getMouseButton()) { + Common::Point mousePos(_vm->_events->getMouseX(), _vm->_events->getMouseY()); - if (!_vm->_soundManager->_musicOffFl) { + if (!_vm->_soundMan->_musicOffFl) { if (mousePos.x >= scrollOffset + 300 && mousePos.y > 113 && mousePos.x <= scrollOffset + 327 && mousePos.y <= 138) { // Change the music volume - ++_vm->_soundManager->_musicVolume; + ++_vm->_soundMan->_musicVolume; - if (_vm->_soundManager->_musicVolume <= 12) - _vm->_soundManager->playSoundFile("bruit2.wav"); + if (_vm->_soundMan->_musicVolume <= 12) + _vm->_soundMan->playSoundFile("bruit2.wav"); else - _vm->_soundManager->_musicVolume = 12; - _vm->_soundManager->setMODMusicVolume(_vm->_soundManager->_musicVolume); + _vm->_soundMan->_musicVolume = 12; + _vm->_soundMan->setMODMusicVolume(_vm->_soundMan->_musicVolume); - _vm->_soundManager->updateScummVMSoundSettings(); + _vm->_soundMan->updateScummVMSoundSettings(); } - if (!_vm->_soundManager->_musicOffFl && mousePos.x >= scrollOffset + 331 && mousePos.y > 113 && mousePos.x <= scrollOffset + 358 && mousePos.y <= 138) { - --_vm->_soundManager->_musicVolume; - if (_vm->_soundManager->_musicVolume >= 0) - _vm->_soundManager->playSoundFile("bruit2.wav"); + if (!_vm->_soundMan->_musicOffFl && mousePos.x >= scrollOffset + 331 && mousePos.y > 113 && mousePos.x <= scrollOffset + 358 && mousePos.y <= 138) { + --_vm->_soundMan->_musicVolume; + if (_vm->_soundMan->_musicVolume >= 0) + _vm->_soundMan->playSoundFile("bruit2.wav"); else - _vm->_soundManager->_musicVolume = 0; + _vm->_soundMan->_musicVolume = 0; - _vm->_soundManager->setMODMusicVolume(_vm->_soundManager->_musicVolume); + _vm->_soundMan->setMODMusicVolume(_vm->_soundMan->_musicVolume); - _vm->_soundManager->updateScummVMSoundSettings(); + _vm->_soundMan->updateScummVMSoundSettings(); } } - if (!_vm->_soundManager->_soundOffFl) { + if (!_vm->_soundMan->_soundOffFl) { // increase volume if (mousePos.x >= scrollOffset + 300 && mousePos.y > 140 && mousePos.x <= scrollOffset + 327 && mousePos.y <= 165) { - ++_vm->_soundManager->_soundVolume; - if (_vm->_soundManager->_soundVolume <= 16) - _vm->_soundManager->playSoundFile("bruit2.wav"); + ++_vm->_soundMan->_soundVolume; + if (_vm->_soundMan->_soundVolume <= 16) + _vm->_soundMan->playSoundFile("bruit2.wav"); else - _vm->_soundManager->_soundVolume = 16; - _vm->_soundManager->setMODSampleVolume(); + _vm->_soundMan->_soundVolume = 16; + _vm->_soundMan->setMODSampleVolume(); - _vm->_soundManager->updateScummVMSoundSettings(); + _vm->_soundMan->updateScummVMSoundSettings(); } // Decrease volume - if (!_vm->_soundManager->_soundOffFl && mousePos.x >= scrollOffset + 331 && mousePos.y > 140 && mousePos.x <= scrollOffset + 358 && mousePos.y <= 165) { - --_vm->_soundManager->_soundVolume; - if (_vm->_soundManager->_soundVolume >= 0) - _vm->_soundManager->playSoundFile("bruit2.wav"); + if (!_vm->_soundMan->_soundOffFl && mousePos.x >= scrollOffset + 331 && mousePos.y > 140 && mousePos.x <= scrollOffset + 358 && mousePos.y <= 165) { + --_vm->_soundMan->_soundVolume; + if (_vm->_soundMan->_soundVolume >= 0) + _vm->_soundMan->playSoundFile("bruit2.wav"); else - _vm->_soundManager->_soundVolume = 0; - _vm->_soundManager->setMODSampleVolume(); + _vm->_soundMan->_soundVolume = 0; + _vm->_soundMan->setMODSampleVolume(); - _vm->_soundManager->updateScummVMSoundSettings(); + _vm->_soundMan->updateScummVMSoundSettings(); } } - if (!_vm->_soundManager->_voiceOffFl) { + if (!_vm->_soundMan->_voiceOffFl) { if (mousePos.x >= scrollOffset + 300 && mousePos.y > 167 && mousePos.x <= scrollOffset + 327 && mousePos.y <= 192) { - ++_vm->_soundManager->_voiceVolume; + ++_vm->_soundMan->_voiceVolume; - if (_vm->_soundManager->_voiceVolume <= 16) - _vm->_soundManager->playSoundFile("bruit2.wav"); + if (_vm->_soundMan->_voiceVolume <= 16) + _vm->_soundMan->playSoundFile("bruit2.wav"); else - _vm->_soundManager->_voiceVolume = 16; - _vm->_soundManager->setMODVoiceVolume(); + _vm->_soundMan->_voiceVolume = 16; + _vm->_soundMan->setMODVoiceVolume(); - _vm->_soundManager->updateScummVMSoundSettings(); + _vm->_soundMan->updateScummVMSoundSettings(); } - if (!_vm->_soundManager->_voiceOffFl && mousePos.x >= scrollOffset + 331 && mousePos.y > 167 && mousePos.x <= scrollOffset + 358 && mousePos.y <= 192) { - --_vm->_soundManager->_voiceVolume; - if (_vm->_soundManager->_voiceVolume >= 0) - _vm->_soundManager->playSoundFile("bruit2.wav"); + if (!_vm->_soundMan->_voiceOffFl && mousePos.x >= scrollOffset + 331 && mousePos.y > 167 && mousePos.x <= scrollOffset + 358 && mousePos.y <= 192) { + --_vm->_soundMan->_voiceVolume; + if (_vm->_soundMan->_voiceVolume >= 0) + _vm->_soundMan->playSoundFile("bruit2.wav"); else - _vm->_soundManager->_voiceVolume = 0; - _vm->_soundManager->setMODVoiceVolume(); + _vm->_soundMan->_voiceVolume = 0; + _vm->_soundMan->setMODVoiceVolume(); - _vm->_soundManager->updateScummVMSoundSettings(); + _vm->_soundMan->updateScummVMSoundSettings(); } } if (mousePos.x >= scrollOffset + 431) { if (mousePos.y > 194 && mousePos.x <= scrollOffset + 489 && mousePos.y <= 219) - _vm->_soundManager->_textOffFl = !_vm->_soundManager->_textOffFl; + _vm->_soundMan->_textOffFl = !_vm->_soundMan->_textOffFl; if (mousePos.x >= scrollOffset + 431) { if (mousePos.y > 167 && mousePos.x <= scrollOffset + 489 && mousePos.y <= 192) { - _vm->_soundManager->_voiceOffFl = !_vm->_soundManager->_voiceOffFl; + _vm->_soundMan->_voiceOffFl = !_vm->_soundMan->_voiceOffFl; - _vm->_soundManager->updateScummVMSoundSettings(); + _vm->_soundMan->updateScummVMSoundSettings(); } if (mousePos.x >= scrollOffset + 431) { if (mousePos.y > 113 && mousePos.x <= scrollOffset + 489 && mousePos.y <= 138) { - if (_vm->_soundManager->_musicOffFl) { - _vm->_soundManager->_musicOffFl = false; - _vm->_soundManager->setMODMusicVolume(_vm->_soundManager->_musicVolume); + if (_vm->_soundMan->_musicOffFl) { + _vm->_soundMan->_musicOffFl = false; + _vm->_soundMan->setMODMusicVolume(_vm->_soundMan->_musicVolume); } else { - _vm->_soundManager->_musicOffFl = true; - _vm->_soundManager->setMODMusicVolume(0); + _vm->_soundMan->_musicOffFl = true; + _vm->_soundMan->setMODMusicVolume(0); } - _vm->_soundManager->updateScummVMSoundSettings(); + _vm->_soundMan->updateScummVMSoundSettings(); } if (mousePos.x >= scrollOffset + 431 && mousePos.y > 140 && mousePos.x <= scrollOffset + 489 && mousePos.y <= 165) { - _vm->_soundManager->_soundOffFl = !_vm->_soundManager->_soundOffFl; + _vm->_soundMan->_soundOffFl = !_vm->_soundMan->_soundOffFl; - _vm->_soundManager->updateScummVMSoundSettings(); + _vm->_soundMan->updateScummVMSoundSettings(); } } } @@ -217,39 +217,39 @@ void DialogsManager::showOptionsDialog() { if (mousePos.x >= scrollOffset + 355 && mousePos.y > 285 && mousePos.x <= scrollOffset + 490 && mousePos.y <= 310) doneFlag = true; if (mousePos.x >= scrollOffset + 300 && mousePos.y > 194 && mousePos.x <= scrollOffset + 358 && mousePos.y <= 219) { - switch (_vm->_graphicsManager->_scrollSpeed) { + switch (_vm->_graphicsMan->_scrollSpeed) { case 1: - _vm->_graphicsManager->_scrollSpeed = 2; + _vm->_graphicsMan->_scrollSpeed = 2; break; case 2: - _vm->_graphicsManager->_scrollSpeed = 4; + _vm->_graphicsMan->_scrollSpeed = 4; break; case 4: - _vm->_graphicsManager->_scrollSpeed = 8; + _vm->_graphicsMan->_scrollSpeed = 8; break; case 8: - _vm->_graphicsManager->_scrollSpeed = 16; + _vm->_graphicsMan->_scrollSpeed = 16; break; case 16: - _vm->_graphicsManager->_scrollSpeed = 32; + _vm->_graphicsMan->_scrollSpeed = 32; break; case 32: - _vm->_graphicsManager->_scrollSpeed = 48; + _vm->_graphicsMan->_scrollSpeed = 48; break; case 48: - _vm->_graphicsManager->_scrollSpeed = 64; + _vm->_graphicsMan->_scrollSpeed = 64; break; case 64: - _vm->_graphicsManager->_scrollSpeed = 128; + _vm->_graphicsMan->_scrollSpeed = 128; break; case 128: - _vm->_graphicsManager->_scrollSpeed = 160; + _vm->_graphicsMan->_scrollSpeed = 160; break; case 160: - _vm->_graphicsManager->_scrollSpeed = 320; + _vm->_graphicsMan->_scrollSpeed = 320; break; case 320: - _vm->_graphicsManager->_scrollSpeed = 1; + _vm->_graphicsMan->_scrollSpeed = 1; break; } } @@ -270,14 +270,14 @@ void DialogsManager::showOptionsDialog() { else if (_vm->_globals->_speed == 3) _vm->_globals->_menuSpeed = 4; - _vm->_globals->_menuTextOff = !_vm->_soundManager->_textOffFl ? 7 : 8; - _vm->_globals->_menuVoiceOff = !_vm->_soundManager->_voiceOffFl ? 7 : 8; - _vm->_globals->_menuSoundOff = !_vm->_soundManager->_soundOffFl ? 7 : 8; - _vm->_globals->_menuMusicOff = !_vm->_soundManager->_musicOffFl ? 7 : 8; + _vm->_globals->_menuTextOff = !_vm->_soundMan->_textOffFl ? 7 : 8; + _vm->_globals->_menuVoiceOff = !_vm->_soundMan->_voiceOffFl ? 7 : 8; + _vm->_globals->_menuSoundOff = !_vm->_soundMan->_soundOffFl ? 7 : 8; + _vm->_globals->_menuMusicOff = !_vm->_soundMan->_musicOffFl ? 7 : 8; _vm->_globals->_menuDisplayType = 9; - switch (_vm->_graphicsManager->_scrollSpeed) { + switch (_vm->_graphicsMan->_scrollSpeed) { case 1: _vm->_globals->_menuScrollSpeed = 12; break; @@ -316,12 +316,12 @@ void DialogsManager::showOptionsDialog() { break; } - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } while (!doneFlag); - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, scrollOffset + 164, - 107, 335, 215, _vm->_graphicsManager->_frontBuffer, scrollOffset + 164, 107); - _vm->_graphicsManager->addDirtyRect(scrollOffset + 164, 107, scrollOffset + 498, 320); + _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, scrollOffset + 164, + 107, 335, 215, _vm->_graphicsMan->_frontBuffer, scrollOffset + 164, 107); + _vm->_graphicsMan->addDirtyRect(scrollOffset + 164, 107, scrollOffset + 498, 320); _vm->_globals->_optionDialogSpr = _vm->_globals->freeMemory(_vm->_globals->_optionDialogSpr); _vm->_globals->_optionDialogFl = false; @@ -331,24 +331,24 @@ void DialogsManager::showInventory() { if (_removeInventFl || _inventDisplayedFl || _vm->_globals->_disableInventFl) return; - _vm->_graphicsManager->_scrollStatus = 1; - _vm->_objectsManager->_eraseVisibleCounter = 4; - _vm->_objectsManager->_visibleFl = false; + _vm->_graphicsMan->_scrollStatus = 1; + _vm->_objectsMan->_eraseVisibleCounter = 4; + _vm->_objectsMan->_visibleFl = false; for (int i = 0; i <= 1; i++) { inventAnim(); - _vm->_eventsManager->getMouseX(); - _vm->_eventsManager->getMouseY(); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->getMouseX(); + _vm->_events->getMouseY(); + _vm->_events->refreshScreenAndEvents(); } _inventWin1 = NULL; bool loopFl; do { loopFl = false; - _vm->_eventsManager->_curMouseButton = 0; - _vm->_eventsManager->_mouseButton = 0; + _vm->_events->_curMouseButton = 0; + _vm->_events->_mouseButton = 0; _vm->_globals->_disableInventFl = true; - _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100); Common::String filename; if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) @@ -373,17 +373,17 @@ void DialogsManager::showInventory() { size_t filesize = f.size(); _inventWin1 = _vm->_globals->allocMemory(filesize); - _vm->_fileManager->readStream(f, _inventWin1, filesize); + _vm->_fileIO->readStream(f, _inventWin1, filesize); f.close(); - _inventBuf2 = _vm->_fileManager->loadFile("INVENT2.SPR"); + _inventBuf2 = _vm->_fileIO->loadFile("INVENT2.SPR"); - _inventX = _vm->_graphicsManager->_scrollOffset + 152; + _inventX = _vm->_graphicsMan->_scrollOffset + 152; _inventY = 114; - _inventWidth = _vm->_objectsManager->getWidth(_inventWin1, 0); - _inventHeight = _vm->_objectsManager->getHeight(_inventWin1, 0); + _inventWidth = _vm->_objectsMan->getWidth(_inventWin1, 0); + _inventHeight = _vm->_objectsMan->getHeight(_inventWin1, 0); - _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, _inventWin1, _inventX + 300, 414, 0, 0, 0, false); + _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, _inventWin1, _inventX + 300, 414, 0, 0, 0, false); int curPosY = 0; int inventCount = 0; for (int inventLine = 1; inventLine <= 5; inventLine++) { @@ -393,17 +393,17 @@ void DialogsManager::showInventory() { int inventIdx = _vm->_globals->_inventory[inventCount]; // The last two zones are not reserved for the inventory: Options and Save/Load if (inventIdx && inventCount <= 29) { - byte *obj = _vm->_objectsManager->loadObjectFromFile(inventIdx, false); - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, obj, _inventX + curPosX + 6, - curPosY + 120, _vm->_objectsManager->getObjectWidth(), _vm->_objectsManager->getObjectHeight()); + byte *obj = _vm->_objectsMan->loadObjectFromFile(inventIdx, false); + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, obj, _inventX + curPosX + 6, + curPosY + 120, _vm->_objectsMan->getObjectWidth(), _vm->_objectsMan->getObjectHeight()); _vm->_globals->freeMemory(obj); } curPosX += 54; }; curPosY += 38; } - _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_frontBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight); - _vm->_eventsManager->_curMouseButton = 0; + _vm->_graphicsMan->copySurfaceRect(_vm->_graphicsMan->_frontBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight); + _vm->_events->_curMouseButton = 0; int newInventoryItem = 0; // Main loop to select an inventory item @@ -411,39 +411,39 @@ void DialogsManager::showInventory() { // Turn on drawing the inventory dialog in the event manager _inventDisplayedFl = true; - int mousePosX = _vm->_eventsManager->getMouseX(); - int mousePosY = _vm->_eventsManager->getMouseY(); - int mouseButton = _vm->_eventsManager->getMouseButton(); + int mousePosX = _vm->_events->getMouseX(); + int mousePosY = _vm->_events->getMouseY(); + int mouseButton = _vm->_events->getMouseButton(); int oldInventoryItem = newInventoryItem; - newInventoryItem = _vm->_linesManager->checkInventoryHotspots(mousePosX, mousePosY); + newInventoryItem = _vm->_linesMan->checkInventoryHotspots(mousePosX, mousePosY); if (newInventoryItem != oldInventoryItem) - _vm->_objectsManager->initBorder(newInventoryItem); - if (_vm->_eventsManager->_mouseCursorId != 1 && _vm->_eventsManager->_mouseCursorId != 2 && _vm->_eventsManager->_mouseCursorId != 3 && _vm->_eventsManager->_mouseCursorId != 16) { + _vm->_objectsMan->initBorder(newInventoryItem); + if (_vm->_events->_mouseCursorId != 1 && _vm->_events->_mouseCursorId != 2 && _vm->_events->_mouseCursorId != 3 && _vm->_events->_mouseCursorId != 16) { if (mouseButton == 2) { - _vm->_objectsManager->nextObjectIcon(newInventoryItem); - if (_vm->_eventsManager->_mouseCursorId != 23) - _vm->_eventsManager->changeMouseCursor(_vm->_eventsManager->_mouseCursorId); + _vm->_objectsMan->nextObjectIcon(newInventoryItem); + if (_vm->_events->_mouseCursorId != 23) + _vm->_events->changeMouseCursor(_vm->_events->_mouseCursorId); } } if (mouseButton == 1) { - if (_vm->_eventsManager->_mouseCursorId == 1 || _vm->_eventsManager->_mouseCursorId == 2 || _vm->_eventsManager->_mouseCursorId == 3 || _vm->_eventsManager->_mouseCursorId == 16 || !_vm->_eventsManager->_mouseCursorId) + if (_vm->_events->_mouseCursorId == 1 || _vm->_events->_mouseCursorId == 2 || _vm->_events->_mouseCursorId == 3 || _vm->_events->_mouseCursorId == 16 || !_vm->_events->_mouseCursorId) break; - _vm->_objectsManager->takeInventoryObject(_vm->_globals->_inventory[newInventoryItem]); - if (_vm->_eventsManager->_mouseCursorId == 8) + _vm->_objectsMan->takeInventoryObject(_vm->_globals->_inventory[newInventoryItem]); + if (_vm->_events->_mouseCursorId == 8) break; - _vm->_scriptManager->_tempObjectFl = true; - _vm->_globals->_saveData->_data[svLastObjectIndex] = _vm->_objectsManager->_curObjectIndex; + _vm->_script->_tempObjectFl = true; + _vm->_globals->_saveData->_data[svLastObjectIndex] = _vm->_objectsMan->_curObjectIndex; _vm->_globals->_saveData->_data[svLastInventoryItem] = _vm->_globals->_inventory[newInventoryItem]; - _vm->_globals->_saveData->_data[svLastInvMouseCursor] = _vm->_eventsManager->_mouseCursorId; - _vm->_objectsManager->loadObjectIniFile(); - _vm->_scriptManager->_tempObjectFl = false; + _vm->_globals->_saveData->_data[svLastInvMouseCursor] = _vm->_events->_mouseCursorId; + _vm->_objectsMan->loadObjectIniFile(); + _vm->_script->_tempObjectFl = false; - if (_vm->_soundManager->_voiceOffFl) { + if (_vm->_soundMan->_voiceOffFl) { do - _vm->_eventsManager->refreshScreenAndEvents(); - while (!_vm->_globals->_exitId && _vm->_eventsManager->getMouseButton() != 1); - _vm->_fontManager->hideText(9); + _vm->_events->refreshScreenAndEvents(); + while (!_vm->_globals->_exitId && _vm->_events->getMouseButton() != 1); + _vm->_fontMan->hideText(9); } if (_vm->_globals->_exitId) { if (_vm->_globals->_exitId == 2) { @@ -461,36 +461,36 @@ void DialogsManager::showInventory() { } if (_removeInventFl) break; - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); if (_vm->_globals->_screenId >= 35 && _vm->_globals->_screenId <= 40) - _vm->_objectsManager->handleSpecialGames(); + _vm->_objectsMan->handleSpecialGames(); } } while (loopFl); - _vm->_fontManager->hideText(9); + _vm->_fontMan->hideText(9); if (_inventDisplayedFl) { _inventDisplayedFl = false; - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, _inventX, 114, _inventWidth, _inventHeight, _vm->_graphicsManager->_frontBuffer, _inventX, 114); - _vm->_graphicsManager->addDirtyRect(_inventX, 114, _inventX + _inventWidth, _inventWidth + 114); - _vm->_objectsManager->_refreshBobMode10Fl = true; + _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, _inventX, 114, _inventWidth, _inventHeight, _vm->_graphicsMan->_frontBuffer, _inventX, 114); + _vm->_graphicsMan->addDirtyRect(_inventX, 114, _inventX + _inventWidth, _inventWidth + 114); + _vm->_objectsMan->_refreshBobMode10Fl = true; } _inventWin1 = _vm->_globals->freeMemory(_inventWin1); _inventBuf2 = _vm->_globals->freeMemory(_inventBuf2); - if (_vm->_eventsManager->_mouseCursorId == 1) + if (_vm->_events->_mouseCursorId == 1) showOptionsDialog(); - else if (_vm->_eventsManager->_mouseCursorId == 3) + else if (_vm->_events->_mouseCursorId == 3) showLoadGame(); - else if (_vm->_eventsManager->_mouseCursorId == 2) + else if (_vm->_events->_mouseCursorId == 2) showSaveGame(); - _vm->_eventsManager->_mouseCursorId = 4; - _vm->_eventsManager->changeMouseCursor(4); - _vm->_objectsManager->_oldBorderPos = Common::Point(0, 0); - _vm->_objectsManager->_borderPos = Common::Point(0, 0); + _vm->_events->_mouseCursorId = 4; + _vm->_events->changeMouseCursor(4); + _vm->_objectsMan->_oldBorderPos = Common::Point(0, 0); + _vm->_objectsMan->_borderPos = Common::Point(0, 0); _vm->_globals->_disableInventFl = false; - _vm->_graphicsManager->_scrollStatus = 0; + _vm->_graphicsMan->_scrollStatus = 0; } /** @@ -500,42 +500,42 @@ void DialogsManager::inventAnim() { if (_vm->_globals->_disableInventFl) return; - if (_vm->_objectsManager->_eraseVisibleCounter && !_vm->_objectsManager->_visibleFl) { - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, _oldInventX, 27, 48, 38, - _vm->_graphicsManager->_frontBuffer, _oldInventX, 27); - _vm->_graphicsManager->addDirtyRect(_oldInventX, 27, _oldInventX + 48, 65); - --_vm->_objectsManager->_eraseVisibleCounter; + if (_vm->_objectsMan->_eraseVisibleCounter && !_vm->_objectsMan->_visibleFl) { + _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, _oldInventX, 27, 48, 38, + _vm->_graphicsMan->_frontBuffer, _oldInventX, 27); + _vm->_graphicsMan->addDirtyRect(_oldInventX, 27, _oldInventX + 48, 65); + --_vm->_objectsMan->_eraseVisibleCounter; } - if (_vm->_objectsManager->_visibleFl) { + if (_vm->_objectsMan->_visibleFl) { if (_oldInventX <= 1) _oldInventX = 2; - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, _oldInventX, 27, 48, 38, - _vm->_graphicsManager->_frontBuffer, _oldInventX, 27); + _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, _oldInventX, 27, 48, 38, + _vm->_graphicsMan->_frontBuffer, _oldInventX, 27); - _vm->_graphicsManager->addDirtyRect(_oldInventX, 27, _oldInventX + 48, 65); - int newOffset = _vm->_graphicsManager->_scrollOffset + 2; - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _inventoryIcons, newOffset + 300, 327, 0); - _vm->_graphicsManager->addDirtyRect(newOffset, 27, newOffset + 45, 62); + _vm->_graphicsMan->addDirtyRect(_oldInventX, 27, _oldInventX + 48, 65); + int newOffset = _vm->_graphicsMan->_scrollOffset + 2; + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _inventoryIcons, newOffset + 300, 327, 0); + _vm->_graphicsMan->addDirtyRect(newOffset, 27, newOffset + 45, 62); _oldInventX = newOffset; } if (_vm->_globals->_saveData->_data[svField357] == 1) { if (_vm->_globals->_saveData->_data[svField353] == 1) - _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false); + _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_headSprites, 832, 325, 0, 0, 0, false); if (_vm->_globals->_saveData->_data[svField355] == 1) - _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 866, 325, 1, 0, 0, false); - _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); - _vm->_graphicsManager->addDirtyRect(566, 25, 594, 60); + _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_headSprites, 866, 325, 1, 0, 0, false); + _vm->_graphicsMan->addDirtyRect(532, 25, 560, 60); + _vm->_graphicsMan->addDirtyRect(566, 25, 594, 60); } if (_vm->_globals->_saveData->_data[svField356] == 1) { - _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false); - _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); + _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_headSprites, 832, 325, 0, 0, 0, false); + _vm->_graphicsMan->addDirtyRect(532, 25, 560, 60); } if (_vm->_globals->_saveData->_data[svField354] == 1) { - _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false); - _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); + _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_headSprites, 832, 325, 0, 0, 0, false); + _vm->_graphicsMan->addDirtyRect(532, 25, 560, 60); } } @@ -544,13 +544,13 @@ void DialogsManager::inventAnim() { */ void DialogsManager::testDialogOpening() { if (_vm->_globals->_cityMapEnabledFl) - _vm->_eventsManager->_gameKey = KEY_NONE; + _vm->_events->_gameKey = KEY_NONE; - if ((_vm->_eventsManager->_gameKey == KEY_NONE) || _inventFl) + if ((_vm->_events->_gameKey == KEY_NONE) || _inventFl) return; - DIALOG_KEY key = _vm->_eventsManager->_gameKey; - _vm->_eventsManager->_gameKey = KEY_NONE; + DIALOG_KEY key = _vm->_events->_gameKey; + _vm->_events->_gameKey = KEY_NONE; _inventFl = true; switch (key) { @@ -558,86 +558,86 @@ void DialogsManager::testDialogOpening() { showInventory(); break; case KEY_OPTIONS: - _vm->_graphicsManager->_scrollStatus = 1; + _vm->_graphicsMan->_scrollStatus = 1; showOptionsDialog(); - _vm->_graphicsManager->_scrollStatus = 0; + _vm->_graphicsMan->_scrollStatus = 0; break; case KEY_LOAD: - _vm->_graphicsManager->_scrollStatus = 1; + _vm->_graphicsMan->_scrollStatus = 1; showLoadGame(); - _vm->_graphicsManager->_scrollStatus = 0; + _vm->_graphicsMan->_scrollStatus = 0; break; case KEY_SAVE: - _vm->_graphicsManager->_scrollStatus = 1; + _vm->_graphicsMan->_scrollStatus = 1; showSaveGame(); - _vm->_graphicsManager->_scrollStatus = 0; + _vm->_graphicsMan->_scrollStatus = 0; break; default: break; } _inventFl = false; - _vm->_eventsManager->_gameKey = KEY_NONE; + _vm->_events->_gameKey = KEY_NONE; } /** * Load Game dialog */ void DialogsManager::showLoadGame() { - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); showSaveLoad(MODE_LOAD); int slotNumber; do { slotNumber = searchSavegames(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (!_vm->shouldQuit() && (!slotNumber || _vm->_eventsManager->getMouseButton() != 1)); - _vm->_objectsManager->_saveLoadFl = false; - int16 startPosX = _vm->_eventsManager->_startPos.x + 183; - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, startPosX, 60, 274, 353, _vm->_graphicsManager->_frontBuffer, startPosX, 60); - _vm->_graphicsManager->addDirtyRect(startPosX, 60, startPosX + 274, 413); - _vm->_objectsManager->_refreshBobMode10Fl = true; - _vm->_objectsManager->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite); - _vm->_objectsManager->_saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite2); - _vm->_objectsManager->_saveLoadX = 0; - _vm->_objectsManager->_saveLoadY = 0; + _vm->_events->refreshScreenAndEvents(); + } while (!_vm->shouldQuit() && (!slotNumber || _vm->_events->getMouseButton() != 1)); + _vm->_objectsMan->_saveLoadFl = false; + int16 startPosX = _vm->_events->_startPos.x + 183; + _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, startPosX, 60, 274, 353, _vm->_graphicsMan->_frontBuffer, startPosX, 60); + _vm->_graphicsMan->addDirtyRect(startPosX, 60, startPosX + 274, 413); + _vm->_objectsMan->_refreshBobMode10Fl = true; + _vm->_objectsMan->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsMan->_saveLoadSprite); + _vm->_objectsMan->_saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsMan->_saveLoadSprite2); + _vm->_objectsMan->_saveLoadX = 0; + _vm->_objectsMan->_saveLoadY = 0; if (slotNumber != 7) { - _vm->_saveLoadManager->loadGame(slotNumber); + _vm->_saveLoad->loadGame(slotNumber); } - _vm->_objectsManager->changeObject(14); + _vm->_objectsMan->changeObject(14); } /** * Save Game dialog */ void DialogsManager::showSaveGame() { - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); showSaveLoad(MODE_SAVE); int slotNumber; do { slotNumber = searchSavegames(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (!_vm->shouldQuit() && (!slotNumber || _vm->_eventsManager->getMouseButton() != 1)); - - _vm->_objectsManager->_saveLoadFl = false; - int16 startPosX = _vm->_eventsManager->_startPos.x + 183; - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, startPosX, 60, 274, 353, _vm->_graphicsManager->_frontBuffer, startPosX, 60); - _vm->_graphicsManager->addDirtyRect(startPosX, 60, startPosX + 274, 413); - _vm->_objectsManager->_refreshBobMode10Fl = true; - _vm->_objectsManager->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite); - _vm->_objectsManager->_saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite2); - _vm->_objectsManager->_saveLoadX = 0; - _vm->_objectsManager->_saveLoadY = 0; + _vm->_events->refreshScreenAndEvents(); + } while (!_vm->shouldQuit() && (!slotNumber || _vm->_events->getMouseButton() != 1)); + + _vm->_objectsMan->_saveLoadFl = false; + int16 startPosX = _vm->_events->_startPos.x + 183; + _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, startPosX, 60, 274, 353, _vm->_graphicsMan->_frontBuffer, startPosX, 60); + _vm->_graphicsMan->addDirtyRect(startPosX, 60, startPosX + 274, 413); + _vm->_objectsMan->_refreshBobMode10Fl = true; + _vm->_objectsMan->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsMan->_saveLoadSprite); + _vm->_objectsMan->_saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsMan->_saveLoadSprite2); + _vm->_objectsMan->_saveLoadX = 0; + _vm->_objectsMan->_saveLoadY = 0; if (slotNumber != 7) { // Since the original GUI doesn't support save names, use a default name Common::String saveName = Common::String::format("Save #%d", slotNumber); // Save the game - _vm->_saveLoadManager->saveGame(slotNumber, saveName); + _vm->_saveLoad->saveGame(slotNumber, saveName); } } @@ -663,50 +663,50 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) { } } - _vm->_objectsManager->_saveLoadSprite = _vm->_objectsManager->loadSprite(filename); - _vm->_objectsManager->_saveLoadSprite2 = _vm->_objectsManager->loadSprite("SAVE2.SPR"); - int16 startPosX = _vm->_eventsManager->_startPos.x; - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, startPosX + 483, 360, 0); + _vm->_objectsMan->_saveLoadSprite = _vm->_objectsMan->loadSprite(filename); + _vm->_objectsMan->_saveLoadSprite2 = _vm->_objectsMan->loadSprite("SAVE2.SPR"); + int16 startPosX = _vm->_events->_startPos.x; + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, startPosX + 483, 360, 0); if (_vm->_globals->_language == LANG_FR) { if (mode == MODE_SAVE) - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, startPosX + 525, 375, 1); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, startPosX + 525, 375, 1); else if (mode == MODE_LOAD) - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, startPosX + 515, 375, 2); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, startPosX + 515, 375, 2); } else { if (mode == MODE_SAVE) - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, startPosX + 535, 372, 1); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, startPosX + 535, 372, 1); else if (mode == MODE_LOAD) - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, startPosX + 539, 372, 2); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, startPosX + 539, 372, 2); } for (int slotNumber = 1; slotNumber <= 6; ++slotNumber) { hopkinsSavegameHeader header; - if (_vm->_saveLoadManager->readSavegameHeader(slotNumber, header)) { + if (_vm->_saveLoad->readSavegameHeader(slotNumber, header)) { Graphics::Surface thumb8; - _vm->_saveLoadManager->convertThumb16To8(header._thumbnail, &thumb8); + _vm->_saveLoad->convertThumb16To8(header._thumbnail, &thumb8); byte *thumb = (byte *)thumb8.pixels; - int16 startPosX = _vm->_eventsManager->_startPos.x; + int16 startPosX = _vm->_events->_startPos.x; switch (slotNumber) { case 1: - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, thumb, startPosX + 190, 112, 128, 87); + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX + 190, 112, 128, 87); break; case 2: - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, thumb, startPosX + 323, 112, 128, 87); + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX + 323, 112, 128, 87); break; case 3: - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, thumb, startPosX + 190, 203, 128, 87); + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX + 190, 203, 128, 87); break; case 4: - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, thumb, startPosX + 323, 203, 128, 87); + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX + 323, 203, 128, 87); break; case 5: - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, thumb, startPosX + 190, 294, 128, 87); + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX + 190, 294, 128, 87); break; case 6: - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, thumb, startPosX + 323, 294, 128, 87); + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, thumb, startPosX + 323, 294, 128, 87); break; } @@ -716,60 +716,60 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) { } } - _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353); - _vm->_objectsManager->_saveLoadFl = true; - _vm->_objectsManager->_saveLoadX = 0; - _vm->_objectsManager->_saveLoadY = 0; + _vm->_graphicsMan->copySurfaceRect(_vm->_graphicsMan->_frontBuffer, _vm->_objectsMan->_saveLoadSprite, _vm->_events->_startPos.x + 183, 60, 274, 353); + _vm->_objectsMan->_saveLoadFl = true; + _vm->_objectsMan->_saveLoadX = 0; + _vm->_objectsMan->_saveLoadY = 0; } /** * Search savegames */ int DialogsManager::searchSavegames() { - int xp = _vm->_eventsManager->getMouseX(); - int yp = _vm->_eventsManager->getMouseY(); + int xp = _vm->_events->getMouseX(); + int yp = _vm->_events->getMouseY(); - int16 startPosX = _vm->_graphicsManager->_scrollOffset = _vm->_eventsManager->_startPos.x; + int16 startPosX = _vm->_graphicsMan->_scrollOffset = _vm->_events->_startPos.x; int slotNumber = 0; if (yp >= 112 && yp <= 198) { if (xp > startPosX + 189 && xp < startPosX + 318) { slotNumber = 1; - _vm->_objectsManager->_saveLoadX = 189; - _vm->_objectsManager->_saveLoadY = 111; + _vm->_objectsMan->_saveLoadX = 189; + _vm->_objectsMan->_saveLoadY = 111; } else if (xp > startPosX + 322 && xp < startPosX + 452) { slotNumber = 2; - _vm->_objectsManager->_saveLoadX = 322; - _vm->_objectsManager->_saveLoadY = 111; + _vm->_objectsMan->_saveLoadX = 322; + _vm->_objectsMan->_saveLoadY = 111; } } else if (yp >= 203 && yp <= 289) { if (xp > startPosX + 189 && xp < startPosX + 318) { slotNumber = 3; - _vm->_objectsManager->_saveLoadX = 189; - _vm->_objectsManager->_saveLoadY = 202; + _vm->_objectsMan->_saveLoadX = 189; + _vm->_objectsMan->_saveLoadY = 202; } else if (xp > startPosX + 322 && xp < startPosX + 452) { slotNumber = 4; - _vm->_objectsManager->_saveLoadX = 322; - _vm->_objectsManager->_saveLoadY = 202; + _vm->_objectsMan->_saveLoadX = 322; + _vm->_objectsMan->_saveLoadY = 202; } } else if (yp >= 294 && yp <= 380) { if (xp > startPosX + 189 && xp < startPosX + 318) { slotNumber = 5; - _vm->_objectsManager->_saveLoadX = 189; - _vm->_objectsManager->_saveLoadY = 293; + _vm->_objectsMan->_saveLoadX = 189; + _vm->_objectsMan->_saveLoadY = 293; } else if (xp > startPosX + 322 && xp < startPosX + 452) { slotNumber = 6; - _vm->_objectsManager->_saveLoadX = 322; - _vm->_objectsManager->_saveLoadY = 293; + _vm->_objectsMan->_saveLoadX = 322; + _vm->_objectsMan->_saveLoadY = 293; } } else if (yp >= 388 && yp <= 404 && xp > startPosX + 273 && xp < startPosX + 355) { slotNumber = 7; - _vm->_objectsManager->_saveLoadX = 0; - _vm->_objectsManager->_saveLoadY = 0; + _vm->_objectsMan->_saveLoadX = 0; + _vm->_objectsMan->_saveLoadY = 0; } else { slotNumber = 0; - _vm->_objectsManager->_saveLoadX = 0; - _vm->_objectsManager->_saveLoadY = 0; + _vm->_objectsMan->_saveLoadX = 0; + _vm->_objectsMan->_saveLoadY = 0; } return slotNumber; diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 731bc885fc..b76fd6a6f4 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -84,18 +84,18 @@ void EventsManager::initMouseData() { switch (_vm->_globals->_language) { case LANG_EN: if (!_mouseLinuxFl) - _mouseCursor = _vm->_fileManager->loadFile("SOUAN.SPR"); + _mouseCursor = _vm->_fileIO->loadFile("SOUAN.SPR"); else - _mouseCursor = _vm->_fileManager->loadFile("LSOUAN.SPR"); + _mouseCursor = _vm->_fileIO->loadFile("LSOUAN.SPR"); break; case LANG_FR: if (!_mouseLinuxFl) - _mouseCursor = _vm->_fileManager->loadFile("SOUFR.SPR"); + _mouseCursor = _vm->_fileIO->loadFile("SOUFR.SPR"); else - _mouseCursor = _vm->_fileManager->loadFile("LSOUFR.SPR"); + _mouseCursor = _vm->_fileIO->loadFile("LSOUFR.SPR"); break; case LANG_SP: - _mouseCursor = _vm->_fileManager->loadFile("SOUES.SPR"); + _mouseCursor = _vm->_fileIO->loadFile("SOUES.SPR"); break; } } @@ -206,7 +206,7 @@ void EventsManager::changeMouseCursor(int id) { * Check Events */ void EventsManager::refreshEvents() { - _vm->_soundManager->checkSounds(); + _vm->_soundMan->checkSounds(); pollEvents(); } @@ -227,10 +227,10 @@ void EventsManager::checkForNextFrameCounter() { if ((milli - _priorFrameTime) >= GAME_FRAME_TIME) { ++_gameCounter; _priorFrameTime = milli; - _vm->_graphicsManager->updateScreen(); + _vm->_graphicsMan->updateScreen(); // Signal the ScummVM debugger - _vm->_debugger->onFrame(); + _vm->_debug->onFrame(); } } @@ -297,8 +297,8 @@ void EventsManager::handleKey(Common::Event &event) { // Check for debugger if ((event.kbd.keycode == Common::KEYCODE_d) && (event.kbd.flags & Common::KBD_CTRL)) { // Attach to the debugger - _vm->_debugger->attach(); - _vm->_debugger->onFrame(); + _vm->_debug->attach(); + _vm->_debug->onFrame(); } } @@ -372,28 +372,28 @@ void EventsManager::refreshScreenAndEvents() { width = _mouseSizeX; height = _mouseSizeY; if (_mouseCursorId == 23) { - width = _vm->_objectsManager->getObjectWidth(); - height = _vm->_objectsManager->getObjectHeight(); + width = _vm->_objectsMan->getObjectWidth(); + height = _vm->_objectsMan->getObjectHeight(); } else { if (_breakoutFl) { - if (xp < _vm->_graphicsManager->_minX) - xp = _vm->_graphicsManager->_minX; - if (_mousePos.y < _vm->_graphicsManager->_minY) - yp = _vm->_graphicsManager->_minY; - if (_mouseSizeX + xp >= _vm->_graphicsManager->_maxX) - width = _mouseSizeX - (_mouseSizeX + xp - _vm->_graphicsManager->_maxX); - if (yp + _mouseSizeY >= _vm->_graphicsManager->_maxY) - height = _vm->_graphicsManager->_maxY - yp; + if (xp < _vm->_graphicsMan->_minX) + xp = _vm->_graphicsMan->_minX; + if (_mousePos.y < _vm->_graphicsMan->_minY) + yp = _vm->_graphicsMan->_minY; + if (_mouseSizeX + xp >= _vm->_graphicsMan->_maxX) + width = _mouseSizeX - (_mouseSizeX + xp - _vm->_graphicsMan->_maxX); + if (yp + _mouseSizeY >= _vm->_graphicsMan->_maxY) + height = _vm->_graphicsMan->_maxY - yp; } else { - if (xp < _vm->_graphicsManager->_minX) - xp = _vm->_graphicsManager->_minX - mouseWidth; + if (xp < _vm->_graphicsMan->_minX) + xp = _vm->_graphicsMan->_minX - mouseWidth; mouseHeight = (int16)mouseHeight; - if (_mousePos.y < _vm->_graphicsManager->_minY - mouseHeight) - yp = _vm->_graphicsManager->_minY - mouseHeight; - if (_mouseSizeX + xp >= _vm->_graphicsManager->_maxX) - width = _mouseSizeX - (_mouseSizeX + xp - _vm->_graphicsManager->_maxX - mouseWidth); - if (yp + _mouseSizeY >= mouseHeight + _vm->_graphicsManager->_maxY) - height = _vm->_graphicsManager->_maxY - mouseHeight - yp; + if (_mousePos.y < _vm->_graphicsMan->_minY - mouseHeight) + yp = _vm->_graphicsMan->_minY - mouseHeight; + if (_mouseSizeX + xp >= _vm->_graphicsMan->_maxX) + width = _mouseSizeX - (_mouseSizeX + xp - _vm->_graphicsMan->_maxX - mouseWidth); + if (yp + _mouseSizeY >= mouseHeight + _vm->_graphicsMan->_maxY) + height = _vm->_graphicsMan->_maxY - mouseHeight - yp; } right = xp + width; bottom = yp + height; @@ -401,22 +401,22 @@ void EventsManager::refreshScreenAndEvents() { } if (!_vm->_globals->_linuxEndDemoFl) - _vm->_objectsManager->displaySprite(); + _vm->_objectsMan->displaySprite(); if (!_mouseFl) { updateCursor(); } else if (_mouseCursorId == 23) { - if (yp < _vm->_graphicsManager->_maxY && xp < _vm->_graphicsManager->_maxX) { - if (width + xp > _vm->_graphicsManager->_maxX) - width = _vm->_graphicsManager->_maxX - xp; - if (yp + height > _vm->_graphicsManager->_maxY) - height = _vm->_graphicsManager->_maxY - yp; + if (yp < _vm->_graphicsMan->_maxY && xp < _vm->_graphicsMan->_maxX) { + if (width + xp > _vm->_graphicsMan->_maxX) + width = _vm->_graphicsMan->_maxX - xp; + if (yp + height > _vm->_graphicsMan->_maxY) + height = _vm->_graphicsMan->_maxY - yp; if (width > 1 && height > 1) { updateCursor(); } } - } else if (yp < _vm->_graphicsManager->_maxY && xp < _vm->_graphicsManager->_maxX && width > 1 && height > 1) { + } else if (yp < _vm->_graphicsMan->_maxY && xp < _vm->_graphicsMan->_maxX && width > 1 && height > 1) { updateCursor(); - _vm->_graphicsManager->addDirtyRect(xp, yp, right, bottom); + _vm->_graphicsMan->addDirtyRect(xp, yp, right, bottom); } _vm->_globals->_speed = 2; @@ -450,76 +450,76 @@ void EventsManager::refreshScreenAndEvents() { } while (!_vm->shouldQuit() && _vm->_globals->_eventMode == 3 && _rateCounter <= 15); _vm->_globals->_speed = 2; _rateCounter = 0; - if (!_vm->_graphicsManager->_largeScreenFl || _vm->_graphicsManager->_scrollStatus == 1) { - _vm->_graphicsManager->displayDirtyRects(); + if (!_vm->_graphicsMan->_largeScreenFl || _vm->_graphicsMan->_scrollStatus == 1) { + _vm->_graphicsMan->displayDirtyRects(); } else { - if (_vm->_graphicsManager->_scrollStatus != 2) { - if (getMouseX() > _vm->_graphicsManager->_scrollPosX + 620) - _vm->_graphicsManager->_scrollPosX += _vm->_graphicsManager->_scrollSpeed; - if (getMouseX() < _vm->_graphicsManager->_scrollPosX + 10) - _vm->_graphicsManager->_scrollPosX -= _vm->_graphicsManager->_scrollSpeed; + if (_vm->_graphicsMan->_scrollStatus != 2) { + if (getMouseX() > _vm->_graphicsMan->_scrollPosX + 620) + _vm->_graphicsMan->_scrollPosX += _vm->_graphicsMan->_scrollSpeed; + if (getMouseX() < _vm->_graphicsMan->_scrollPosX + 10) + _vm->_graphicsMan->_scrollPosX -= _vm->_graphicsMan->_scrollSpeed; } - _vm->_graphicsManager->_scrollPosX = CLIP(_vm->_graphicsManager->_scrollPosX, 0, SCREEN_WIDTH); - if (_vm->_graphicsManager->_oldScrollPosX == _vm->_graphicsManager->_scrollPosX) { - _vm->_graphicsManager->displayDirtyRects(); + _vm->_graphicsMan->_scrollPosX = CLIP(_vm->_graphicsMan->_scrollPosX, 0, SCREEN_WIDTH); + if (_vm->_graphicsMan->_oldScrollPosX == _vm->_graphicsMan->_scrollPosX) { + _vm->_graphicsMan->displayDirtyRects(); } else { - _vm->_fontManager->hideText(9); - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->copy16BitRect(_vm->_graphicsManager->_frontBuffer, _vm->_graphicsManager->_scrollPosX, 20, SCREEN_WIDTH, 440, 0, 20); - _vm->_graphicsManager->unlockScreen(); + _vm->_fontMan->hideText(9); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_scrollPosX, 20, SCREEN_WIDTH, 440, 0, 20); + _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsManager->resetRefreshRects(); - _vm->_graphicsManager->addRefreshRect(0, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 20); + _vm->_graphicsMan->resetRefreshRects(); + _vm->_graphicsMan->addRefreshRect(0, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 20); - _vm->_graphicsManager->resetDirtyRects(); + _vm->_graphicsMan->resetDirtyRects(); - _startPos.x = _vm->_graphicsManager->_scrollPosX; - _vm->_graphicsManager->_scrollOffset = _vm->_graphicsManager->_scrollPosX; + _startPos.x = _vm->_graphicsMan->_scrollPosX; + _vm->_graphicsMan->_scrollOffset = _vm->_graphicsMan->_scrollPosX; } - _vm->_graphicsManager->_oldScrollPosX = _vm->_graphicsManager->_scrollPosX; - _startPos.x = _vm->_graphicsManager->_scrollPosX; - _vm->_graphicsManager->_scrollOffset = _vm->_graphicsManager->_scrollPosX; + _vm->_graphicsMan->_oldScrollPosX = _vm->_graphicsMan->_scrollPosX; + _startPos.x = _vm->_graphicsMan->_scrollPosX; + _vm->_graphicsMan->_scrollOffset = _vm->_graphicsMan->_scrollPosX; } _curMouseButton = _mouseButton; _mouseButton = 0; - _vm->_soundManager->checkSoundEnd(); + _vm->_soundMan->checkSoundEnd(); refreshEvents(); } void EventsManager::updateCursor() { // Backup the current sprite clipping bounds and reset them - Common::Rect clipBounds(_vm->_graphicsManager->_minX, _vm->_graphicsManager->_minY, - _vm->_graphicsManager->_maxX, _vm->_graphicsManager->_maxY); - _vm->_graphicsManager->_minX = _vm->_graphicsManager->_minY = 0; - _vm->_graphicsManager->_maxX = _vm->_objectsManager->getObjectWidth(); - _vm->_graphicsManager->_maxY = _vm->_objectsManager->getObjectHeight(); - int pitch = _vm->_graphicsManager->_lineNbr2; - _vm->_graphicsManager->_lineNbr2 = _vm->_objectsManager->getObjectWidth(); + Common::Rect clipBounds(_vm->_graphicsMan->_minX, _vm->_graphicsMan->_minY, + _vm->_graphicsMan->_maxX, _vm->_graphicsMan->_maxY); + _vm->_graphicsMan->_minX = _vm->_graphicsMan->_minY = 0; + _vm->_graphicsMan->_maxX = _vm->_objectsMan->getObjectWidth(); + _vm->_graphicsMan->_maxY = _vm->_objectsMan->getObjectHeight(); + int pitch = _vm->_graphicsMan->_lineNbr2; + _vm->_graphicsMan->_lineNbr2 = _vm->_objectsMan->getObjectWidth(); // Create the temporary cursor surface - byte *cursorSurface = new byte[_vm->_objectsManager->getObjectHeight() * _vm->_objectsManager->getObjectWidth()]; - Common::fill(cursorSurface, cursorSurface + _vm->_objectsManager->getObjectHeight() * _vm->_objectsManager->getObjectWidth(), 0); + byte *cursorSurface = new byte[_vm->_objectsMan->getObjectHeight() * _vm->_objectsMan->getObjectWidth()]; + Common::fill(cursorSurface, cursorSurface + _vm->_objectsMan->getObjectHeight() * _vm->_objectsMan->getObjectWidth(), 0); if (_mouseCursorId != 23) { // Draw standard cursor - _vm->_graphicsManager->drawVesaSprite(cursorSurface, _mouseCursor, 300, 300, _mouseSpriteId); + _vm->_graphicsMan->drawVesaSprite(cursorSurface, _mouseCursor, 300, 300, _mouseSpriteId); } else { // Draw the active inventory object - _vm->_graphicsManager->drawCompressedSprite(cursorSurface, _objectBuf, 300, 300, 0, 0, 0, false); + _vm->_graphicsMan->drawCompressedSprite(cursorSurface, _objectBuf, 300, 300, 0, 0, 0, false); } // Reset the clipping bounds - _vm->_graphicsManager->_minX = clipBounds.left; - _vm->_graphicsManager->_minY = clipBounds.top; - _vm->_graphicsManager->_maxX = clipBounds.right; - _vm->_graphicsManager->_maxY = clipBounds.bottom; - _vm->_graphicsManager->_lineNbr2 = pitch; + _vm->_graphicsMan->_minX = clipBounds.left; + _vm->_graphicsMan->_minY = clipBounds.top; + _vm->_graphicsMan->_maxX = clipBounds.right; + _vm->_graphicsMan->_maxY = clipBounds.bottom; + _vm->_graphicsMan->_lineNbr2 = pitch; // Create a cursor palette Graphics::PixelFormat pixelFormat = g_system->getScreenFormat(); byte *cursorPalette = new byte[3 * PALETTE_SIZE]; - uint16 *paletteColors = (uint16 *)_vm->_graphicsManager->_palettePixels; + uint16 *paletteColors = (uint16 *)_vm->_graphicsMan->_palettePixels; for (int i = 0; i < PALETTE_SIZE; i++) { uint8 r, g, b; @@ -534,7 +534,7 @@ void EventsManager::updateCursor() { // Set the ScummVM cursor from the surface CursorMan.replaceCursorPalette(cursorPalette, 0, PALETTE_SIZE - 1); - CursorMan.replaceCursor(cursorSurface, _vm->_objectsManager->getObjectWidth(), _vm->_objectsManager->getObjectHeight(), + CursorMan.replaceCursor(cursorSurface, _vm->_objectsMan->getObjectWidth(), _vm->_objectsMan->getObjectHeight(), xOffset, 0, 0, true); // Delete the cursor surface and palette diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp index 7765c5c579..611327e9a8 100644 --- a/engines/hopkins/font.cpp +++ b/engines/hopkins/font.cpp @@ -47,13 +47,13 @@ FontManager::~FontManager() { void FontManager::loadZoneText() { switch (_vm->_globals->_language) { case LANG_EN: - _zoneText = _vm->_fileManager->loadFile("ZONEAN.TXT"); + _zoneText = _vm->_fileIO->loadFile("ZONEAN.TXT"); break; case LANG_FR: - _zoneText = _vm->_fileManager->loadFile("ZONE01.TXT"); + _zoneText = _vm->_fileIO->loadFile("ZONE01.TXT"); break; case LANG_SP: - _zoneText = _vm->_fileManager->loadFile("ZONEES.TXT"); + _zoneText = _vm->_fileIO->loadFile("ZONEES.TXT"); break; } } @@ -89,7 +89,7 @@ void FontManager::clearAll() { } void FontManager::initData() { - _font = _vm->_fileManager->loadFile("FONTE3.SPR"); + _font = _vm->_fileIO->loadFile("FONTE3.SPR"); _fontFixedWidth = 12; _fontFixedHeight = 21; loadZoneText(); @@ -174,14 +174,14 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in } else { int height = _text[idx]._height; int width = _text[idx]._width; - _vm->_graphicsManager->restoreSurfaceRect( - _vm->_graphicsManager->_frontBuffer, + _vm->_graphicsMan->restoreSurfaceRect( + _vm->_graphicsMan->_frontBuffer, _text[idx]._textBlock, xp, yp, _text[idx]._width, _text[idx]._height); - _vm->_graphicsManager->addDirtyRect(xp, yp, xp + width, yp + height); + _vm->_graphicsMan->addDirtyRect(xp, yp, xp + width, yp + height); } } else { int lineCount = 0; @@ -262,12 +262,12 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in byte curChar = _tempText[curStrIdx]; if (curChar <= 31) curChar = ' '; - _boxWidth += _vm->_objectsManager->getWidth(_font, curChar - 32); + _boxWidth += _vm->_objectsMan->getWidth(_font, curChar - 32); } _boxWidth += 2; _text[idx]._pos.x = 320 - abs(_boxWidth / 2); - textPosX = _vm->_eventsManager->_startPos.x + _text[idx]._pos.x; + textPosX = _vm->_events->_startPos.x + _text[idx]._pos.x; lineCount = 1; _text[idx]._lines[0] = Common::String((const char *)_tempText, textLength); } else { @@ -318,7 +318,7 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in byte curChar2 = (curIdx >= (int)line.size()) ? '\0' : line.c_str()[curIdx]; if (curChar2 <= 31) curChar2 = ' '; - ptrc += _vm->_objectsManager->getWidth(_font, (byte)curChar2 - 32); + ptrc += _vm->_objectsMan->getWidth(_font, (byte)curChar2 - 32); } _textSortArray[i] = ptrc; } @@ -337,10 +337,10 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in if ((_text[idx]._textType < 2) || (_text[idx]._textType > 3)) { int i; - for (i = xp - _vm->_eventsManager->_startPos.x; _boxWidth + i > 638 && i > -2 && _text[idx]._textType; i -= 2) + for (i = xp - _vm->_events->_startPos.x; _boxWidth + i > 638 && i > -2 && _text[idx]._textType; i -= 2) ; _text[idx]._pos.x = i; - textPosX = _vm->_eventsManager->_startPos.x + i; + textPosX = _vm->_events->_startPos.x + i; } else { _text[idx]._pos.x = textPosX; } @@ -351,7 +351,7 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in int saveHeight = (_fontFixedHeight + 1) * lineCount + 12; if (_text[idx]._textType == 6) { _text[idx]._pos.x = 315 - abs(saveWidth / 2); - textPosX = posX = _vm->_eventsManager->_startPos.x + _text[idx]._pos.x; + textPosX = posX = _vm->_events->_startPos.x + _text[idx]._pos.x; _text[idx]._pos.y = posY = 50; } int textType = _text[idx]._textType; @@ -361,15 +361,15 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in if (ptrd == NULL) error("Cutting a block for text box (%d)", size); - _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_frontBuffer, ptrd, posX, posY, saveWidth, saveHeight); - _vm->_graphicsManager->fillSurface(ptrd, _vm->_graphicsManager->_colorTable, size); - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, ptrd, posX, posY, saveWidth, saveHeight); + _vm->_graphicsMan->copySurfaceRect(_vm->_graphicsMan->_frontBuffer, ptrd, posX, posY, saveWidth, saveHeight); + _vm->_graphicsMan->fillSurface(ptrd, _vm->_graphicsMan->_colorTable, size); + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, ptrd, posX, posY, saveWidth, saveHeight); _vm->_globals->freeMemory(ptrd); - _vm->_graphicsManager->drawHorizontalLine(_vm->_graphicsManager->_frontBuffer, posX, posY, saveWidth, (byte)-2); - _vm->_graphicsManager->drawHorizontalLine(_vm->_graphicsManager->_frontBuffer, posX, saveHeight + posY, saveWidth, (byte)-2); - _vm->_graphicsManager->drawVerticalLine(_vm->_graphicsManager->_frontBuffer, posX, posY, saveHeight, (byte)-2); - _vm->_graphicsManager->drawVerticalLine(_vm->_graphicsManager->_frontBuffer, saveWidth + posX, posY, saveHeight, (byte)-2); + _vm->_graphicsMan->drawHorizontalLine(_vm->_graphicsMan->_frontBuffer, posX, posY, saveWidth, (byte)-2); + _vm->_graphicsMan->drawHorizontalLine(_vm->_graphicsMan->_frontBuffer, posX, saveHeight + posY, saveWidth, (byte)-2); + _vm->_graphicsMan->drawVerticalLine(_vm->_graphicsMan->_frontBuffer, posX, posY, saveHeight, (byte)-2); + _vm->_graphicsMan->drawVerticalLine(_vm->_graphicsMan->_frontBuffer, saveWidth + posX, posY, saveHeight, (byte)-2); } _text[idx]._lineCount = lineCount; int textPosY = posY + 5; @@ -395,7 +395,7 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in _text[idx]._textBlock = ptre; _text[idx]._width = blockWidth; _text[idx]._height = blockHeight; - _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_frontBuffer, _text[idx]._textBlock, posX, posY, _text[idx]._width, blockHeight); + _vm->_graphicsMan->copySurfaceRect(_vm->_graphicsMan->_frontBuffer, _text[idx]._textBlock, posX, posY, _text[idx]._width, blockHeight); } _tempText = _vm->_globals->freeMemory(_tempText); } @@ -415,12 +415,12 @@ void FontManager::displayTextVesa(int xp, int yp, const Common::String &message, break; if (currChar >= 32) { charIndex = currChar - 32; - _vm->_graphicsManager->displayFont(_vm->_graphicsManager->_frontBuffer, _font, currentX, yp, currChar - 32, col); - currentX += _vm->_objectsManager->getWidth(_font, charIndex); + _vm->_graphicsMan->displayFont(_vm->_graphicsMan->_frontBuffer, _font, currentX, yp, currChar - 32, col); + currentX += _vm->_objectsMan->getWidth(_font, charIndex); } } - _vm->_graphicsManager->addDirtyRect(xp, yp, currentX, yp + 12); + _vm->_graphicsMan->addDirtyRect(xp, yp, currentX, yp + 12); } /** @@ -432,8 +432,8 @@ void FontManager::displayText(int xp, int yp, const Common::String &message, int if (currentChar > 31) { int characterIndex = currentChar - 32; - _vm->_graphicsManager->displayFont(_vm->_graphicsManager->_frontBuffer, _font, xp, yp, characterIndex, col); - xp += _vm->_objectsManager->getWidth(_font, characterIndex); + _vm->_graphicsMan->displayFont(_vm->_graphicsMan->_frontBuffer, _font, xp, yp, characterIndex, col); + xp += _vm->_objectsMan->getWidth(_font, characterIndex); } } } @@ -459,7 +459,7 @@ void FontManager::renderTextDisplay(int xp, int yp, const Common::String &msg, i break; if (curChar >= 32) { byte printChar = curChar - 32; - _vm->_graphicsManager->displayFont(_vm->_graphicsManager->_frontBuffer, _font, charEndPosX, yp, printChar, fontCol); + _vm->_graphicsMan->displayFont(_vm->_graphicsMan->_frontBuffer, _font, charEndPosX, yp, printChar, fontCol); // UGLY HACK: For some obscure reason, the BeOS and OS/2 versions use another font file, which doesn't have variable width. // All the fonts have a length of 9, which results in completely broken text in the computer. @@ -468,23 +468,23 @@ void FontManager::renderTextDisplay(int xp, int yp, const Common::String &msg, i int charWidth; if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) { if ((curChar >= 'A' && curChar <= 'Z') || (curChar >= 'a' && curChar <= 'z' && curChar != 'm' && curChar != 'w') || (curChar >= '0' && curChar <= '9') || curChar == '*' || (curChar >= 128 && curChar <= 168)) - charWidth = _vm->_objectsManager->getWidth(_font, printChar) - 1; + charWidth = _vm->_objectsMan->getWidth(_font, printChar) - 1; else if (curChar == 'm' || curChar == 'w') - charWidth = _vm->_objectsManager->getWidth(_font, printChar); + charWidth = _vm->_objectsMan->getWidth(_font, printChar); else charWidth = 6; } else - charWidth = _vm->_objectsManager->getWidth(_font, printChar); + charWidth = _vm->_objectsMan->getWidth(_font, printChar); int charStartPosX = charEndPosX; charEndPosX += charWidth; - _vm->_graphicsManager->addDirtyRect(charStartPosX, yp, charEndPosX, yp + 12); - if (_vm->_eventsManager->_escKeyFl) { + _vm->_graphicsMan->addDirtyRect(charStartPosX, yp, charEndPosX, yp + 12); + if (_vm->_events->_escKeyFl) { _vm->_globals->_eventMode = EVENTMODE_IGNORE; - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } else { _vm->_globals->_eventMode = EVENTMODE_ALT; - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); _vm->_globals->_eventMode = EVENTMODE_IGNORE; } } diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index ede4a1eb26..2e7a2195d1 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -168,20 +168,20 @@ void Globals::setConfig() { } void Globals::clearAll() { - _vm->_fontManager->clearAll(); - _vm->_dialogsManager->clearAll(); + _vm->_fontMan->clearAll(); + _vm->_dialog->clearAll(); _answerBuffer = NULL; _levelSpriteBuf = NULL; _saveData = NULL; - _vm->_objectsManager->_curObjectIndex = 0; + _vm->_objectsMan->_curObjectIndex = 0; - _vm->_linesManager->clearAll(); - _vm->_objectsManager->clearAll(); + _vm->_linesMan->clearAll(); + _vm->_objectsMan->clearAll(); _saveData = (Savegame *)malloc(sizeof(Savegame)); memset(_saveData, 0, sizeof(Savegame)); - _vm->_eventsManager->clearAll(); + _vm->_events->clearAll(); } void Globals::loadCharacterData() { @@ -195,8 +195,8 @@ void Globals::loadCharacterData() { _hopkinsItem[idx]._speedY = *srcP++; } - _vm->_objectsManager->resetOldFrameIndex(); - _vm->_objectsManager->resetOldDirection(); + _vm->_objectsMan->resetOldFrameIndex(); + _vm->_objectsMan->resetOldDirection(); } byte *Globals::allocMemory(int count) { diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index c545c983d7..49ff2df189 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -202,7 +202,7 @@ void GraphicsManager::loadScreen(const Common::String &file) { bool flag = true; bool fileFoundFl = false; - _vm->_fileManager->searchCat(file, RES_PIC, fileFoundFl); + _vm->_fileIO->searchCat(file, RES_PIC, fileFoundFl); if (!fileFoundFl) { if (!f.open(file)) error("loadScreen - %s", file.c_str()); @@ -263,7 +263,7 @@ void GraphicsManager::initColorTable(int minIndex, int maxIndex, byte *palette) */ void GraphicsManager::scrollScreen(int amount) { int result = CLIP(amount, 0, SCREEN_WIDTH); - _vm->_eventsManager->_startPos.x = result; + _vm->_events->_startPos.x = result; _scrollOffset = result; _scrollPosX = result; } @@ -316,7 +316,7 @@ void GraphicsManager::loadPCX640(byte *surface, const Common::String &file, byte // Load PCX from within the PIC resource if (!f.open("PIC.RES")) error("Error opening PIC.RES."); - f.seek(_vm->_fileManager->_catalogPos); + f.seek(_vm->_fileIO->_catalogPos); } else { // Load stand alone PCX file if (!f.open(file)) @@ -509,18 +509,18 @@ void GraphicsManager::fadeIn(const byte *palette, int step, const byte *surface) // Set the transition palette and refresh the screen setPaletteVGA256(palData2); - copy16BitRect(surface, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + copy16BitRect(surface, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); updateScreen(); // Added a delay in order to see the fading - _vm->_eventsManager->delay(20); + _vm->_events->delay(20); } // Set the final palette setPaletteVGA256(palette); // Refresh the screen - copy16BitRect(surface, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + copy16BitRect(surface, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); updateScreen(); } @@ -529,7 +529,7 @@ void GraphicsManager::fadeIn(const byte *palette, int step, const byte *surface) */ void GraphicsManager::fadeOut(const byte *palette, int step, const byte *surface) { byte palData[PALETTE_BLOCK_SIZE]; - if ((step > 1) && (palette) && (!_vm->_eventsManager->_escKeyFl)) { + if ((step > 1) && (palette) && (!_vm->_events->_escKeyFl)) { int fadeStep = step; for (int fadeIndex = 0; fadeIndex < fadeStep; fadeIndex++) { for (int palOffset = 0; palOffset < PALETTE_BLOCK_SIZE; palOffset += 3) { @@ -539,10 +539,10 @@ void GraphicsManager::fadeOut(const byte *palette, int step, const byte *surface } setPaletteVGA256(palData); - copy16BitRect(surface, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + copy16BitRect(surface, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); updateScreen(); - _vm->_eventsManager->delay(20); + _vm->_events->delay(20); } } @@ -551,7 +551,7 @@ void GraphicsManager::fadeOut(const byte *palette, int step, const byte *surface palData[i] = 0; setPaletteVGA256(palData); - copy16BitRect(surface, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + copy16BitRect(surface, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); updateScreen(); } @@ -636,7 +636,7 @@ void GraphicsManager::setPaletteVGA256(const byte *palette) { void GraphicsManager::setPaletteVGA256WithRefresh(const byte *palette, const byte *surface) { changePalette(palette); - copy16BitRect(surface, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + copy16BitRect(surface, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); updateScreen(); } @@ -1007,31 +1007,31 @@ void GraphicsManager::drawVesaSprite(byte *surface, const byte *spriteData, int void GraphicsManager::endDisplayBob() { for (int idx = 1; idx <= 20; ++idx) { - if (_vm->_animationManager->_animBqe[idx]._enabledFl) - _vm->_objectsManager->hideBob(idx); + if (_vm->_animMan->_animBqe[idx]._enabledFl) + _vm->_objectsMan->hideBob(idx); } - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); for (int idx = 1; idx <= 20; ++idx) { - if (_vm->_animationManager->_animBqe[idx]._enabledFl) - _vm->_objectsManager->resetBob(idx); + if (_vm->_animMan->_animBqe[idx]._enabledFl) + _vm->_objectsMan->resetBob(idx); } for (int idx = 1; idx <= 29; ++idx) { - _vm->_objectsManager->_lockedAnims[idx]._enableFl = false; + _vm->_objectsMan->_lockedAnims[idx]._enableFl = false; } for (int idx = 1; idx <= 20; ++idx) { - _vm->_animationManager->_animBqe[idx]._enabledFl = false; + _vm->_animMan->_animBqe[idx]._enabledFl = false; } } void GraphicsManager::displayAllBob() { for (int idx = 1; idx <= 20; ++idx) { - if (_vm->_animationManager->_animBqe[idx]._enabledFl) - _vm->_objectsManager->displayBob(idx); + if (_vm->_animMan->_animBqe[idx]._enabledFl) + _vm->_objectsMan->displayBob(idx); } } @@ -1114,21 +1114,21 @@ void GraphicsManager::displayDirtyRects() { Common::Rect &r = _dirtyRects[idx]; Common::Rect dstRect; - if (_vm->_eventsManager->_breakoutFl) { + if (_vm->_events->_breakoutFl) { copy8BitRect(_frontBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left, r.top); dstRect.left = r.left * 2; dstRect.top = r.top * 2 + 30; dstRect.setWidth((r.right - r.left) * 2); dstRect.setHeight((r.bottom - r.top) * 2); - } else if (r.right > _vm->_eventsManager->_startPos.x && r.left < _vm->_eventsManager->_startPos.x + SCREEN_WIDTH) { - r.left = MAX<int16>(r.left, _vm->_eventsManager->_startPos.x); - r.right = MIN<int16>(r.right, (int16)_vm->_eventsManager->_startPos.x + SCREEN_WIDTH); + } else if (r.right > _vm->_events->_startPos.x && r.left < _vm->_events->_startPos.x + SCREEN_WIDTH) { + r.left = MAX<int16>(r.left, _vm->_events->_startPos.x); + r.right = MIN<int16>(r.right, (int16)_vm->_events->_startPos.x + SCREEN_WIDTH); // WORKAROUND: Original didn't lock the screen for access lockScreen(); - copy16BitRect(_frontBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left - _vm->_eventsManager->_startPos.x, r.top); + copy16BitRect(_frontBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left - _vm->_events->_startPos.x, r.top); - dstRect.left = r.left - _vm->_eventsManager->_startPos.x; + dstRect.left = r.left - _vm->_events->_startPos.x; dstRect.top = r.top; dstRect.setWidth(r.right - r.left); dstRect.setHeight(r.bottom - r.top); @@ -1173,8 +1173,8 @@ void GraphicsManager::displayRefreshRects() { * Fast Display of either a compressed or vesa sprite */ void GraphicsManager::fastDisplay(const byte *spriteData, int xp, int yp, int spriteIndex, bool addSegment) { - int width = _vm->_objectsManager->getWidth(spriteData, spriteIndex); - int height = _vm->_objectsManager->getHeight(spriteData, spriteIndex); + int width = _vm->_objectsMan->getWidth(spriteData, spriteIndex); + int height = _vm->_objectsMan->getHeight(spriteData, spriteIndex); if (*spriteData == 78) { drawCompressedSprite(_backBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false); @@ -1188,8 +1188,8 @@ void GraphicsManager::fastDisplay(const byte *spriteData, int xp, int yp, int sp } void GraphicsManager::fastDisplay2(const byte *objectData, int xp, int yp, int idx, bool addSegment) { - int width = _vm->_objectsManager->getWidth(objectData, idx); - int height = _vm->_objectsManager->getHeight(objectData, idx); + int width = _vm->_objectsMan->getWidth(objectData, idx); + int height = _vm->_objectsMan->getHeight(objectData, idx); if (*objectData == 78) { drawCompressedSprite(_backBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false); drawCompressedSprite(_frontBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false); @@ -1685,10 +1685,10 @@ void GraphicsManager::initScreen(const Common::String &file, int mode, bool init Common::String filename = file + ".ini"; bool fileFoundFl = false; - byte *ptr = _vm->_fileManager->searchCat(filename, RES_INI, fileFoundFl); + byte *ptr = _vm->_fileIO->searchCat(filename, RES_INI, fileFoundFl); if (!fileFoundFl) { - ptr = _vm->_fileManager->loadFile(filename); + ptr = _vm->_fileIO->loadFile(filename); } if (!mode) { @@ -1696,11 +1696,11 @@ void GraphicsManager::initScreen(const Common::String &file, int mode, bool init _vm->_globals->_levelSpriteBuf = _vm->_globals->freeMemory(_vm->_globals->_levelSpriteBuf); if (initializeScreen) { fileFoundFl = false; - _vm->_globals->_levelSpriteBuf = _vm->_fileManager->searchCat(filename, RES_SLI, fileFoundFl); + _vm->_globals->_levelSpriteBuf = _vm->_fileIO->searchCat(filename, RES_SLI, fileFoundFl); if (!fileFoundFl) { - _vm->_globals->_levelSpriteBuf = _vm->_fileManager->loadFile(filename); + _vm->_globals->_levelSpriteBuf = _vm->_fileIO->loadFile(filename); } else { - _vm->_globals->_levelSpriteBuf = _vm->_fileManager->loadFile("RES_SLI.RES"); + _vm->_globals->_levelSpriteBuf = _vm->_fileIO->loadFile("RES_SLI.RES"); } } } @@ -1711,14 +1711,14 @@ void GraphicsManager::initScreen(const Common::String &file, int mode, bool init int dataOffset = 1; do { - int dataVal1 = _vm->_scriptManager->handleOpcode(ptr + 20 * dataOffset); + int dataVal1 = _vm->_script->handleOpcode(ptr + 20 * dataOffset); if (_vm->shouldQuit()) return; if (dataVal1 == 2) - dataOffset = _vm->_scriptManager->handleGoto((ptr + 20 * dataOffset)); + dataOffset = _vm->_script->handleGoto((ptr + 20 * dataOffset)); if (dataVal1 == 3) - dataOffset = _vm->_scriptManager->handleIf(ptr, dataOffset); + dataOffset = _vm->_script->handleIf(ptr, dataOffset); if (dataOffset == -1) error("Error, defective IFF"); if (dataVal1 == 1 || dataVal1 == 4) @@ -1732,13 +1732,13 @@ void GraphicsManager::initScreen(const Common::String &file, int mode, bool init filename = file + ".rep"; fileFoundFl = false; - byte *dataP = _vm->_fileManager->searchCat(filename, RES_REP, fileFoundFl); + byte *dataP = _vm->_fileIO->searchCat(filename, RES_REP, fileFoundFl); if (!fileFoundFl) - dataP = _vm->_fileManager->loadFile(filename); + dataP = _vm->_fileIO->loadFile(filename); _vm->_globals->_answerBuffer = dataP; - _vm->_objectsManager->_forceZoneFl = true; - _vm->_objectsManager->_changeVerbFl = false; + _vm->_objectsMan->_forceZoneFl = true; + _vm->_objectsMan->_changeVerbFl = false; } void GraphicsManager::displayScreen(bool initPalette) { @@ -1751,7 +1751,7 @@ void GraphicsManager::displayScreen(bool initPalette) { fillSurface(_frontBuffer, _colorTable, SCREEN_WIDTH * SCREEN_HEIGHT * 2); lockScreen(); - copy16BitRect(_frontBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + copy16BitRect(_frontBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); unlockScreen(); memcpy(_backBuffer, _frontBuffer, 614399); @@ -1841,24 +1841,24 @@ void GraphicsManager::drawVerticalLine(byte *surface, int xp, int yp, int height */ void GraphicsManager::backupScreen() { // Allocate a new data block for the screen, if necessary - if (_vm->_graphicsManager->_backupScreen == NULL) - _vm->_graphicsManager->_backupScreen = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT); + if (_vm->_graphicsMan->_backupScreen == NULL) + _vm->_graphicsMan->_backupScreen = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT); // Backup the screen - Common::copy(_vm->_graphicsManager->_backBuffer, _vm->_graphicsManager->_backBuffer + - SCREEN_WIDTH * 2 * SCREEN_HEIGHT, _vm->_graphicsManager->_backupScreen); + Common::copy(_vm->_graphicsMan->_backBuffer, _vm->_graphicsMan->_backBuffer + + SCREEN_WIDTH * 2 * SCREEN_HEIGHT, _vm->_graphicsMan->_backupScreen); } /** * Restore a previously backed up screen */ void GraphicsManager::restoreScreen() { - assert(_vm->_graphicsManager->_backupScreen); + assert(_vm->_graphicsMan->_backupScreen); // Restore the screen and free the buffer - Common::copy(_vm->_graphicsManager->_backupScreen, _vm->_graphicsManager->_backupScreen + - SCREEN_WIDTH * 2 * SCREEN_HEIGHT, _vm->_graphicsManager->_backBuffer); - _vm->_globals->freeMemory(_vm->_graphicsManager->_backupScreen); + Common::copy(_vm->_graphicsMan->_backupScreen, _vm->_graphicsMan->_backupScreen + + SCREEN_WIDTH * 2 * SCREEN_HEIGHT, _vm->_graphicsMan->_backBuffer); + _vm->_globals->freeMemory(_vm->_graphicsMan->_backupScreen); _backupScreen = NULL; } 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; } } diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h index 37ea59e942..499f0c466d 100644 --- a/engines/hopkins/hopkins.h +++ b/engines/hopkins/hopkins.h @@ -142,22 +142,22 @@ protected: virtual bool hasFeature(EngineFeature f) const; public: - AnimationManager *_animationManager; - ComputerManager *_computerManager; - DialogsManager *_dialogsManager; - Debugger *_debugger; - EventsManager *_eventsManager; - FileManager *_fileManager; - FontManager *_fontManager; + AnimationManager *_animMan; + ComputerManager *_computer; + DialogsManager *_dialog; + Debugger *_debug; + EventsManager *_events; + FileManager *_fileIO; + FontManager *_fontMan; Globals *_globals; - GraphicsManager *_graphicsManager; - LinesManager *_linesManager; - MenuManager *_menuManager; - ObjectsManager *_objectsManager; - SaveLoadManager *_saveLoadManager; - ScriptManager *_scriptManager; - SoundManager *_soundManager; - TalkManager *_talkManager; + GraphicsManager *_graphicsMan; + LinesManager *_linesMan; + MenuManager *_menuMan; + ObjectsManager *_objectsMan; + SaveLoadManager *_saveLoad; + ScriptManager *_script; + SoundManager *_soundMan; + TalkManager *_talkMan; public: HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDesc); diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp index ab981a3c7f..6603708449 100644 --- a/engines/hopkins/lines.cpp +++ b/engines/hopkins/lines.cpp @@ -121,7 +121,7 @@ void LinesManager::loadLines(const Common::String &file) { resetLines(); _linesNumb = 0; _lastLine = 0; - byte *ptr = _vm->_fileManager->loadFile(file); + byte *ptr = _vm->_fileIO->loadFile(file); for (int idx = 0; READ_LE_INT16((uint16 *)ptr + (idx * 5)) != -1; idx++) { addLine(idx, (Directions)READ_LE_INT16((uint16 *)ptr + (idx * 5)), @@ -150,11 +150,11 @@ int LinesManager::checkInventoryHotspots(int posX, int posY) { hotspotId = checkInventoryHotspotsRow(posX, 19, false); if (posY >= 268 && posY <= 306) hotspotId = checkInventoryHotspotsRow(posX, 25, true); - if (posY >= 268 && posY <= 288 && posX >= _vm->_graphicsManager->_scrollOffset + 424 && posX <= _vm->_graphicsManager->_scrollOffset + 478) + if (posY >= 268 && posY <= 288 && posX >= _vm->_graphicsMan->_scrollOffset + 424 && posX <= _vm->_graphicsMan->_scrollOffset + 478) hotspotId = 30; - if (posY >= 290 && posY <= 306 && posX >= _vm->_graphicsManager->_scrollOffset + 424 && posX <= _vm->_graphicsManager->_scrollOffset + 478) + if (posY >= 290 && posY <= 306 && posX >= _vm->_graphicsMan->_scrollOffset + 424 && posX <= _vm->_graphicsMan->_scrollOffset + 478) hotspotId = 31; - if (posY < 114 || posY > 306 || posX < _vm->_graphicsManager->_scrollOffset + 152 || posX > _vm->_graphicsManager->_scrollOffset + 484) + if (posY < 114 || posY > 306 || posX < _vm->_graphicsMan->_scrollOffset + 152 || posX > _vm->_graphicsMan->_scrollOffset + 484) hotspotId = 32; return hotspotId; @@ -167,30 +167,30 @@ int LinesManager::checkInventoryHotspots(int posX, int posY) { int LinesManager::checkInventoryHotspotsRow(int posX, int minZoneNum, bool lastRow) { int result = minZoneNum; - if (posX >= _vm->_graphicsManager->_scrollOffset + 158 && posX < _vm->_graphicsManager->_scrollOffset + 208) + if (posX >= _vm->_graphicsMan->_scrollOffset + 158 && posX < _vm->_graphicsMan->_scrollOffset + 208) return result; - if (posX >= _vm->_graphicsManager->_scrollOffset + 208 && posX < _vm->_graphicsManager->_scrollOffset + 266) { + if (posX >= _vm->_graphicsMan->_scrollOffset + 208 && posX < _vm->_graphicsMan->_scrollOffset + 266) { result += 1; return result; } - if (posX >= _vm->_graphicsManager->_scrollOffset + 266 && posX < _vm->_graphicsManager->_scrollOffset + 320) { + if (posX >= _vm->_graphicsMan->_scrollOffset + 266 && posX < _vm->_graphicsMan->_scrollOffset + 320) { result += 2; return result; } - if (posX >= _vm->_graphicsManager->_scrollOffset + 320 && posX < _vm->_graphicsManager->_scrollOffset + 370) { + if (posX >= _vm->_graphicsMan->_scrollOffset + 320 && posX < _vm->_graphicsMan->_scrollOffset + 370) { result += 3; return result; } - if (posX >= _vm->_graphicsManager->_scrollOffset + 370 && posX < _vm->_graphicsManager->_scrollOffset + 424) { + if (posX >= _vm->_graphicsMan->_scrollOffset + 370 && posX < _vm->_graphicsMan->_scrollOffset + 424) { result += 4; return result; } - if (!lastRow && posX >= _vm->_graphicsManager->_scrollOffset + 424 && posX <= _vm->_graphicsManager->_scrollOffset + 478) { + if (!lastRow && posX >= _vm->_graphicsMan->_scrollOffset + 424 && posX <= _vm->_graphicsMan->_scrollOffset + 478) { result += 5; return result; } @@ -435,8 +435,8 @@ void LinesManager::initRoute() { int curLineX = curLineData[2 * curDataIdx - 2]; int curLineY = curLineData[2 * curDataIdx - 1]; - if (_vm->_graphicsManager->_maxX == curLineX || _vm->_graphicsManager->_maxY == curLineY || - _vm->_graphicsManager->_minX == curLineX || _vm->_graphicsManager->_minY == curLineY || + if (_vm->_graphicsMan->_maxX == curLineX || _vm->_graphicsMan->_maxY == curLineY || + _vm->_graphicsMan->_minX == curLineX || _vm->_graphicsMan->_minY == curLineY || (lineX == curLineX && lineY == curLineY)) break; if (lineIdx == MAX_LINES) @@ -959,7 +959,7 @@ int LinesManager::computeRouteIdx(int lineIdx, int dataIdx, int fromX, int fromY lineIdxRight = foundLineIdx; - if (_vm->_graphicsManager->_maxX <= curX || maxLineX <= curX) + if (_vm->_graphicsMan->_maxX <= curX || maxLineX <= curX) break; } curX = destX; @@ -1101,11 +1101,11 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { if (abs(fromX - destX) <= 4 && abs(fromY - clipDestY) <= 4) return NULL; - if (_oldZoneNum > 0 && _vm->_objectsManager->_zoneNum > 0 && _oldZoneNum == _vm->_objectsManager->_zoneNum) + if (_oldZoneNum > 0 && _vm->_objectsMan->_zoneNum > 0 && _oldZoneNum == _vm->_objectsMan->_zoneNum) return NULL; } _vm->_globals->_checkDistanceFl = false; - _oldZoneNum = _vm->_objectsManager->_zoneNum; + _oldZoneNum = _vm->_objectsMan->_zoneNum; _oldRouteFromX = fromX; _oldRouteDestX = destX; _oldRouteFromY = fromY; @@ -1116,8 +1116,8 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { clipDestX = 20; if (clipDestY <= 19) clipDestY = 20; - if (clipDestX > _vm->_graphicsManager->_maxX - 10) - clipDestX = _vm->_graphicsManager->_maxX - 10; + if (clipDestX > _vm->_graphicsMan->_maxX - 10) + clipDestX = _vm->_graphicsMan->_maxX - 10; if (clipDestY > _vm->_globals->_characterMaxPosY) clipDestY = _vm->_globals->_characterMaxPosY; @@ -1135,7 +1135,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { return _bestRoute; int tmpDelta = 0; - for (int tmpY = clipDestY; tmpY < _vm->_graphicsManager->_maxY; tmpY++, tmpDelta++) { + for (int tmpY = clipDestY; tmpY < _vm->_graphicsMan->_maxY; tmpY++, tmpDelta++) { if (checkCollisionLine(clipDestX, tmpY, &collLineDataIdxArr[DIR_DOWN], &collLineIdxArr[DIR_DOWN], 0, _lastLine) && collLineIdxArr[DIR_DOWN] <= _lastLine) break; collLineDataIdxArr[DIR_DOWN] = 0; @@ -1144,7 +1144,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { deltaArr[DIR_DOWN] = tmpDelta; tmpDelta = 0; - for (int tmpY = clipDestY; tmpY > _vm->_graphicsManager->_minY; tmpY--, tmpDelta++) { + for (int tmpY = clipDestY; tmpY > _vm->_graphicsMan->_minY; tmpY--, tmpDelta++) { if (checkCollisionLine(clipDestX, tmpY, &collLineDataIdxArr[DIR_UP], &collLineIdxArr[DIR_UP], 0, _lastLine) && collLineIdxArr[DIR_UP] <= _lastLine) break; collLineDataIdxArr[DIR_UP] = 0; @@ -1155,7 +1155,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { deltaArr[DIR_UP] = tmpDelta; tmpDelta = 0; - for (int tmpX = clipDestX; tmpX < _vm->_graphicsManager->_maxX; tmpX++) { + for (int tmpX = clipDestX; tmpX < _vm->_graphicsMan->_maxX; tmpX++) { if (checkCollisionLine(tmpX, clipDestY, &collLineDataIdxArr[DIR_RIGHT], &collLineIdxArr[DIR_RIGHT], 0, _lastLine) && collLineIdxArr[DIR_RIGHT] <= _lastLine) break; collLineDataIdxArr[DIR_RIGHT] = 0; @@ -1169,7 +1169,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { deltaArr[DIR_RIGHT] = tmpDelta; tmpDelta = 0; - for (int tmpX = clipDestX; tmpX > _vm->_graphicsManager->_minX; tmpX--) { + for (int tmpX = clipDestX; tmpX > _vm->_graphicsMan->_minX; tmpX--) { if (checkCollisionLine(tmpX, clipDestY, &collLineDataIdxArr[DIR_LEFT], &collLineIdxArr[DIR_LEFT], 0, _lastLine) && collLineIdxArr[DIR_LEFT] <= _lastLine) break; collLineDataIdxArr[DIR_LEFT] = 0; @@ -1225,7 +1225,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { } tmpDelta = 0; - for (int tmpY = fromY; tmpY < _vm->_graphicsManager->_maxY; tmpY++, tmpDelta++) { + for (int tmpY = fromY; tmpY < _vm->_graphicsMan->_maxY; tmpY++, tmpDelta++) { if (checkCollisionLine(fromX, tmpY, &collLineDataIdxArr[DIR_DOWN], &collLineIdxArr[DIR_DOWN], 0, _lastLine) && collLineIdxArr[DIR_DOWN] <= _lastLine) break; collLineDataIdxArr[DIR_DOWN] = 0; @@ -1234,7 +1234,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { deltaArr[DIR_DOWN] = tmpDelta + 1; tmpDelta = 0; - for (int tmpY = fromY; tmpY > _vm->_graphicsManager->_minY; tmpY--) { + for (int tmpY = fromY; tmpY > _vm->_graphicsMan->_minY; tmpY--) { if (checkCollisionLine(fromX, tmpY, &collLineDataIdxArr[DIR_UP], &collLineIdxArr[DIR_UP], 0, _lastLine) && collLineIdxArr[DIR_UP] <= _lastLine) break; collLineDataIdxArr[DIR_UP] = 0; @@ -1246,7 +1246,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { deltaArr[DIR_UP] = tmpDelta + 1; tmpDelta = 0; - for (int tmpX = fromX; tmpX < _vm->_graphicsManager->_maxX; tmpX++) { + for (int tmpX = fromX; tmpX < _vm->_graphicsMan->_maxX; tmpX++) { if (checkCollisionLine(tmpX, fromY, &collLineDataIdxArr[DIR_RIGHT], &collLineIdxArr[DIR_RIGHT], 0, _lastLine) && collLineIdxArr[DIR_RIGHT] <= _lastLine) break; collLineDataIdxArr[DIR_RIGHT] = 0; @@ -1258,7 +1258,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { deltaArr[DIR_RIGHT] = tmpDelta + 1; tmpDelta = 0; - for (int tmpX = fromX; tmpX > _vm->_graphicsManager->_minX; tmpX--) { + for (int tmpX = fromX; tmpX > _vm->_graphicsMan->_minX; tmpX--) { if (checkCollisionLine(tmpX, fromY, &collLineDataIdxArr[DIR_LEFT], &collLineIdxArr[DIR_LEFT], 0, _lastLine) && collLineIdxArr[DIR_LEFT] <= _lastLine) break; collLineDataIdxArr[DIR_LEFT] = 0; @@ -1996,13 +1996,13 @@ RouteItem *LinesManager::cityMapCarRoute(int x1, int y1, int x2, int y2) { clipX2 = 15; if (y2 <= 14) clipY2 = 15; - if (clipX2 > _vm->_graphicsManager->_maxX - 10) - clipX2 = _vm->_graphicsManager->_maxX - 10; + if (clipX2 > _vm->_graphicsMan->_maxX - 10) + clipX2 = _vm->_graphicsMan->_maxX - 10; if (clipY2 > 445) clipY2 = 440; int delta = 0; - for (delta = 0; clipY2 + delta < _vm->_graphicsManager->_maxY; delta++) { + for (delta = 0; clipY2 + delta < _vm->_graphicsMan->_maxY; delta++) { if (checkCollisionLine(clipX2, clipY2 + delta, &arrDataIdx[DIR_DOWN], &arrLineIdx[DIR_DOWN], 0, _lastLine) && arrLineIdx[DIR_DOWN] <= _lastLine) break; arrDataIdx[DIR_DOWN] = 0; @@ -2010,7 +2010,7 @@ RouteItem *LinesManager::cityMapCarRoute(int x1, int y1, int x2, int y2) { } arrDelta[DIR_DOWN] = delta; - for (delta = 0; clipY2 - delta > _vm->_graphicsManager->_minY; delta++) { + for (delta = 0; clipY2 - delta > _vm->_graphicsMan->_minY; delta++) { if (checkCollisionLine(clipX2, clipY2 - delta , &arrDataIdx[DIR_UP], &arrLineIdx[DIR_UP], 0, _lastLine) && arrLineIdx[DIR_UP] <= _lastLine) break; arrDataIdx[DIR_UP] = 0; @@ -2020,7 +2020,7 @@ RouteItem *LinesManager::cityMapCarRoute(int x1, int y1, int x2, int y2) { } arrDelta[DIR_UP] = delta; - for (delta = 0; clipX2 + delta < _vm->_graphicsManager->_maxX; delta++) { + for (delta = 0; clipX2 + delta < _vm->_graphicsMan->_maxX; delta++) { if (checkCollisionLine(clipX2 + delta, clipY2, &arrDataIdx[DIR_RIGHT], &arrLineIdx[DIR_RIGHT], 0, _lastLine) && arrLineIdx[DIR_RIGHT] <= _lastLine) break; arrDataIdx[DIR_RIGHT] = 0; @@ -2030,7 +2030,7 @@ RouteItem *LinesManager::cityMapCarRoute(int x1, int y1, int x2, int y2) { } arrDelta[DIR_RIGHT] = delta; - for (delta = 0; clipX2 - delta > _vm->_graphicsManager->_minX; delta++) { + for (delta = 0; clipX2 - delta > _vm->_graphicsMan->_minX; delta++) { if (checkCollisionLine(clipX2 - delta, clipY2, &arrDataIdx[DIR_LEFT], &arrLineIdx[DIR_LEFT], 0, _lastLine) && arrLineIdx[DIR_LEFT] <= _lastLine) break; arrDataIdx[DIR_LEFT] = 0; @@ -2212,11 +2212,11 @@ bool LinesManager::makeSmoothMove(int fromX, int fromY, int destX, int destY) { int realSpeedY = _vm->_globals->_hopkinsItem[hopkinsIdx]._speedY; int spriteSize = _vm->_globals->_spriteSize[curY]; if (spriteSize < 0) { - realSpeedX = _vm->_graphicsManager->zoomOut(realSpeedX, -spriteSize); - realSpeedY = _vm->_graphicsManager->zoomOut(realSpeedY, -spriteSize); + realSpeedX = _vm->_graphicsMan->zoomOut(realSpeedX, -spriteSize); + realSpeedY = _vm->_graphicsMan->zoomOut(realSpeedY, -spriteSize); } else if (spriteSize > 0) { - realSpeedX = _vm->_graphicsManager->zoomIn(realSpeedX, spriteSize); - realSpeedY = _vm->_graphicsManager->zoomIn(realSpeedY, spriteSize); + realSpeedX = _vm->_graphicsMan->zoomIn(realSpeedX, spriteSize); + realSpeedY = _vm->_graphicsMan->zoomIn(realSpeedY, spriteSize); } for (int i = 0; i < realSpeedX; i++) { --curX; @@ -2246,11 +2246,11 @@ bool LinesManager::makeSmoothMove(int fromX, int fromY, int destX, int destY) { int realSpeedY = _vm->_globals->_hopkinsItem[hopkinsIdx]._speedY; int spriteSize = _vm->_globals->_spriteSize[curY]; if (spriteSize < 0) { - realSpeedX = _vm->_graphicsManager->zoomOut(realSpeedX, -spriteSize); - realSpeedY = _vm->_graphicsManager->zoomOut(realSpeedY, -spriteSize); + realSpeedX = _vm->_graphicsMan->zoomOut(realSpeedX, -spriteSize); + realSpeedY = _vm->_graphicsMan->zoomOut(realSpeedY, -spriteSize); } else if (spriteSize > 0) { - realSpeedX = _vm->_graphicsManager->zoomIn(realSpeedX, spriteSize); - realSpeedY = _vm->_graphicsManager->zoomIn(realSpeedY, spriteSize); + realSpeedX = _vm->_graphicsMan->zoomIn(realSpeedX, spriteSize); + realSpeedY = _vm->_graphicsMan->zoomIn(realSpeedY, spriteSize); } for (int i = 0; i < realSpeedX; i++) { ++curX; @@ -2276,8 +2276,8 @@ bool LinesManager::makeSmoothMove(int fromX, int fromY, int destX, int destY) { int smoothIdx = 0; int stepCount = 0; while (curX > destX && destY < curY) { - int realSpeedX = _vm->_graphicsManager->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedX, 25); - int realSpeedY = _vm->_graphicsManager->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedY, 25); + int realSpeedX = _vm->_graphicsMan->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedX, 25); + int realSpeedY = _vm->_graphicsMan->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedY, 25); int oldY = curY; for (int i = 0; i < realSpeedX; i++) { --curX; @@ -2304,8 +2304,8 @@ bool LinesManager::makeSmoothMove(int fromX, int fromY, int destX, int destY) { int stepCount = 0; while (curX < destX && destY < curY) { int oldY = curY; - int realSpeedX = _vm->_graphicsManager->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedX, 25); - int realSpeedY = _vm->_graphicsManager->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedY, 25); + int realSpeedX = _vm->_graphicsMan->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedX, 25); + int realSpeedY = _vm->_graphicsMan->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedY, 25); for (int i = 0; i < realSpeedX; i++) { ++curX; _smoothRoute[smoothIdx]._posX = curX; @@ -2490,9 +2490,9 @@ int LinesManager::computeYSteps(int idx) { int retVal = 25; if (zoomPct < 0) - retVal = _vm->_graphicsManager->zoomOut(25, -zoomPct); + retVal = _vm->_graphicsMan->zoomOut(25, -zoomPct); else if (zoomPct > 0) - retVal = _vm->_graphicsManager->zoomIn(25, zoomPct); + retVal = _vm->_graphicsMan->zoomIn(25, zoomPct); return retVal; } @@ -2546,22 +2546,22 @@ void LinesManager::optimizeRoute(RouteItem *route) { int LinesManager::getMouseZone() { int result; - int xp = _vm->_eventsManager->_mousePos.x + _vm->_eventsManager->_mouseOffset.x; - int yp = _vm->_eventsManager->_mousePos.y + _vm->_eventsManager->_mouseOffset.y; - if ((_vm->_eventsManager->_mousePos.y + _vm->_eventsManager->_mouseOffset.y) > 19) { + int xp = _vm->_events->_mousePos.x + _vm->_events->_mouseOffset.x; + int yp = _vm->_events->_mousePos.y + _vm->_events->_mouseOffset.y; + if ((_vm->_events->_mousePos.y + _vm->_events->_mouseOffset.y) > 19) { for (int bobZoneId = 0; bobZoneId <= 48; bobZoneId++) { int bobId = _bobZone[bobZoneId]; - if (bobId && _bobZoneFl[bobZoneId] && _vm->_objectsManager->_bob[bobId]._bobMode && _vm->_objectsManager->_bob[bobId]._frameIndex != 250 && - !_vm->_objectsManager->_bob[bobId]._disabledAnimationFl && xp > _vm->_objectsManager->_bob[bobId]._oldX && - xp < _vm->_objectsManager->_bob[bobId]._oldWidth + _vm->_objectsManager->_bob[bobId]._oldX && yp > _vm->_objectsManager->_bob[bobId]._oldY) { - if (yp < _vm->_objectsManager->_bob[bobId]._oldHeight + _vm->_objectsManager->_bob[bobId]._oldY) { + if (bobId && _bobZoneFl[bobZoneId] && _vm->_objectsMan->_bob[bobId]._bobMode && _vm->_objectsMan->_bob[bobId]._frameIndex != 250 && + !_vm->_objectsMan->_bob[bobId]._disabledAnimationFl && xp > _vm->_objectsMan->_bob[bobId]._oldX && + xp < _vm->_objectsMan->_bob[bobId]._oldWidth + _vm->_objectsMan->_bob[bobId]._oldX && yp > _vm->_objectsMan->_bob[bobId]._oldY) { + if (yp < _vm->_objectsMan->_bob[bobId]._oldHeight + _vm->_objectsMan->_bob[bobId]._oldY) { if (_zone[bobZoneId]._spriteIndex == -1) { _zone[bobZoneId]._destX = 0; _zone[bobZoneId]._destY = 0; } if (!_zone[bobZoneId]._destX && !_zone[bobZoneId]._destY) { - _zone[bobZoneId]._destX = _vm->_objectsManager->_bob[bobId]._oldWidth + _vm->_objectsManager->_bob[bobId]._oldX; - _zone[bobZoneId]._destY = _vm->_objectsManager->_bob[bobId]._oldHeight + _vm->_objectsManager->_bob[bobId]._oldY + 6; + _zone[bobZoneId]._destX = _vm->_objectsMan->_bob[bobId]._oldWidth + _vm->_objectsMan->_bob[bobId]._oldX; + _zone[bobZoneId]._destY = _vm->_objectsMan->_bob[bobId]._oldHeight + _vm->_objectsMan->_bob[bobId]._oldY + 6; _zone[bobZoneId]._spriteIndex = -1; } return bobZoneId; @@ -2596,7 +2596,7 @@ int LinesManager::getMouseZone() { return -1; int colRes2 = 0; - for (int j = yp; j < _vm->_graphicsManager->_maxY; ++j) { + for (int j = yp; j < _vm->_graphicsMan->_maxY; ++j) { colRes2 = checkCollision(xp, j); if (colRes2 != -1 && _zone[colRes1]._enabledFl) break; @@ -2615,7 +2615,7 @@ int LinesManager::getMouseZone() { return -1; int colRes4 = 0; - for (int xCurrent = xp; _vm->_graphicsManager->_maxX > xCurrent; ++xCurrent) { + for (int xCurrent = xp; _vm->_graphicsMan->_maxX > xCurrent; ++xCurrent) { colRes4 = checkCollision(xCurrent, yp); if (colRes4 != -1 && _zone[colRes1]._enabledFl) break; @@ -2824,25 +2824,25 @@ void LinesManager::disableZone(int idx) { } void LinesManager::checkZone() { - int mouseX = _vm->_eventsManager->getMouseX(); - int mouseY = _vm->_eventsManager->getMouseY(); + int mouseX = _vm->_events->getMouseX(); + int mouseY = _vm->_events->getMouseY(); int oldMouseY = mouseY; if (_vm->_globals->_cityMapEnabledFl - || _vm->_eventsManager->_startPos.x >= mouseX - || (mouseY = _vm->_graphicsManager->_scrollOffset + 54, mouseX >= mouseY) + || _vm->_events->_startPos.x >= mouseX + || (mouseY = _vm->_graphicsMan->_scrollOffset + 54, mouseX >= mouseY) || (mouseY = oldMouseY - 1, mouseY < 0 || mouseY > 59)) { - if (_vm->_objectsManager->_visibleFl) - _vm->_objectsManager->_eraseVisibleCounter = 4; - _vm->_objectsManager->_visibleFl = false; + if (_vm->_objectsMan->_visibleFl) + _vm->_objectsMan->_eraseVisibleCounter = 4; + _vm->_objectsMan->_visibleFl = false; } else { - _vm->_objectsManager->_visibleFl = true; + _vm->_objectsMan->_visibleFl = true; } - if (_vm->_objectsManager->_forceZoneFl) { + if (_vm->_objectsMan->_forceZoneFl) { _zoneSkipCount = 100; _oldMouseZoneId = -1; _oldMouseX = -200; _oldMouseY = -220; - _vm->_objectsManager->_forceZoneFl = false; + _vm->_objectsMan->_forceZoneFl = false; } _zoneSkipCount++; @@ -2858,11 +2858,11 @@ void LinesManager::checkZone() { zoneId = _oldMouseZoneId; } if (_oldMouseZoneId != zoneId) { - _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100); - _vm->_eventsManager->_mouseCursorId = 4; - _vm->_eventsManager->changeMouseCursor(4); + _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100); + _vm->_events->_mouseCursorId = 4; + _vm->_events->changeMouseCursor(4); if (_forceHideText) { - _vm->_fontManager->hideText(5); + _vm->_fontMan->hideText(5); _forceHideText = false; return; } @@ -2874,39 +2874,39 @@ void LinesManager::checkZone() { _zone[zoneId]._verbFl7 || _zone[zoneId]._verbFl8 || _zone[zoneId]._verbFl9 || _zone[zoneId]._verbFl10) { if (_oldMouseZoneId != zoneId) { - _vm->_fontManager->initTextBuffers(5, _zone[zoneId]._messageId, _vm->_globals->_zoneFilename, 0, 430, 0, 0, 252); - _vm->_fontManager->showText(5); + _vm->_fontMan->initTextBuffers(5, _zone[zoneId]._messageId, _vm->_globals->_zoneFilename, 0, 430, 0, 0, 252); + _vm->_fontMan->showText(5); _forceHideText = true; } _hotspotTextColor += 25; if (_hotspotTextColor > 100) _hotspotTextColor = 0; - _vm->_graphicsManager->setColorPercentage2(251, _hotspotTextColor, _hotspotTextColor, _hotspotTextColor); - if (_vm->_eventsManager->_mouseCursorId == 4) { + _vm->_graphicsMan->setColorPercentage2(251, _hotspotTextColor, _hotspotTextColor, _hotspotTextColor); + if (_vm->_events->_mouseCursorId == 4) { if (_zone[zoneId]._verbFl1 == 2) { - _vm->_eventsManager->changeMouseCursor(16); - _vm->_eventsManager->_mouseCursorId = 16; - _vm->_objectsManager->setVerb(16); + _vm->_events->changeMouseCursor(16); + _vm->_events->_mouseCursorId = 16; + _vm->_objectsMan->setVerb(16); } } } else { - _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100); - _vm->_eventsManager->_mouseCursorId = 4; - _vm->_eventsManager->changeMouseCursor(4); + _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100); + _vm->_events->_mouseCursorId = 4; + _vm->_events->changeMouseCursor(4); } } - _vm->_objectsManager->_zoneNum = zoneId; + _vm->_objectsMan->_zoneNum = zoneId; _oldMouseX = mouseX; _oldMouseY = oldMouseY; _oldMouseZoneId = zoneId; - if (_vm->_globals->_freezeCharacterFl && (_vm->_eventsManager->_mouseCursorId == 4)) { + if (_vm->_globals->_freezeCharacterFl && (_vm->_events->_mouseCursorId == 4)) { if (zoneId != -1 && zoneId != 0) - _vm->_objectsManager->handleRightButton(); + _vm->_objectsMan->handleRightButton(); } if ((_vm->_globals->_cityMapEnabledFl && zoneId == -1) || !zoneId) { - _vm->_objectsManager->setVerb(0); - _vm->_eventsManager->_mouseCursorId = 0; - _vm->_eventsManager->changeMouseCursor(0); + _vm->_objectsMan->setVerb(0); + _vm->_events->_mouseCursorId = 0; + _vm->_events->changeMouseCursor(0); } } } diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp index 8a4c9c466c..01aa84e4ed 100644 --- a/engines/hopkins/menu.cpp +++ b/engines/hopkins/menu.cpp @@ -55,8 +55,8 @@ int MenuManager::menu() { result = 0; while (!g_system->getEventManager()->shouldQuit()) { - _vm->_objectsManager->_forestFl = false; - _vm->_eventsManager->_breakoutFl = false; + _vm->_objectsMan->_forestFl = false; + _vm->_events->_breakoutFl = false; _vm->_globals->_disableInventFl = true; _vm->_globals->_exitId = 0; @@ -64,35 +64,35 @@ int MenuManager::menu() { _vm->_globals->_inventory[idx] = 0; memset(_vm->_globals->_saveData, 0, 2000); - _vm->_objectsManager->addObject(14); + _vm->_objectsMan->addObject(14); memset(frameIndex, 0, sizeof(int) * ARRAYSIZE(frameIndex)); if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) - _vm->_graphicsManager->loadImage("MENU"); + _vm->_graphicsMan->loadImage("MENU"); else if (_vm->_globals->_language == LANG_EN) - _vm->_graphicsManager->loadImage("MENUAN"); + _vm->_graphicsMan->loadImage("MENUAN"); else if (_vm->_globals->_language == LANG_FR) - _vm->_graphicsManager->loadImage("MENUFR"); + _vm->_graphicsMan->loadImage("MENUFR"); else if (_vm->_globals->_language == LANG_SP) - _vm->_graphicsManager->loadImage("MENUES"); + _vm->_graphicsMan->loadImage("MENUES"); - _vm->_graphicsManager->fadeInLong(); + _vm->_graphicsMan->fadeInLong(); if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) - spriteData = _vm->_objectsManager->loadSprite("MENU.SPR"); + spriteData = _vm->_objectsMan->loadSprite("MENU.SPR"); else if (_vm->_globals->_language == LANG_EN) - spriteData = _vm->_objectsManager->loadSprite("MENUAN.SPR"); + spriteData = _vm->_objectsMan->loadSprite("MENUAN.SPR"); else if (_vm->_globals->_language == LANG_FR) - spriteData = _vm->_objectsManager->loadSprite("MENUFR.SPR"); + spriteData = _vm->_objectsMan->loadSprite("MENUFR.SPR"); else if (_vm->_globals->_language == LANG_SP) - spriteData = _vm->_objectsManager->loadSprite("MENUES.SPR"); + spriteData = _vm->_objectsMan->loadSprite("MENUES.SPR"); - _vm->_eventsManager->mouseOn(); - _vm->_eventsManager->changeMouseCursor(0); - _vm->_eventsManager->_mouseCursorId = 0; - _vm->_eventsManager->_mouseSpriteId = 0; + _vm->_events->mouseOn(); + _vm->_events->changeMouseCursor(0); + _vm->_events->_mouseCursorId = 0; + _vm->_events->_mouseSpriteId = 0; - _vm->_soundManager->playSound(28); + _vm->_soundMan->playSound(28); // Loop to make menu selection bool selectionMade = false; @@ -101,7 +101,7 @@ int MenuManager::menu() { return -1; menuIndex = MENU_NONE; - mousePos = Common::Point(_vm->_eventsManager->getMouseX(), _vm->_eventsManager->getMouseY()); + mousePos = Common::Point(_vm->_events->getMouseX(), _vm->_events->getMouseY()); if (mousePos.x >= 232 && mousePos.x <= 408) { if (mousePos.y >= 261 && mousePos.y <= 284) @@ -120,21 +120,21 @@ int MenuManager::menu() { if (menuIndex > MENU_NONE) frameIndex[menuIndex - 1] = 1; - _vm->_graphicsManager->fastDisplay(spriteData, 230, 259, frameIndex[0]); - _vm->_graphicsManager->fastDisplay(spriteData, 230, 291, frameIndex[1] + 2); - _vm->_graphicsManager->fastDisplay(spriteData, 230, 322, frameIndex[2] + 4); - _vm->_graphicsManager->fastDisplay(spriteData, 230, 354, frameIndex[3] + 6); - _vm->_graphicsManager->fastDisplay(spriteData, 230, 386, frameIndex[4] + 8); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_graphicsMan->fastDisplay(spriteData, 230, 259, frameIndex[0]); + _vm->_graphicsMan->fastDisplay(spriteData, 230, 291, frameIndex[1] + 2); + _vm->_graphicsMan->fastDisplay(spriteData, 230, 322, frameIndex[2] + 4); + _vm->_graphicsMan->fastDisplay(spriteData, 230, 354, frameIndex[3] + 6); + _vm->_graphicsMan->fastDisplay(spriteData, 230, 386, frameIndex[4] + 8); + _vm->_events->refreshScreenAndEvents(); - if (_vm->_eventsManager->getMouseButton() == 1 && menuIndex != MENU_NONE) + if (_vm->_events->getMouseButton() == 1 && menuIndex != MENU_NONE) selectionMade = true; } while (!selectionMade); if (menuIndex > MENU_NONE) { - _vm->_graphicsManager->fastDisplay(spriteData, 230, 259 + 32 * (menuIndex - 1), 10 + (menuIndex - 1)); - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_eventsManager->delay(200); + _vm->_graphicsMan->fastDisplay(spriteData, 230, 259 + 32 * (menuIndex - 1), 10 + (menuIndex - 1)); + _vm->_events->refreshScreenAndEvents(); + _vm->_events->delay(200); } if (menuIndex == PLAY_GAME) { @@ -142,7 +142,7 @@ int MenuManager::menu() { break; } else if (menuIndex == LOAD_GAME) { _vm->_globals->_exitId = -1; - _vm->_dialogsManager->showLoadGame(); + _vm->_dialog->showLoadGame(); if (_vm->_globals->_exitId != -1) { result = _vm->_globals->_exitId; @@ -150,7 +150,7 @@ int MenuManager::menu() { } _vm->_globals->_exitId = 0; } else if (menuIndex == OPTIONS) { - _vm->_dialogsManager->showOptionsDialog(); + _vm->_dialog->showOptionsDialog(); } else if (menuIndex == INTRODUCTION) { _vm->playIntro(); } else if (menuIndex == QUIT) { @@ -161,7 +161,7 @@ int MenuManager::menu() { _vm->_globals->freeMemory(spriteData); _vm->_globals->_disableInventFl = false; - _vm->_graphicsManager->fadeOutLong(); + _vm->_graphicsMan->fadeOutLong(); return result; } diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index f11810d89b..e9cc7c0c63 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -143,7 +143,7 @@ void ObjectsManager::clearAll() { // Load Object void ObjectsManager::loadObjects() { - byte *data = _vm->_fileManager->loadFile("OBJET.DAT"); + byte *data = _vm->_fileIO->loadFile("OBJET.DAT"); byte *srcP = data; for (int idx = 0; idx < 300; ++idx) { @@ -187,7 +187,7 @@ void ObjectsManager::resetHidingItems() { * Change Object */ void ObjectsManager::changeObject(int objIndex) { - _vm->_eventsManager->_objectBuf = loadObjectFromFile(objIndex, true); + _vm->_events->_objectBuf = loadObjectFromFile(objIndex, true); _curObjectIndex = objIndex; } @@ -214,8 +214,8 @@ byte *ObjectsManager::loadObjectFromFile(int objIndex, bool mode) { _objectHeight = height; if (mode) { - sprite_alone(_objectDataBuf, _vm->_eventsManager->_objectBuf, idx); - dataP = _vm->_eventsManager->_objectBuf; + sprite_alone(_objectDataBuf, _vm->_events->_objectBuf, idx); + dataP = _vm->_events->_objectBuf; } else { dataP = _vm->_globals->allocMemory(height * width); if (dataP == NULL) @@ -352,7 +352,7 @@ void ObjectsManager::removeObjectDataBuf() { * Load Sprite from file */ byte *ObjectsManager::loadSprite(const Common::String &file) { - return _vm->_fileManager->loadFile(file); + return _vm->_fileIO->loadFile(file); } /** @@ -381,20 +381,20 @@ void ObjectsManager::displaySprite() { // Handle copying any background areas that text are going to be drawn on _sortedDisplayCount = 0; for (int idx = 0; idx <= 10; ++idx) { - if (_vm->_fontManager->_textList[idx]._enabledFl && _vm->_fontManager->_text[idx]._textType != 2) { - clipX = _vm->_fontManager->_textList[idx]._pos.x - 2; + if (_vm->_fontMan->_textList[idx]._enabledFl && _vm->_fontMan->_text[idx]._textType != 2) { + clipX = _vm->_fontMan->_textList[idx]._pos.x - 2; - if (clipX < _vm->_graphicsManager->_minX) - clipX = _vm->_graphicsManager->_minX; + if (clipX < _vm->_graphicsMan->_minX) + clipX = _vm->_graphicsMan->_minX; - clipY = _vm->_fontManager->_textList[idx]._pos.y - 2; - if (clipY < _vm->_graphicsManager->_minY) - clipY = _vm->_graphicsManager->_minY; + clipY = _vm->_fontMan->_textList[idx]._pos.y - 2; + if (clipY < _vm->_graphicsMan->_minY) + clipY = _vm->_graphicsMan->_minY; - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, clipX, clipY, - _vm->_fontManager->_textList[idx]._width + 4, _vm->_fontManager->_textList[idx]._height + 4, - _vm->_graphicsManager->_frontBuffer, clipX, clipY); - _vm->_fontManager->_textList[idx]._enabledFl = false; + _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, clipX, clipY, + _vm->_fontMan->_textList[idx]._width + 4, _vm->_fontMan->_textList[idx]._height + 4, + _vm->_graphicsMan->_frontBuffer, clipX, clipY); + _vm->_fontMan->_textList[idx]._enabledFl = false; } } @@ -402,16 +402,16 @@ void ObjectsManager::displaySprite() { for (int idx = 0; idx < MAX_SPRITE; ++idx) { if (Liste[idx]._visibleFl) { clipX = Liste[idx]._posX - 2; - if (clipX < _vm->_graphicsManager->_minX) - clipX = _vm->_graphicsManager->_minX; + if (clipX < _vm->_graphicsMan->_minX) + clipX = _vm->_graphicsMan->_minX; clipY = Liste[idx]._posY - 2; - if (clipY < _vm->_graphicsManager->_minY) - clipY = _vm->_graphicsManager->_minY; + if (clipY < _vm->_graphicsMan->_minY) + clipY = _vm->_graphicsMan->_minY; - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, clipX, clipY, + _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, clipX, clipY, Liste[idx]._width + 4, Liste[idx]._height + 4, - _vm->_graphicsManager->_frontBuffer, clipX, clipY); + _vm->_graphicsMan->_frontBuffer, clipX, clipY); Liste[idx]._visibleFl = false; } } @@ -494,76 +494,76 @@ void ObjectsManager::displaySprite() { _sortedDisplayCount = 0; - _vm->_dialogsManager->drawInvent(_oldBorderPos, _oldBorderSpriteIndex, _borderPos, _borderSpriteIndex); + _vm->_dialog->drawInvent(_oldBorderPos, _oldBorderSpriteIndex, _borderPos, _borderSpriteIndex); if (_saveLoadFl) { - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, _saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353); + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, _saveLoadSprite, _vm->_events->_startPos.x + 183, 60, 274, 353); if (_saveLoadX && _saveLoadY) - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _saveLoadSprite2, _saveLoadX + _vm->_eventsManager->_startPos.x + 300, _saveLoadY + 300, 0); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _saveLoadSprite2, _saveLoadX + _vm->_events->_startPos.x + 300, _saveLoadY + 300, 0); - _vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, _vm->_eventsManager->_startPos.x + 457, 413); + _vm->_graphicsMan->addDirtyRect(_vm->_events->_startPos.x + 183, 60, _vm->_events->_startPos.x + 457, 413); } // If the Options dialog is activated, draw the elements if (_vm->_globals->_optionDialogFl) { - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr, - _vm->_eventsManager->_startPos.x + 464, 407, 0); - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr, - _vm->_eventsManager->_startPos.x + 657, 556, _vm->_globals->_menuSpeed); - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr, - _vm->_eventsManager->_startPos.x + 731, 495, _vm->_globals->_menuTextOff); - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr, - _vm->_eventsManager->_startPos.x + 731, 468, _vm->_globals->_menuVoiceOff); - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr, - _vm->_eventsManager->_startPos.x + 731, 441, _vm->_globals->_menuSoundOff); - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr, - _vm->_eventsManager->_startPos.x + 731, 414, _vm->_globals->_menuMusicOff); - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr, - _vm->_eventsManager->_startPos.x + 600, 522, _vm->_globals->_menuDisplayType); - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr, - _vm->_eventsManager->_startPos.x + 611, 502, _vm->_globals->_menuScrollSpeed); - _vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 164, 107, _vm->_eventsManager->_startPos.x + 498, 320); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr, + _vm->_events->_startPos.x + 464, 407, 0); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr, + _vm->_events->_startPos.x + 657, 556, _vm->_globals->_menuSpeed); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr, + _vm->_events->_startPos.x + 731, 495, _vm->_globals->_menuTextOff); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr, + _vm->_events->_startPos.x + 731, 468, _vm->_globals->_menuVoiceOff); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr, + _vm->_events->_startPos.x + 731, 441, _vm->_globals->_menuSoundOff); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr, + _vm->_events->_startPos.x + 731, 414, _vm->_globals->_menuMusicOff); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr, + _vm->_events->_startPos.x + 600, 522, _vm->_globals->_menuDisplayType); + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _vm->_globals->_optionDialogSpr, + _vm->_events->_startPos.x + 611, 502, _vm->_globals->_menuScrollSpeed); + _vm->_graphicsMan->addDirtyRect(_vm->_events->_startPos.x + 164, 107, _vm->_events->_startPos.x + 498, 320); } // Loop to draw any on-screen text for (int idx = 0; idx <= 10; ++idx) { - if (_vm->_fontManager->_text[idx]._textOnFl) { - if ((_vm->_fontManager->_text[idx]._textType < 2) || (_vm->_fontManager->_text[idx]._textType > 3)) - _vm->_fontManager->box(idx, - _vm->_fontManager->_text[idx]._messageId, _vm->_fontManager->_text[idx]._filename, - _vm->_eventsManager->_startPos.x + _vm->_fontManager->_text[idx]._pos.x, _vm->_fontManager->_text[idx]._pos.y); + if (_vm->_fontMan->_text[idx]._textOnFl) { + if ((_vm->_fontMan->_text[idx]._textType < 2) || (_vm->_fontMan->_text[idx]._textType > 3)) + _vm->_fontMan->box(idx, + _vm->_fontMan->_text[idx]._messageId, _vm->_fontMan->_text[idx]._filename, + _vm->_events->_startPos.x + _vm->_fontMan->_text[idx]._pos.x, _vm->_fontMan->_text[idx]._pos.y); else - _vm->_fontManager->box(idx, - _vm->_fontManager->_text[idx]._messageId, _vm->_fontManager->_text[idx]._filename, - _vm->_fontManager->_text[idx]._pos.x, _vm->_fontManager->_text[idx]._pos.y); - _vm->_fontManager->_textList[idx]._enabledFl = true; + _vm->_fontMan->box(idx, + _vm->_fontMan->_text[idx]._messageId, _vm->_fontMan->_text[idx]._filename, + _vm->_fontMan->_text[idx]._pos.x, _vm->_fontMan->_text[idx]._pos.y); + _vm->_fontMan->_textList[idx]._enabledFl = true; - if ((_vm->_fontManager->_text[idx]._textType < 2) || (_vm->_fontManager->_text[idx]._textType > 3)) - _vm->_fontManager->_textList[idx]._pos.x = _vm->_eventsManager->_startPos.x + _vm->_fontManager->_text[idx]._pos.x; + if ((_vm->_fontMan->_text[idx]._textType < 2) || (_vm->_fontMan->_text[idx]._textType > 3)) + _vm->_fontMan->_textList[idx]._pos.x = _vm->_events->_startPos.x + _vm->_fontMan->_text[idx]._pos.x; else - _vm->_fontManager->_textList[idx]._pos.x = _vm->_fontManager->_text[idx]._pos.x; + _vm->_fontMan->_textList[idx]._pos.x = _vm->_fontMan->_text[idx]._pos.x; - _vm->_fontManager->_textList[idx]._pos.y = _vm->_fontManager->_text[idx]._pos.y; - _vm->_fontManager->_textList[idx]._width = _vm->_fontManager->_text[idx]._width; - _vm->_fontManager->_textList[idx]._height = _vm->_fontManager->_text[idx]._height; + _vm->_fontMan->_textList[idx]._pos.y = _vm->_fontMan->_text[idx]._pos.y; + _vm->_fontMan->_textList[idx]._width = _vm->_fontMan->_text[idx]._width; + _vm->_fontMan->_textList[idx]._height = _vm->_fontMan->_text[idx]._height; - if (_vm->_fontManager->_textList[idx]._pos.x < _vm->_graphicsManager->_minX) - _vm->_fontManager->_textList[idx]._pos.x = _vm->_graphicsManager->_minX - 1; - if (_vm->_fontManager->_textList[idx]._pos.y < _vm->_graphicsManager->_minY) - _vm->_fontManager->_textList[idx]._pos.y = _vm->_graphicsManager->_minY - 1; + if (_vm->_fontMan->_textList[idx]._pos.x < _vm->_graphicsMan->_minX) + _vm->_fontMan->_textList[idx]._pos.x = _vm->_graphicsMan->_minX - 1; + if (_vm->_fontMan->_textList[idx]._pos.y < _vm->_graphicsMan->_minY) + _vm->_fontMan->_textList[idx]._pos.y = _vm->_graphicsMan->_minY - 1; - int posX = _vm->_fontManager->_textList[idx]._pos.x; - if (_vm->_fontManager->_textList[idx]._width + posX > _vm->_graphicsManager->_maxX) - _vm->_fontManager->_textList[idx]._width = _vm->_graphicsManager->_maxX - posX; - int posY = _vm->_fontManager->_textList[idx]._pos.y; - if (_vm->_fontManager->_textList[idx]._height + posY > _vm->_graphicsManager->_maxY) - _vm->_fontManager->_textList[idx]._height = _vm->_graphicsManager->_maxY - posY; - if (_vm->_fontManager->_textList[idx]._width <= 0 || _vm->_fontManager->_textList[idx]._height <= 0) - _vm->_fontManager->_textList[idx]._enabledFl = false; + int posX = _vm->_fontMan->_textList[idx]._pos.x; + if (_vm->_fontMan->_textList[idx]._width + posX > _vm->_graphicsMan->_maxX) + _vm->_fontMan->_textList[idx]._width = _vm->_graphicsMan->_maxX - posX; + int posY = _vm->_fontMan->_textList[idx]._pos.y; + if (_vm->_fontMan->_textList[idx]._height + posY > _vm->_graphicsMan->_maxY) + _vm->_fontMan->_textList[idx]._height = _vm->_graphicsMan->_maxY - posY; + if (_vm->_fontMan->_textList[idx]._width <= 0 || _vm->_fontMan->_textList[idx]._height <= 0) + _vm->_fontMan->_textList[idx]._enabledFl = false; } } - _vm->_dialogsManager->inventAnim(); + _vm->_dialog->inventAnim(); } void ObjectsManager::resetBob(int idx) { @@ -604,10 +604,10 @@ void ObjectsManager::setBobInfo(int idx) { int yp = _bob[idx]._oldY; if (_bob[idx]._isSpriteFl) - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _bob[idx]._spriteData, + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _bob[idx]._spriteData, xp + 300, yp + 300, _bob[idx]._frameIndex); else - _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, + _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, _bob[idx]._spriteData, xp + 300, yp + 300, _bob[idx]._frameIndex, _bob[idx]._zoomOutFactor, _bob[idx]._zooInmFactor, _bob[idx]._flipFl); @@ -619,27 +619,27 @@ void ObjectsManager::setBobInfo(int idx) { Liste2[idx]._width = _bob[idx]._oldWidth; Liste2[idx]._height = _bob[idx]._oldHeight; - if (Liste2[idx]._posX < _vm->_graphicsManager->_minX) { - Liste2[idx]._width -= _vm->_graphicsManager->_minX - Liste2[idx]._posX; - Liste2[idx]._posX = _vm->_graphicsManager->_minX; + if (Liste2[idx]._posX < _vm->_graphicsMan->_minX) { + Liste2[idx]._width -= _vm->_graphicsMan->_minX - Liste2[idx]._posX; + Liste2[idx]._posX = _vm->_graphicsMan->_minX; } - if (Liste2[idx]._posY < _vm->_graphicsManager->_minY) { - Liste2[idx]._height -= _vm->_graphicsManager->_minY - Liste2[idx]._posY; - Liste2[idx]._posY = _vm->_graphicsManager->_minY; + if (Liste2[idx]._posY < _vm->_graphicsMan->_minY) { + Liste2[idx]._height -= _vm->_graphicsMan->_minY - Liste2[idx]._posY; + Liste2[idx]._posY = _vm->_graphicsMan->_minY; } - if (Liste2[idx]._width + Liste2[idx]._posX > _vm->_graphicsManager->_maxX) - Liste2[idx]._width = _vm->_graphicsManager->_maxX - Liste2[idx]._posX; + if (Liste2[idx]._width + Liste2[idx]._posX > _vm->_graphicsMan->_maxX) + Liste2[idx]._width = _vm->_graphicsMan->_maxX - Liste2[idx]._posX; - if (Liste2[idx]._height + Liste2[idx]._posY > _vm->_graphicsManager->_maxY) - Liste2[idx]._height = _vm->_graphicsManager->_maxY - Liste2[idx]._posY; + if (Liste2[idx]._height + Liste2[idx]._posY > _vm->_graphicsMan->_maxY) + Liste2[idx]._height = _vm->_graphicsMan->_maxY - Liste2[idx]._posY; if (Liste2[idx]._width <= 0 || Liste2[idx]._height <= 0) Liste2[idx]._visibleFl = false; if (Liste2[idx]._visibleFl) - _vm->_graphicsManager->addDirtyRect( + _vm->_graphicsMan->addDirtyRect( Liste2[idx]._posX, Liste2[idx]._posY, Liste2[idx]._posX + Liste2[idx]._width, @@ -654,11 +654,11 @@ void ObjectsManager::displayBob(int idx) { resetBob(idx); - const byte *data = _vm->_animationManager->_animBqe[idx]._data; + const byte *data = _vm->_animMan->_animBqe[idx]._data; int bankIdx = READ_LE_INT16(data); if (!bankIdx) return; - if ((!_vm->_animationManager->Bank[bankIdx]._loadedFl) || (!READ_LE_UINT16(data + 24))) + if ((!_vm->_animMan->Bank[bankIdx]._loadedFl) || (!READ_LE_UINT16(data + 24))) return; @@ -674,15 +674,15 @@ void ObjectsManager::displayBob(int idx) { _bob[idx]._isSpriteFl = false; - if (_vm->_animationManager->Bank[bankIdx]._fileHeader == 1) { + if (_vm->_animMan->Bank[bankIdx]._fileHeader == 1) { _bob[idx]._isSpriteFl = true; _bob[idx]._zoomFactor = 0; _bob[idx]._flipFl = false; } - _bob[idx]._animData = _vm->_animationManager->_animBqe[idx]._data; + _bob[idx]._animData = _vm->_animMan->_animBqe[idx]._data; _bob[idx]._bobMode = 10; - _bob[idx]._spriteData = _vm->_animationManager->Bank[bankIdx]._data; + _bob[idx]._spriteData = _vm->_animMan->Bank[bankIdx]._data; _bob[idx]._bobModeChange = bobModeChange; _bob[idx]._modeChangeCtr = newModeChangeCtr; @@ -752,26 +752,26 @@ void ObjectsManager::initBobVariables(int idx) { if (posZoom) { if (deltaX >= 0) - deltaX = _vm->_graphicsManager->zoomIn(deltaX, posZoom); + deltaX = _vm->_graphicsMan->zoomIn(deltaX, posZoom); else - deltaX = -_vm->_graphicsManager->zoomIn(-deltaX, posZoom); + deltaX = -_vm->_graphicsMan->zoomIn(-deltaX, posZoom); if (deltaY >= 0) - deltaY = _vm->_graphicsManager->zoomIn(deltaY, posZoom); + deltaY = _vm->_graphicsMan->zoomIn(deltaY, posZoom); else - deltaY = -_vm->_graphicsManager->zoomIn(abs(deltaX), posZoom); + deltaY = -_vm->_graphicsMan->zoomIn(abs(deltaX), posZoom); } if (negZoom) { if (deltaX >= 0) - deltaX = _vm->_graphicsManager->zoomOut(deltaX, negZoom); + deltaX = _vm->_graphicsMan->zoomOut(deltaX, negZoom); else - deltaX = -_vm->_graphicsManager->zoomOut(-deltaX, negZoom); + deltaX = -_vm->_graphicsMan->zoomOut(-deltaX, negZoom); if (deltaY >= 0) - deltaY = _vm->_graphicsManager->zoomOut(deltaY, negZoom); + deltaY = _vm->_graphicsMan->zoomOut(deltaY, negZoom); else - deltaY = -_vm->_graphicsManager->zoomOut(abs(deltaX), negZoom); + deltaY = -_vm->_graphicsMan->zoomOut(abs(deltaX), negZoom); } int newX = _bob[idx]._xp - deltaX; @@ -790,11 +790,11 @@ void ObjectsManager::initBobVariables(int idx) { int height = getHeight(_bob[idx]._spriteData, _bob[idx]._frameIndex); if (posZoom) { - width = _vm->_graphicsManager->zoomIn(width, posZoom); - height = _vm->_graphicsManager->zoomIn(height, posZoom); + width = _vm->_graphicsMan->zoomIn(width, posZoom); + height = _vm->_graphicsMan->zoomIn(height, posZoom); } else if (negZoom) { - width = _vm->_graphicsManager->zoomOut(width, negZoom); - height = _vm->_graphicsManager->zoomOut(height, negZoom); + width = _vm->_graphicsMan->zoomOut(width, negZoom); + height = _vm->_graphicsMan->zoomOut(height, negZoom); } Liste2[idx]._width = width; @@ -853,42 +853,42 @@ void ObjectsManager::showSprite(int idx) { return; if (spr->_rleFl) - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, spr->_spriteData, + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, spr->_spriteData, spr->_destX + 300, spr->_destY + 300, spr->_spriteIndex); else - _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, spr->_spriteData, + _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, spr->_spriteData, spr->_destX + 300, spr->_destY + 300, spr->_spriteIndex, spr->_reducePct, spr->_zoomPct, spr->_flipFl); ListeItem *list = &Liste[idx]; list->_width = spr->_width; list->_height = spr->_height; - if (list->_posX < _vm->_graphicsManager->_minX) { - list->_width -= _vm->_graphicsManager->_minX - list->_posX; - list->_posX = _vm->_graphicsManager->_minX; + if (list->_posX < _vm->_graphicsMan->_minX) { + list->_width -= _vm->_graphicsMan->_minX - list->_posX; + list->_posX = _vm->_graphicsMan->_minX; } - if (list->_posY < _vm->_graphicsManager->_minY) { - list->_height -= _vm->_graphicsManager->_minY - list->_posY; - list->_posY = _vm->_graphicsManager->_minY; + if (list->_posY < _vm->_graphicsMan->_minY) { + list->_height -= _vm->_graphicsMan->_minY - list->_posY; + list->_posY = _vm->_graphicsMan->_minY; } - list->_width = MIN(list->_width, _vm->_graphicsManager->_maxX - list->_posX); - list->_height = MIN(list->_height, _vm->_graphicsManager->_maxY - list->_posY); + list->_width = MIN(list->_width, _vm->_graphicsMan->_maxX - list->_posX); + list->_height = MIN(list->_height, _vm->_graphicsMan->_maxY - list->_posY); if (list->_width <= 0 || list->_height <= 0) list->_visibleFl = false; if (list->_visibleFl) - _vm->_graphicsManager->addDirtyRect( list->_posX, list->_posY, list->_posX + list->_width, list->_posY + list->_height); + _vm->_graphicsMan->addDirtyRect( list->_posX, list->_posY, list->_posX + list->_width, list->_posY + list->_height); } void ObjectsManager::displayHiding(int idx) { HidingItem *hid = &_hidingItem[idx]; - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _hidingItemData[1], + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, _hidingItemData[1], hid->_x + 300, hid->_y + 300, hid->_spriteIndex); - _vm->_graphicsManager->addDirtyRect(hid->_x, hid->_y, hid->_x + hid->_width, hid->_y + hid->_height); + _vm->_graphicsMan->addDirtyRect(hid->_x, hid->_y, hid->_x + hid->_width, hid->_y + hid->_height); } // Compute Sprite @@ -926,27 +926,27 @@ void ObjectsManager::computeSprite(int idx) { if (zoomPercent) { if (tmpX >= 0) - deltaX = _vm->_graphicsManager->zoomIn(tmpX, zoomPercent); + deltaX = _vm->_graphicsMan->zoomIn(tmpX, zoomPercent); else - deltaX = -_vm->_graphicsManager->zoomIn(-tmpX, zoomPercent); + deltaX = -_vm->_graphicsMan->zoomIn(-tmpX, zoomPercent); if (tmpY >= 0) { - deltaY = _vm->_graphicsManager->zoomIn(tmpY, zoomPercent); + deltaY = _vm->_graphicsMan->zoomIn(tmpY, zoomPercent); } else { tmpY = abs(tmpX); - deltaY = -_vm->_graphicsManager->zoomIn(tmpY, zoomPercent); + deltaY = -_vm->_graphicsMan->zoomIn(tmpY, zoomPercent); } } else if (reducePercent) { if (tmpX >= 0) - deltaX = _vm->_graphicsManager->zoomOut(tmpX, reducePercent); + deltaX = _vm->_graphicsMan->zoomOut(tmpX, reducePercent); else - deltaX = -_vm->_graphicsManager->zoomOut(-tmpX, reducePercent); + deltaX = -_vm->_graphicsMan->zoomOut(-tmpX, reducePercent); if (tmpY >= 0) { - deltaY = _vm->_graphicsManager->zoomOut(tmpY, reducePercent); + deltaY = _vm->_graphicsMan->zoomOut(tmpY, reducePercent); } else { tmpY = abs(tmpX); - deltaY = -_vm->_graphicsManager->zoomOut(tmpY, reducePercent); + deltaY = -_vm->_graphicsMan->zoomOut(tmpY, reducePercent); } } @@ -966,11 +966,11 @@ void ObjectsManager::computeSprite(int idx) { int height = getHeight(spr->_spriteData, spr->_spriteIndex); if (zoomPercent) { - width = _vm->_graphicsManager->zoomIn(width, zoomPercent); - height = _vm->_graphicsManager->zoomIn(height, zoomPercent); + width = _vm->_graphicsMan->zoomIn(width, zoomPercent); + height = _vm->_graphicsMan->zoomIn(height, zoomPercent); } else if (reducePercent) { - height = _vm->_graphicsManager->zoomOut(height, reducePercent); - width = _vm->_graphicsManager->zoomOut(width, reducePercent); + height = _vm->_graphicsMan->zoomOut(height, reducePercent); + width = _vm->_graphicsMan->zoomOut(width, reducePercent); } spr->_width = width; @@ -1024,7 +1024,7 @@ void ObjectsManager::displayBobAnim() { if (_lockedAnims[idx]._enableFl) _bob[idx]._xp = _lockedAnims[idx]._posX; if ( _charactersEnabledFl && idx > 20) - _bob[idx]._xp += _vm->_eventsManager->_startPos.x; + _bob[idx]._xp += _vm->_events->_startPos.x; _bob[idx]._yp = READ_LE_INT16(dataPtr + 2 * dataIdx + 2); _bob[idx]._moveChange1 = READ_LE_INT16(dataPtr + 2 * dataIdx + 4); @@ -1057,7 +1057,7 @@ void ObjectsManager::displayBobAnim() { if (_lockedAnims[idx]._enableFl) _bob[idx]._xp = _lockedAnims[idx]._posX; if (_charactersEnabledFl && idx > 20) - _bob[idx]._xp += _vm->_eventsManager->_startPos.x; + _bob[idx]._xp += _vm->_events->_startPos.x; _bob[idx]._yp = READ_LE_INT16(bobData + 2); _bob[idx]._moveChange1 = READ_LE_INT16(bobData + 4); @@ -1094,10 +1094,10 @@ void ObjectsManager::displayBobAnim() { if ((_bob[i]._bobMode == 10) && (_bob[i]._bobMode10)) { if ((_bob[i]._bobModeChange != 2) && (_bob[i]._bobModeChange != 4)) { if (Liste2[i]._visibleFl) { - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, + _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, Liste2[i]._posX, Liste2[i]._posY, Liste2[i]._width, Liste2[i]._height, - _vm->_graphicsManager->_frontBuffer, Liste2[i]._posX, + _vm->_graphicsMan->_frontBuffer, Liste2[i]._posX, Liste2[i]._posY); Liste2[i]._visibleFl = false; } @@ -1106,10 +1106,10 @@ void ObjectsManager::displayBobAnim() { if (_bob[i]._bobMode == 11) { if (Liste2[i]._visibleFl) { - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, + _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, Liste2[i]._posX, Liste2[i]._posY, Liste2[i]._width, Liste2[i]._height, - _vm->_graphicsManager->_frontBuffer, + _vm->_graphicsMan->_frontBuffer, Liste2[i]._posX, Liste2[i]._posY); Liste2[i]._visibleFl = false; } @@ -1144,13 +1144,13 @@ void ObjectsManager::displayVBob() { width = getWidth(vbob->_spriteData, vbob->_frameIndex); height = getHeight(vbob->_spriteData, vbob->_frameIndex); - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_backBuffer, vbob->_surface, + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_backBuffer, vbob->_surface, vbob->_xp, vbob->_yp, width, height); - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, vbob->_surface, + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, vbob->_surface, vbob->_xp, vbob->_yp, width, height); - _vm->_graphicsManager->addDirtyRect(vbob->_xp, vbob->_yp, vbob->_xp + width, height + vbob->_yp); + _vm->_graphicsMan->addDirtyRect(vbob->_xp, vbob->_yp, vbob->_xp + width, height + vbob->_yp); vbob->_surface = _vm->_globals->freeMemory(vbob->_surface); vbob->_displayMode = 0; @@ -1168,13 +1168,13 @@ void ObjectsManager::displayVBob() { width = getWidth(vbob->_oldSpriteData, vbob->_oldFrameIndex); height = getHeight(vbob->_oldSpriteData, vbob->_oldFrameIndex); - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_backBuffer, vbob->_surface, + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_backBuffer, vbob->_surface, vbob->_oldX, vbob->_oldY, width, height); - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, vbob->_surface, + _vm->_graphicsMan->restoreSurfaceRect(_vm->_graphicsMan->_frontBuffer, vbob->_surface, vbob->_oldX, vbob->_oldY, width, height); - _vm->_graphicsManager->addDirtyRect(vbob->_oldX, vbob->_oldY, vbob->_oldX + width, vbob->_oldY + height); + _vm->_graphicsMan->addDirtyRect(vbob->_oldX, vbob->_oldY, vbob->_oldX + width, vbob->_oldY + height); vbob->_displayMode = 1; vbob->_oldSpriteData = vbob->_spriteData; @@ -1195,24 +1195,24 @@ void ObjectsManager::displayVBob() { byte *surface = _vm->_globals->allocMemory(height * width); vbob->_surface = surface; - _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_backBuffer, surface, + _vm->_graphicsMan->copySurfaceRect(_vm->_graphicsMan->_backBuffer, surface, vbob->_xp, vbob->_yp, width, height); if (*vbob->_spriteData == 78) { - _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_backBuffer, vbob->_spriteData, + _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_backBuffer, vbob->_spriteData, vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex, 0, 0, false); - _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, vbob->_spriteData, + _vm->_graphicsMan->drawCompressedSprite(_vm->_graphicsMan->_frontBuffer, vbob->_spriteData, vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex, 0, 0, false); } else { - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, vbob->_spriteData, + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_frontBuffer, vbob->_spriteData, vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex); - _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_backBuffer, vbob->_spriteData, + _vm->_graphicsMan->drawVesaSprite(_vm->_graphicsMan->_backBuffer, vbob->_spriteData, vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex); } - _vm->_graphicsManager->addDirtyRect(vbob->_xp, vbob->_yp , vbob->_xp + width, vbob->_yp + height); + _vm->_graphicsMan->addDirtyRect(vbob->_xp, vbob->_yp , vbob->_xp + width, vbob->_yp + height); vbob->_displayMode = 2; } } @@ -1326,7 +1326,7 @@ void ObjectsManager::setFlipSprite(int idx, bool flipFl) { } void ObjectsManager::GOHOME() { - if (_vm->_linesManager->_route == NULL) + if (_vm->_linesMan->_route == NULL) return; if (_homeRateCounter > 1) { @@ -1344,10 +1344,10 @@ void ObjectsManager::GOHOME() { _homeRateCounter = 0; if (_oldDirection == DIR_NONE) { computeAndSetSpriteSize(); - newPosX = _vm->_linesManager->_route->_x; - newPosY = _vm->_linesManager->_route->_y; - newDirection = _vm->_linesManager->_route->_dir; - _vm->_linesManager->_route++; + newPosX = _vm->_linesMan->_route->_x; + newPosY = _vm->_linesMan->_route->_y; + newDirection = _vm->_linesMan->_route->_dir; + _vm->_linesMan->_route++; if (newPosX != -1 || newPosY != -1) { _oldDirection = newDirection; @@ -1363,21 +1363,21 @@ void ObjectsManager::GOHOME() { zoneId = _vm->_globals->_saveData->_data[svLastZoneNum]; else zoneId = _zoneNum; - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; computeAndSetSpriteSize(); setFlipSprite(0, false); _homeRateCounter = 0; - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; _oldDirection = DIR_NONE; if (zoneId > 0) { - if (_vm->_linesManager->_zone[zoneId]._destX && _vm->_linesManager->_zone[zoneId]._destY && _vm->_linesManager->_zone[zoneId]._destY != 31) { - if (_vm->_linesManager->_zone[zoneId]._spriteIndex == -1) { - _vm->_linesManager->_zone[zoneId]._destX = 0; - _vm->_linesManager->_zone[zoneId]._destY = 0; - _vm->_linesManager->_zone[zoneId]._spriteIndex = 0; + if (_vm->_linesMan->_zone[zoneId]._destX && _vm->_linesMan->_zone[zoneId]._destY && _vm->_linesMan->_zone[zoneId]._destY != 31) { + if (_vm->_linesMan->_zone[zoneId]._spriteIndex == -1) { + _vm->_linesMan->_zone[zoneId]._destX = 0; + _vm->_linesMan->_zone[zoneId]._destY = 0; + _vm->_linesMan->_zone[zoneId]._spriteIndex = 0; } else { - setSpriteIndex(0, _vm->_linesManager->_zone[zoneId]._spriteIndex); - _vm->_globals->_actionDirection = _vm->_linesManager->_zone[zoneId]._spriteIndex - 59; + setSpriteIndex(0, _vm->_linesMan->_zone[zoneId]._spriteIndex); + _vm->_globals->_actionDirection = _vm->_linesMan->_zone[zoneId]._spriteIndex - 59; } } } @@ -1395,11 +1395,11 @@ void ObjectsManager::GOHOME() { int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY; if (_sprite[0]._zoomFactor < 0) { - deltaX = _vm->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomOut(deltaY, -_sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor); } else if (_sprite[0]._zoomFactor > 0) { - deltaX = _vm->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX + deltaX; oldPosY = _oldCharacterPosY + deltaY; @@ -1418,11 +1418,11 @@ void ObjectsManager::GOHOME() { int deltaX = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedX; int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY; if (_sprite[0]._zoomFactor < 0) { - deltaX = _vm->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomOut(deltaY, -_sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor); } else if (_sprite[0]._zoomFactor > 0) { - deltaX = _vm->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX - deltaX; oldPosY = _oldCharacterPosY - deltaY; @@ -1440,9 +1440,9 @@ void ObjectsManager::GOHOME() { } else { int deltaY = abs(_vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY); if (_sprite[0]._zoomFactor < 0) { - deltaY = _vm->_graphicsManager->zoomOut(deltaY, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor); } else if (_sprite[0]._zoomFactor > 0) { - deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX; oldPosY = _oldCharacterPosY - deltaY; @@ -1461,9 +1461,9 @@ void ObjectsManager::GOHOME() { } else { int deltaY = abs(_vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY); if (_sprite[0]._zoomFactor < 0) { - deltaY = _vm->_graphicsManager->zoomOut(deltaY, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor); } else if (_sprite[0]._zoomFactor > 0) { - deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX; oldPosY = deltaY + _oldCharacterPosY; @@ -1482,12 +1482,12 @@ void ObjectsManager::GOHOME() { int deltaX = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedX; int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY; if (_sprite[0]._zoomFactor < 0) { - deltaX = _vm->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomOut(deltaY, -_sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor); } if (_sprite[0]._zoomFactor > 0) { - deltaX = _vm->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = deltaX + _oldCharacterPosX; oldPosY = _oldCharacterPosY + deltaY; @@ -1506,11 +1506,11 @@ void ObjectsManager::GOHOME() { int deltaX = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedX; int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY; if (_sprite[0]._zoomFactor < 0) { - deltaX = _vm->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomOut(deltaY, -_sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor); } else if (_sprite[0]._zoomFactor > 0) { - deltaX = _vm->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX - deltaX; oldPosY = _oldCharacterPosY + deltaY; @@ -1529,12 +1529,12 @@ void ObjectsManager::GOHOME() { int deltaX = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedX; int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY; if (_sprite[0]._zoomFactor < 0) { - deltaX = _vm->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomOut(deltaY, -_sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor); } if (_sprite[0]._zoomFactor > 0) { - deltaX = _vm->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = deltaX + _oldCharacterPosX; oldPosY = _oldCharacterPosY + deltaY; @@ -1553,12 +1553,12 @@ void ObjectsManager::GOHOME() { int deltaX = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedX; int deltaY = _vm->_globals->_hopkinsItem[_oldFrameIndex]._speedY; if (_sprite[0]._zoomFactor < 0) { - deltaX = _vm->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomOut(deltaY, -_sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomOut(deltaY, -_sprite[0]._zoomFactor); } if (_sprite[0]._zoomFactor > 0) { - deltaX = _vm->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); - deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); + deltaX = _vm->_graphicsMan->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsMan->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX - deltaX; oldPosY = _oldCharacterPosY + deltaY; @@ -1570,10 +1570,10 @@ void ObjectsManager::GOHOME() { } bool loopCond = false; do { - newPosX = _vm->_linesManager->_route->_x; - newPosY = _vm->_linesManager->_route->_y; - newDirection = (Directions)_vm->_linesManager->_route->_dir; - _vm->_linesManager->_route++; + newPosX = _vm->_linesMan->_route->_x; + newPosY = _vm->_linesMan->_route->_y; + newDirection = (Directions)_vm->_linesMan->_route->_dir; + _vm->_linesMan->_route++; if (newPosX == -1 && newPosY == -1) { int zoneId; @@ -1583,7 +1583,7 @@ void ObjectsManager::GOHOME() { zoneId = _zoneNum; setSpriteIndex(0, _oldDirection + 59); _vm->_globals->_actionDirection = DIR_NONE; - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; computeAndSetSpriteSize(); setFlipSprite(0, false); _homeRateCounter = 0; @@ -1592,14 +1592,14 @@ void ObjectsManager::GOHOME() { _oldCharacterPosY = getSpriteY(0); if (zoneId > 0) { - if (_vm->_linesManager->_zone[zoneId]._destX && _vm->_linesManager->_zone[zoneId]._destY && _vm->_linesManager->_zone[zoneId]._destY != 31) { - if ( _vm->_linesManager->_zone[zoneId]._spriteIndex == -1) { - _vm->_linesManager->_zone[zoneId]._destX = 0; - _vm->_linesManager->_zone[zoneId]._destY = 0; - _vm->_linesManager->_zone[zoneId]._spriteIndex = 0; + if (_vm->_linesMan->_zone[zoneId]._destX && _vm->_linesMan->_zone[zoneId]._destY && _vm->_linesMan->_zone[zoneId]._destY != 31) { + if ( _vm->_linesMan->_zone[zoneId]._spriteIndex == -1) { + _vm->_linesMan->_zone[zoneId]._destX = 0; + _vm->_linesMan->_zone[zoneId]._destY = 0; + _vm->_linesMan->_zone[zoneId]._spriteIndex = 0; } else { - setSpriteIndex(0, _vm->_linesManager->_zone[zoneId]._spriteIndex); - _vm->_globals->_actionDirection = _vm->_linesManager->_zone[zoneId]._spriteIndex - 59; + setSpriteIndex(0, _vm->_linesMan->_zone[zoneId]._spriteIndex); + _vm->_globals->_actionDirection = _vm->_linesMan->_zone[zoneId]._spriteIndex - 59; } } } @@ -1643,7 +1643,7 @@ void ObjectsManager::GOHOME() { } void ObjectsManager::GOHOME2() { - if (_vm->_linesManager->_route == NULL) + if (_vm->_linesMan->_route == NULL) return; int realSpeed = 2; @@ -1655,10 +1655,10 @@ void ObjectsManager::GOHOME2() { int countColisionPixel = 0; for (;;) { - int nexPosX = _vm->_linesManager->_route->_x; - int newPosY = _vm->_linesManager->_route->_y; - Directions newDirection = (Directions)_vm->_linesManager->_route->_dir; - _vm->_linesManager->_route++; + int nexPosX = _vm->_linesMan->_route->_x; + int newPosY = _vm->_linesMan->_route->_y; + Directions newDirection = (Directions)_vm->_linesMan->_route->_dir; + _vm->_linesMan->_route++; if ((nexPosX == -1) && (newPosY == -1)) break; @@ -1706,7 +1706,7 @@ void ObjectsManager::GOHOME2() { break; } - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; } /** @@ -1714,99 +1714,99 @@ void ObjectsManager::GOHOME2() { */ void ObjectsManager::loadZone(const Common::String &file) { for (int i = 1; i <= 100; i++) { - _vm->_linesManager->_zone[i]._destX = 0; - _vm->_linesManager->_zone[i]._destY = 0; - _vm->_linesManager->_zone[i]._spriteIndex = 0; - _vm->_linesManager->_zone[i]._verbFl1 = 0; - _vm->_linesManager->_zone[i]._verbFl2 = 0; - _vm->_linesManager->_zone[i]._verbFl3 = 0; - _vm->_linesManager->_zone[i]._verbFl4 = 0; - _vm->_linesManager->_zone[i]._verbFl5 = 0; - _vm->_linesManager->_zone[i]._verbFl6 = 0; - _vm->_linesManager->_zone[i]._verbFl7 = 0; - _vm->_linesManager->_zone[i]._verbFl8 = 0; - _vm->_linesManager->_zone[i]._verbFl9 = 0; - _vm->_linesManager->_zone[i]._verbFl10 = 0; - _vm->_linesManager->_zone[i]._messageId = 0; - _vm->_linesManager->_zone[i]._enabledFl = false; + _vm->_linesMan->_zone[i]._destX = 0; + _vm->_linesMan->_zone[i]._destY = 0; + _vm->_linesMan->_zone[i]._spriteIndex = 0; + _vm->_linesMan->_zone[i]._verbFl1 = 0; + _vm->_linesMan->_zone[i]._verbFl2 = 0; + _vm->_linesMan->_zone[i]._verbFl3 = 0; + _vm->_linesMan->_zone[i]._verbFl4 = 0; + _vm->_linesMan->_zone[i]._verbFl5 = 0; + _vm->_linesMan->_zone[i]._verbFl6 = 0; + _vm->_linesMan->_zone[i]._verbFl7 = 0; + _vm->_linesMan->_zone[i]._verbFl8 = 0; + _vm->_linesMan->_zone[i]._verbFl9 = 0; + _vm->_linesMan->_zone[i]._verbFl10 = 0; + _vm->_linesMan->_zone[i]._messageId = 0; + _vm->_linesMan->_zone[i]._enabledFl = false; } Common::File f; if (!f.exists(file)) error("File not found : %s", file.c_str()); - byte *ptr = _vm->_fileManager->loadFile(file); + byte *ptr = _vm->_fileIO->loadFile(file); int bufId = 0; int zoneLineIdx = 0; int bobZoneIdx; do { bobZoneIdx = READ_LE_INT16((uint16 *)ptr + bufId); if (bobZoneIdx != -1) { - _vm->_linesManager->addZoneLine( + _vm->_linesMan->addZoneLine( zoneLineIdx, READ_LE_UINT16((uint16 *)ptr + bufId + 1), READ_LE_UINT16((uint16 *)ptr + bufId + 2), READ_LE_UINT16((uint16 *)ptr + bufId + 3), READ_LE_UINT16((uint16 *)ptr + bufId + 4), bobZoneIdx); - _vm->_linesManager->_zone[bobZoneIdx]._enabledFl = true; + _vm->_linesMan->_zone[bobZoneIdx]._enabledFl = true; } bufId += 5; ++zoneLineIdx; } while (bobZoneIdx != -1); for (int i = 1; i <= 100; i++) { - _vm->_linesManager->_zone[i]._destX = READ_LE_INT16((uint16 *)ptr + bufId); - _vm->_linesManager->_zone[i]._destY = READ_LE_INT16((uint16 *)ptr + bufId + 1); - _vm->_linesManager->_zone[i]._spriteIndex = READ_LE_INT16((uint16 *)ptr + bufId + 2); + _vm->_linesMan->_zone[i]._destX = READ_LE_INT16((uint16 *)ptr + bufId); + _vm->_linesMan->_zone[i]._destY = READ_LE_INT16((uint16 *)ptr + bufId + 1); + _vm->_linesMan->_zone[i]._spriteIndex = READ_LE_INT16((uint16 *)ptr + bufId + 2); bufId += 3; } byte *verbData = (ptr + 10 * zoneLineIdx + 606); bufId = 0; for (int i = 1; i <= 100; i++) { - _vm->_linesManager->_zone[i]._verbFl1 = verbData[bufId]; - _vm->_linesManager->_zone[i]._verbFl2 = verbData[bufId + 1]; - _vm->_linesManager->_zone[i]._verbFl3 = verbData[bufId + 2]; - _vm->_linesManager->_zone[i]._verbFl4 = verbData[bufId + 3]; - _vm->_linesManager->_zone[i]._verbFl5 = verbData[bufId + 4]; - _vm->_linesManager->_zone[i]._verbFl6 = verbData[bufId + 5]; - _vm->_linesManager->_zone[i]._verbFl7 = verbData[bufId + 6]; - _vm->_linesManager->_zone[i]._verbFl8 = verbData[bufId + 7]; - _vm->_linesManager->_zone[i]._verbFl9 = verbData[bufId + 8]; - _vm->_linesManager->_zone[i]._verbFl10 = verbData[bufId + 9]; + _vm->_linesMan->_zone[i]._verbFl1 = verbData[bufId]; + _vm->_linesMan->_zone[i]._verbFl2 = verbData[bufId + 1]; + _vm->_linesMan->_zone[i]._verbFl3 = verbData[bufId + 2]; + _vm->_linesMan->_zone[i]._verbFl4 = verbData[bufId + 3]; + _vm->_linesMan->_zone[i]._verbFl5 = verbData[bufId + 4]; + _vm->_linesMan->_zone[i]._verbFl6 = verbData[bufId + 5]; + _vm->_linesMan->_zone[i]._verbFl7 = verbData[bufId + 6]; + _vm->_linesMan->_zone[i]._verbFl8 = verbData[bufId + 7]; + _vm->_linesMan->_zone[i]._verbFl9 = verbData[bufId + 8]; + _vm->_linesMan->_zone[i]._verbFl10 = verbData[bufId + 9]; bufId += 10; } verbData += 1010; for (int i = 0; i < 100; i++) - _vm->_linesManager->_zone[i + 1]._messageId = READ_LE_UINT16(verbData + 2 * i); + _vm->_linesMan->_zone[i + 1]._messageId = READ_LE_UINT16(verbData + 2 * i); _vm->_globals->freeMemory(ptr); - _vm->_linesManager->initSquareZones(); + _vm->_linesMan->initSquareZones(); } void ObjectsManager::handleCityMap() { - _vm->_dialogsManager->_inventFl = false; - _vm->_eventsManager->_gameKey = KEY_NONE; - _vm->_linesManager->setMaxLineIdx(1); + _vm->_dialog->_inventFl = false; + _vm->_events->_gameKey = KEY_NONE; + _vm->_linesMan->setMaxLineIdx(1); _vm->_globals->_characterMaxPosY = 440; _vm->_globals->_cityMapEnabledFl = true; - _vm->_graphicsManager->_noFadingFl = false; + _vm->_graphicsMan->_noFadingFl = false; _vm->_globals->_freezeCharacterFl = false; _spritePtr = NULL; _vm->_globals->_exitId = 0; _vm->_globals->_checkDistanceFl = true; - _vm->_soundManager->playSound(31); + _vm->_soundMan->playSound(31); _vm->_globals->_eventMode = EVENTMODE_IGNORE; - _vm->_graphicsManager->loadImage("PLAN"); - _vm->_linesManager->loadLines("PLAN.OB2"); + _vm->_graphicsMan->loadImage("PLAN"); + _vm->_linesMan->loadLines("PLAN.OB2"); loadHidingItems("PLAN.CA2"); loadZone("PLAN.ZO2"); - _spritePtr = _vm->_fileManager->loadFile("VOITURE.SPR"); - _vm->_animationManager->loadAnim("PLAN"); - _vm->_graphicsManager->displayAllBob(); - _vm->_graphicsManager->initScreen("PLAN", 2, false); + _spritePtr = _vm->_fileIO->loadFile("VOITURE.SPR"); + _vm->_animMan->loadAnim("PLAN"); + _vm->_graphicsMan->displayAllBob(); + _vm->_graphicsMan->initScreen("PLAN", 2, false); for (int i = 0; i <= 15; i++) disableHidingItem(i); disableHidingItem(19); @@ -1818,34 +1818,34 @@ void ObjectsManager::handleCityMap() { _mapCarPosY = 319; } addStaticSprite(_spritePtr, Common::Point(_mapCarPosX, _mapCarPosY), 0, 1, 0, false, 5, 5); - _vm->_eventsManager->setMouseXY(_mapCarPosX, _mapCarPosY); - _vm->_eventsManager->mouseOn(); - _vm->_graphicsManager->scrollScreen(getSpriteX(0) - 320); - _vm->_graphicsManager->_scrollOffset = getSpriteX(0) - 320; + _vm->_events->setMouseXY(_mapCarPosX, _mapCarPosY); + _vm->_events->mouseOn(); + _vm->_graphicsMan->scrollScreen(getSpriteX(0) - 320); + _vm->_graphicsMan->_scrollOffset = getSpriteX(0) - 320; animateSprite(0); - _vm->_linesManager->_route = NULL; - _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0); + _vm->_linesMan->_route = NULL; + _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0); for (int i = 0; i <= 4; i++) - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); _vm->_globals->_eventMode = EVENTMODE_IGNORE; - _vm->_graphicsManager->fadeInLong(); - _vm->_eventsManager->changeMouseCursor(4); - _vm->_graphicsManager->_noFadingFl = false; + _vm->_graphicsMan->fadeInLong(); + _vm->_events->changeMouseCursor(4); + _vm->_graphicsMan->_noFadingFl = false; bool loopCond = false; do { - int mouseButton = _vm->_eventsManager->getMouseButton(); + int mouseButton = _vm->_events->getMouseButton(); if (mouseButton) { // First cop call : Go to the bank and free the hostages if (_vm->_globals->_saveData->_data[svBankAttackAnimPlayedFl] == 1 && !_vm->_globals->_saveData->_data[svCopCall1PlayedFl]) { _vm->_globals->_saveData->_data[svCopCall1PlayedFl] = 1; _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("APPEL1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("APPEL1.pe2"); _vm->_globals->_introSpeechOffFl = false; mouseButton = 0; } @@ -1853,30 +1853,30 @@ void ObjectsManager::handleCityMap() { if (_vm->_globals->_saveData->_data[svFreedHostageFl] == 1 && !_vm->_globals->_saveData->_data[svCopCall2PlayedFl]) { _vm->_globals->_saveData->_data[svCopCall2PlayedFl] = 1; _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("APPEL2.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("APPEL2.pe2"); _vm->_globals->_introSpeechOffFl = false; mouseButton = 0; - _vm->_eventsManager->_curMouseButton = 0; + _vm->_events->_curMouseButton = 0; } if (mouseButton == 1) handleLeftButton(); } - _vm->_linesManager->checkZone(); + _vm->_linesMan->checkZone(); GOHOME2(); - if (_vm->_linesManager->_route == NULL && _vm->_globals->_actionMoveTo) + if (_vm->_linesMan->_route == NULL && _vm->_globals->_actionMoveTo) PARADISE(); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); if (_vm->_globals->_exitId) loopCond = true; } while (!_vm->shouldQuit() && !loopCond); - if (!_vm->_graphicsManager->_noFadingFl) - _vm->_graphicsManager->fadeOutLong(); + if (!_vm->_graphicsMan->_noFadingFl) + _vm->_graphicsMan->fadeOutLong(); _vm->_globals->_eventMode = EVENTMODE_DEFAULT; - _vm->_graphicsManager->_noFadingFl = false; + _vm->_graphicsMan->_noFadingFl = false; _mapCarPosX = getSpriteX(0); _mapCarPosY = getSpriteY(0); removeSprite(0); @@ -1889,21 +1889,21 @@ void ObjectsManager::handleCityMap() { * Handle Left button */ void ObjectsManager::handleLeftButton() { - _vm->_fontManager->hideText(9); - int destX = _vm->_eventsManager->getMouseX(); - int destY = _vm->_eventsManager->getMouseY(); + _vm->_fontMan->hideText(9); + int destX = _vm->_events->getMouseX(); + int destY = _vm->_events->getMouseY(); - if (!_vm->_dialogsManager->_inventFl && !_vm->_globals->_cityMapEnabledFl && - destX > _vm->_graphicsManager->_scrollOffset - 30 && destX < _vm->_graphicsManager->_scrollOffset + 50 && + if (!_vm->_dialog->_inventFl && !_vm->_globals->_cityMapEnabledFl && + destX > _vm->_graphicsMan->_scrollOffset - 30 && destX < _vm->_graphicsMan->_scrollOffset + 50 && destY > -30 && destY < 50) { - int oldMouseCursor = _vm->_eventsManager->_mouseCursorId; - _vm->_dialogsManager->_inventFl = true; - _vm->_dialogsManager->showInventory(); - _vm->_dialogsManager->_inventFl = false; - _vm->_eventsManager->_gameKey = KEY_NONE; + int oldMouseCursor = _vm->_events->_mouseCursorId; + _vm->_dialog->_inventFl = true; + _vm->_dialog->showInventory(); + _vm->_dialog->_inventFl = false; + _vm->_events->_gameKey = KEY_NONE; if (!_vm->_globals->_exitId) { - _vm->_dialogsManager->_inventFl = false; - _vm->_eventsManager->_mouseCursorId = oldMouseCursor; + _vm->_dialog->_inventFl = false; + _vm->_events->_mouseCursorId = oldMouseCursor; } return; } @@ -1930,82 +1930,82 @@ void ObjectsManager::handleLeftButton() { } } if (_vm->_globals->_cityMapEnabledFl && _vm->_globals->_actionMoveTo) { - _vm->_linesManager->checkZone(); + _vm->_linesMan->checkZone(); if (_zoneNum <= 0) return; int routeIdx = 0; do { - _vm->_linesManager->_testRoute2[routeIdx] = _vm->_linesManager->_route[routeIdx]; + _vm->_linesMan->_testRoute2[routeIdx] = _vm->_linesMan->_route[routeIdx]; ++routeIdx; - } while (_vm->_linesManager->_route[routeIdx]._x != -1); + } while (_vm->_linesMan->_route[routeIdx]._x != -1); - _vm->_linesManager->_testRoute2[routeIdx].invalidate(); + _vm->_linesMan->_testRoute2[routeIdx].invalidate(); } if (_vm->_globals->_actionMoveTo) { - _vm->_linesManager->checkZone(); + _vm->_linesMan->checkZone(); _vm->_globals->_actionMoveTo = false; _vm->_globals->_saveData->_data[svLastMouseCursor] = 0; _vm->_globals->_saveData->_data[svLastZoneNum] = 0; } - if (_vm->_globals->_cityMapEnabledFl && (_vm->_eventsManager->_mouseCursorId != 4 || _zoneNum <= 0)) + if (_vm->_globals->_cityMapEnabledFl && (_vm->_events->_mouseCursorId != 4 || _zoneNum <= 0)) return; if (_zoneNum != -1 && _zoneNum != 0) { - if (_vm->_linesManager->_zone[_zoneNum]._destX && _vm->_linesManager->_zone[_zoneNum]._destY && _vm->_linesManager->_zone[_zoneNum]._destY != 31) { - destX = _vm->_linesManager->_zone[_zoneNum]._destX; - destY = _vm->_linesManager->_zone[_zoneNum]._destY; + if (_vm->_linesMan->_zone[_zoneNum]._destX && _vm->_linesMan->_zone[_zoneNum]._destY && _vm->_linesMan->_zone[_zoneNum]._destY != 31) { + destX = _vm->_linesMan->_zone[_zoneNum]._destX; + destY = _vm->_linesMan->_zone[_zoneNum]._destY; } } _vm->_globals->_actionMoveTo = false; - RouteItem *oldRoute = _vm->_linesManager->_route; - _vm->_linesManager->_route = NULL; + RouteItem *oldRoute = _vm->_linesMan->_route; + _vm->_linesMan->_route = NULL; if (_forestFl && _zoneNum >= 20 && _zoneNum <= 23) { if (getSpriteY(0) > 374 && getSpriteY(0) <= 410) { - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; setSpriteIndex(0, _oldDirectionSpriteIdx); _vm->_globals->_actionDirection = DIR_NONE; - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; computeAndSetSpriteSize(); setFlipSprite(0, false); _homeRateCounter = 0; _oldDirection = DIR_NONE; } else { - _vm->_linesManager->_route = _vm->_linesManager->findRoute(getSpriteX(0), getSpriteY(0), getSpriteX(0), 390); - if (_vm->_linesManager->_route) - _vm->_linesManager->optimizeRoute(_vm->_linesManager->_route); + _vm->_linesMan->_route = _vm->_linesMan->findRoute(getSpriteX(0), getSpriteY(0), getSpriteX(0), 390); + if (_vm->_linesMan->_route) + _vm->_linesMan->optimizeRoute(_vm->_linesMan->_route); _oldCharacterPosX = getSpriteX(0); _oldCharacterPosY = getSpriteY(0); _homeRateCounter = 0; - if (_vm->_linesManager->_route || oldRoute == _vm->_linesManager->_route) { + if (_vm->_linesMan->_route || oldRoute == _vm->_linesMan->_route) { _oldDirection = DIR_NONE; } else { - _vm->_linesManager->_route = oldRoute; + _vm->_linesMan->_route = oldRoute; } } } else { if (!_vm->_globals->_freezeCharacterFl && !_vm->_globals->_cityMapEnabledFl) { - _vm->_linesManager->_route = _vm->_linesManager->findRoute(getSpriteX(0), getSpriteY(0), destX, destY); - if (_vm->_linesManager->_route) - _vm->_linesManager->optimizeRoute(_vm->_linesManager->_route); + _vm->_linesMan->_route = _vm->_linesMan->findRoute(getSpriteX(0), getSpriteY(0), destX, destY); + if (_vm->_linesMan->_route) + _vm->_linesMan->optimizeRoute(_vm->_linesMan->_route); _oldCharacterPosX = getSpriteX(0); _oldCharacterPosY = getSpriteY(0); _homeRateCounter = 0; - if (_vm->_linesManager->_route || oldRoute == _vm->_linesManager->_route) + if (_vm->_linesMan->_route || oldRoute == _vm->_linesMan->_route) _oldDirection = DIR_NONE; else - _vm->_linesManager->_route = oldRoute; + _vm->_linesMan->_route = oldRoute; } } if (!_vm->_globals->_freezeCharacterFl && _vm->_globals->_cityMapEnabledFl) - _vm->_linesManager->_route = _vm->_linesManager->cityMapCarRoute(getSpriteX(0), getSpriteY(0), destX, destY); + _vm->_linesMan->_route = _vm->_linesMan->cityMapCarRoute(getSpriteX(0), getSpriteY(0), destX, destY); if (_zoneNum != -1 && _zoneNum != 0) { - if (_vm->_eventsManager->_mouseCursorId == 23) + if (_vm->_events->_mouseCursorId == 23) _vm->_globals->_saveData->_data[svLastMouseCursor] = 5; else - _vm->_globals->_saveData->_data[svLastMouseCursor] = _vm->_eventsManager->_mouseCursorId; + _vm->_globals->_saveData->_data[svLastMouseCursor] = _vm->_events->_mouseCursorId; if (_vm->_globals->_cityMapEnabledFl) _vm->_globals->_saveData->_data[svLastMouseCursor] = 6; @@ -2013,13 +2013,13 @@ void ObjectsManager::handleLeftButton() { _vm->_globals->_saveData->_data[svLastObjectIndex] = _curObjectIndex; _vm->_globals->_actionMoveTo = true; } - _vm->_fontManager->hideText(5); - _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100); + _vm->_fontMan->hideText(5); + _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100); if (_vm->_globals->_screenId == 20 && _vm->_globals->_saveData->_data[svField132] == 1 && _curObjectIndex == 20 && _zoneNum == 12 - && _vm->_eventsManager->_mouseCursorId == 23) { + && _vm->_events->_mouseCursorId == 23) { // Special case for throwing darts at the switch in Purgatory - the player shouldn't move - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; getSpriteX(0); getSpriteY(0); } @@ -2028,84 +2028,84 @@ void ObjectsManager::handleLeftButton() { void ObjectsManager::PARADISE() { char result = _vm->_globals->_saveData->_data[svLastMouseCursor]; if (result && _vm->_globals->_saveData->_data[svLastZoneNum] && result != 4 && result > 3) { - _vm->_fontManager->hideText(5); + _vm->_fontMan->hideText(5); if (!_forestFl || _zoneNum < 20 || _zoneNum > 23) { - if (_vm->_graphicsManager->_largeScreenFl) { - _vm->_graphicsManager->_scrollStatus = 2; - if (_vm->_eventsManager->_startPos.x + 320 - getSpriteX(0) > 160) { + if (_vm->_graphicsMan->_largeScreenFl) { + _vm->_graphicsMan->_scrollStatus = 2; + if (_vm->_events->_startPos.x + 320 - getSpriteX(0) > 160) { bool loopCond = false; do { - _vm->_graphicsManager->_scrollPosX -= _vm->_graphicsManager->_scrollSpeed; - if (_vm->_graphicsManager->_scrollPosX < 0) { - _vm->_graphicsManager->_scrollPosX = 0; + _vm->_graphicsMan->_scrollPosX -= _vm->_graphicsMan->_scrollSpeed; + if (_vm->_graphicsMan->_scrollPosX < 0) { + _vm->_graphicsMan->_scrollPosX = 0; loopCond = true; } - if (_vm->_graphicsManager->_scrollPosX > SCREEN_WIDTH) { - _vm->_graphicsManager->_scrollPosX = SCREEN_WIDTH; + if (_vm->_graphicsMan->_scrollPosX > SCREEN_WIDTH) { + _vm->_graphicsMan->_scrollPosX = SCREEN_WIDTH; loopCond = true; } - if (_vm->_eventsManager->getMouseX() > _vm->_graphicsManager->_scrollPosX + 620) - _vm->_eventsManager->setMouseXY(_vm->_eventsManager->_mousePos.x - 4, _vm->_eventsManager->getMouseY()); + if (_vm->_events->getMouseX() > _vm->_graphicsMan->_scrollPosX + 620) + _vm->_events->setMouseXY(_vm->_events->_mousePos.x - 4, _vm->_events->getMouseY()); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (!loopCond && _vm->_eventsManager->_startPos.x > getSpriteX(0) - 320); - } else if (_vm->_eventsManager->_startPos.x + 320 - getSpriteX(0) < -160) { + _vm->_events->refreshScreenAndEvents(); + } while (!loopCond && _vm->_events->_startPos.x > getSpriteX(0) - 320); + } else if (_vm->_events->_startPos.x + 320 - getSpriteX(0) < -160) { bool loopCond = false; do { - _vm->_graphicsManager->_scrollPosX += _vm->_graphicsManager->_scrollSpeed; - if (_vm->_graphicsManager->_scrollPosX < 0) { - _vm->_graphicsManager->_scrollPosX = 0; + _vm->_graphicsMan->_scrollPosX += _vm->_graphicsMan->_scrollSpeed; + if (_vm->_graphicsMan->_scrollPosX < 0) { + _vm->_graphicsMan->_scrollPosX = 0; loopCond = true; } - if (_vm->_graphicsManager->_scrollPosX > SCREEN_WIDTH) { - _vm->_graphicsManager->_scrollPosX = SCREEN_WIDTH; + if (_vm->_graphicsMan->_scrollPosX > SCREEN_WIDTH) { + _vm->_graphicsMan->_scrollPosX = SCREEN_WIDTH; loopCond = true; } - if (_vm->_eventsManager->getMouseX() < _vm->_graphicsManager->_scrollPosX + 10) - _vm->_eventsManager->setMouseXY(_vm->_eventsManager->_mousePos.x + 4, _vm->_eventsManager->getMouseY()); + if (_vm->_events->getMouseX() < _vm->_graphicsMan->_scrollPosX + 10) + _vm->_events->setMouseXY(_vm->_events->_mousePos.x + 4, _vm->_events->getMouseY()); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (!loopCond && _vm->_eventsManager->_startPos.x < getSpriteX(0) - 320); + _vm->_events->refreshScreenAndEvents(); + } while (!loopCond && _vm->_events->_startPos.x < getSpriteX(0) - 320); } - if (_vm->_eventsManager->getMouseX() > _vm->_graphicsManager->_scrollPosX + 620) - _vm->_eventsManager->setMouseXY(_vm->_graphicsManager->_scrollPosX + 610, 0); - if (_vm->_eventsManager->getMouseX() < _vm->_graphicsManager->_scrollPosX + 10) - _vm->_eventsManager->setMouseXY(_vm->_graphicsManager->_scrollPosX + 10, 0); - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager->_scrollStatus = 0; + if (_vm->_events->getMouseX() > _vm->_graphicsMan->_scrollPosX + 620) + _vm->_events->setMouseXY(_vm->_graphicsMan->_scrollPosX + 610, 0); + if (_vm->_events->getMouseX() < _vm->_graphicsMan->_scrollPosX + 10) + _vm->_events->setMouseXY(_vm->_graphicsMan->_scrollPosX + 10, 0); + _vm->_events->refreshScreenAndEvents(); + _vm->_graphicsMan->_scrollStatus = 0; } - _vm->_talkManager->handleAnswer(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]); + _vm->_talkMan->handleAnswer(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]); } else { - _vm->_talkManager->handleForestAnswser(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]); + _vm->_talkMan->handleForestAnswser(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]); } - _vm->_eventsManager->changeMouseCursor(4); - if (_zoneNum != -1 && _zoneNum != 0 && !_vm->_linesManager->_zone[_zoneNum]._enabledFl) { + _vm->_events->changeMouseCursor(4); + if (_zoneNum != -1 && _zoneNum != 0 && !_vm->_linesMan->_zone[_zoneNum]._enabledFl) { _zoneNum = -1; _forceZoneFl = true; } if (_zoneNum != _vm->_globals->_saveData->_data[svLastZoneNum] || _zoneNum == -1 || _zoneNum == 0) { - _vm->_eventsManager->_mouseCursorId = 4; + _vm->_events->_mouseCursorId = 4; _changeVerbFl = false; } else { - _vm->_eventsManager->_mouseCursorId = _vm->_globals->_saveData->_data[svLastMouseCursor]; + _vm->_events->_mouseCursorId = _vm->_globals->_saveData->_data[svLastMouseCursor]; if (_changeVerbFl) { nextVerbIcon(); _changeVerbFl = false; } - if (_vm->_eventsManager->_mouseCursorId == 5) - _vm->_eventsManager->_mouseCursorId = 4; + if (_vm->_events->_mouseCursorId == 5) + _vm->_events->_mouseCursorId = 4; } - if (_vm->_eventsManager->_mouseCursorId != 23) - _vm->_eventsManager->changeMouseCursor(_vm->_eventsManager->_mouseCursorId); + if (_vm->_events->_mouseCursorId != 23) + _vm->_events->changeMouseCursor(_vm->_events->_mouseCursorId); _zoneNum = 0; _vm->_globals->_saveData->_data[svLastMouseCursor] = 0; _vm->_globals->_saveData->_data[svLastZoneNum] = 0; } if (_vm->_globals->_cityMapEnabledFl) { - _vm->_eventsManager->_mouseCursorId = 0; - _vm->_eventsManager->changeMouseCursor(0); + _vm->_events->_mouseCursorId = 0; + _vm->_events->changeMouseCursor(0); } - if (_vm->_globals->_freezeCharacterFl && _vm->_eventsManager->_mouseCursorId == 4) { + if (_vm->_globals->_freezeCharacterFl && _vm->_events->_mouseCursorId == 4) { if (_zoneNum != -1 && _zoneNum != 0) handleRightButton(); } @@ -2117,38 +2117,38 @@ void ObjectsManager::PARADISE() { */ void ObjectsManager::clearScreen() { clearSprite(); - _vm->_graphicsManager->endDisplayBob(); - _vm->_fontManager->hideText(5); - _vm->_fontManager->hideText(9); + _vm->_graphicsMan->endDisplayBob(); + _vm->_fontMan->hideText(5); + _vm->_fontMan->hideText(9); clearVBob(); - _vm->_animationManager->clearAnim(); - _vm->_linesManager->clearAllZones(); - _vm->_linesManager->resetLines(); + _vm->_animMan->clearAnim(); + _vm->_linesMan->clearAllZones(); + _vm->_linesMan->resetLines(); resetHidingItems(); for (int i = 0; i <= 48; i++) { - _vm->_linesManager->_bobZone[i] = 0; - _vm->_linesManager->_bobZoneFl[i] = false; + _vm->_linesMan->_bobZone[i] = 0; + _vm->_linesMan->_bobZoneFl[i] = false; } - _vm->_eventsManager->_mouseCursorId = 4; + _vm->_events->_mouseCursorId = 4; _verb = 4; _zoneNum = 0; _forceZoneFl = true; - _vm->_linesManager->resetLinesNumb(); - _vm->_linesManager->resetLastLine(); - _vm->_linesManager->_route = NULL; + _vm->_linesMan->resetLinesNumb(); + _vm->_linesMan->resetLastLine(); + _vm->_linesMan->_route = NULL; _vm->_globals->_answerBuffer = _vm->_globals->freeMemory(_vm->_globals->_answerBuffer); _vm->_globals->_levelSpriteBuf = _vm->_globals->freeMemory(_vm->_globals->_levelSpriteBuf); - _vm->_eventsManager->_startPos.x = 0; - _vm->_eventsManager->_mouseSpriteId = 0; + _vm->_events->_startPos.x = 0; + _vm->_events->_mouseSpriteId = 0; _vm->_globals->_saveData->_data[svLastMouseCursor] = 0; _vm->_globals->_saveData->_data[svLastZoneNum] = 0; _vm->_globals->_actionMoveTo = false; _forceZoneFl = true; _changeVerbFl = false; - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; _oldDirection = DIR_NONE; - _vm->_graphicsManager->resetDirtyRects(); + _vm->_graphicsMan->resetDirtyRects(); } /** @@ -2160,10 +2160,10 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha CharacterLocation *loc; _changeHeadFl = true; - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, 532, 25, 65, 40, _vm->_graphicsManager->_frontBuffer, 532, 25); - _vm->_graphicsManager->addDirtyRect(532, 25, 597, 65); + _vm->_graphicsMan->copySurface(_vm->_graphicsMan->_backBuffer, 532, 25, 65, 40, _vm->_graphicsMan->_frontBuffer, 532, 25); + _vm->_graphicsMan->addDirtyRect(532, 25, 597, 65); _vm->_globals->_checkDistanceFl = true; - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; if (oldCharacter == CHARACTER_SAMANTHA && newCharacter == CHARACTER_HOPKINS && _vm->_globals->_saveData->_realHopkins._location == _vm->_globals->_screenId) { @@ -2185,7 +2185,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha _vm->_globals->_saveData->_data[svField357] = 1; loc = &_vm->_globals->_saveData->_realHopkins; - _vm->_globals->_characterSpriteBuf = _vm->_fileManager->loadFile("PERSO.SPR"); + _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PERSO.SPR"); _vm->_globals->_characterType = 0; addStaticSprite(_vm->_globals->_characterSpriteBuf, loc->_pos, 0, 64, loc->_zoomFactor, false, 34, 190); animateSprite(0); @@ -2210,7 +2210,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha _vm->_globals->_saveData->_data[svField357] = 0; loc = &_vm->_globals->_saveData->_samantha; - _vm->_globals->_characterSpriteBuf = _vm->_fileManager->loadFile("PSAMAN.SPR"); + _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PSAMAN.SPR"); _vm->_globals->_characterType = 2; addStaticSprite(_vm->_globals->_characterSpriteBuf, loc->_pos, 0, 64, loc->_zoomFactor, false, 20, 127); animateSprite(0); @@ -2286,154 +2286,154 @@ void ObjectsManager::computeAndSetSpriteSize() { * Get next verb icon (or text) */ void ObjectsManager::nextVerbIcon() { - _vm->_eventsManager->_mouseCursorId++; + _vm->_events->_mouseCursorId++; for(;;) { - if (_vm->_eventsManager->_mouseCursorId == 4) { + if (_vm->_events->_mouseCursorId == 4) { if (!_vm->_globals->_freezeCharacterFl || _zoneNum == -1 || _zoneNum == 0) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 5 || _vm->_eventsManager->_mouseCursorId == 6) { - _vm->_eventsManager->_mouseCursorId = 6; - if (_vm->_linesManager->_zone[_zoneNum]._verbFl1 == 1) + if (_vm->_events->_mouseCursorId == 5 || _vm->_events->_mouseCursorId == 6) { + _vm->_events->_mouseCursorId = 6; + if (_vm->_linesMan->_zone[_zoneNum]._verbFl1 == 1) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 7) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl2 == 1) + if (_vm->_events->_mouseCursorId == 7) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl2 == 1) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 8) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl3 == 1) + if (_vm->_events->_mouseCursorId == 8) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl3 == 1) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 9) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl4 == 1) + if (_vm->_events->_mouseCursorId == 9) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl4 == 1) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 10) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl5 == 1) + if (_vm->_events->_mouseCursorId == 10) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl5 == 1) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 11) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl6 == 1) + if (_vm->_events->_mouseCursorId == 11) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl6 == 1) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 12) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl7 == 1) + if (_vm->_events->_mouseCursorId == 12) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl7 == 1) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 13) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl8 == 1) + if (_vm->_events->_mouseCursorId == 13) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl8 == 1) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 14) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl9 == 1) + if (_vm->_events->_mouseCursorId == 14) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl9 == 1) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 15) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl10 == 1) + if (_vm->_events->_mouseCursorId == 15) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl10 == 1) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 16) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl1 == 2) + if (_vm->_events->_mouseCursorId == 16) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl1 == 2) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 17) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl4 == 2) + if (_vm->_events->_mouseCursorId == 17) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl4 == 2) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 18) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl5 == 2) + if (_vm->_events->_mouseCursorId == 18) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl5 == 2) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 19) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl6 == 2) + if (_vm->_events->_mouseCursorId == 19) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl6 == 2) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 20) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl7 == 2) + if (_vm->_events->_mouseCursorId == 20) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl7 == 2) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 21) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl10 == 2) + if (_vm->_events->_mouseCursorId == 21) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl10 == 2) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 22) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl8 == 2) + if (_vm->_events->_mouseCursorId == 22) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl8 == 2) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 23) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl3 == 2) + if (_vm->_events->_mouseCursorId == 23) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl3 == 2) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 24) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl4 == 3) + if (_vm->_events->_mouseCursorId == 24) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl4 == 3) return; - ++_vm->_eventsManager->_mouseCursorId; + ++_vm->_events->_mouseCursorId; } - if (_vm->_eventsManager->_mouseCursorId == 25) { - if (_vm->_linesManager->_zone[_zoneNum]._verbFl9 == 2) + if (_vm->_events->_mouseCursorId == 25) { + if (_vm->_linesMan->_zone[_zoneNum]._verbFl9 == 2) return; } - _vm->_eventsManager->_mouseCursorId = 4; + _vm->_events->_mouseCursorId = 4; } } @@ -2443,9 +2443,9 @@ void ObjectsManager::nextVerbIcon() { void ObjectsManager::handleRightButton() { if (_zoneNum != -1 && _zoneNum != 0) { nextVerbIcon(); - if (_vm->_eventsManager->_mouseCursorId != 23) - _vm->_eventsManager->changeMouseCursor(_vm->_eventsManager->_mouseCursorId); - _verb = _vm->_eventsManager->_mouseCursorId; + if (_vm->_events->_mouseCursorId != 23) + _vm->_events->changeMouseCursor(_vm->_events->_mouseCursorId); + _verb = _vm->_events->_mouseCursorId; } } @@ -2472,17 +2472,17 @@ void ObjectsManager::initBorder(int zoneIdx) { _borderPos.y = 290; if (zoneIdx == 1 || zoneIdx == 7 || zoneIdx == 13 || zoneIdx == 19 || zoneIdx == 25) - _borderPos.x = _vm->_graphicsManager->_scrollOffset + 158; + _borderPos.x = _vm->_graphicsMan->_scrollOffset + 158; else if (zoneIdx == 2 || zoneIdx == 8 || zoneIdx == 14 || zoneIdx == 20 || zoneIdx == 26) - _borderPos.x = _vm->_graphicsManager->_scrollOffset + 212; + _borderPos.x = _vm->_graphicsMan->_scrollOffset + 212; else if (zoneIdx == 3 || zoneIdx == 9 || zoneIdx == 15 || zoneIdx == 21 || zoneIdx == 27) - _borderPos.x = _vm->_graphicsManager->_scrollOffset + 266; + _borderPos.x = _vm->_graphicsMan->_scrollOffset + 266; else if (zoneIdx == 4 || zoneIdx == 10 || zoneIdx == 16 || zoneIdx == 22 || zoneIdx == 28) - _borderPos.x = _vm->_graphicsManager->_scrollOffset + 320; + _borderPos.x = _vm->_graphicsMan->_scrollOffset + 320; else if (zoneIdx == 5 || zoneIdx == 11 || zoneIdx == 17 || zoneIdx == 23 || zoneIdx == 29) - _borderPos.x = _vm->_graphicsManager->_scrollOffset + 374; + _borderPos.x = _vm->_graphicsMan->_scrollOffset + 374; else if (zoneIdx == 6 || zoneIdx == 12 || zoneIdx == 18 || zoneIdx == 24 || zoneIdx == 30 || zoneIdx == 31) - _borderPos.x = _vm->_graphicsManager->_scrollOffset + 428; + _borderPos.x = _vm->_graphicsMan->_scrollOffset + 428; if (zoneIdx >= 1 && zoneIdx <= 29) _borderSpriteIndex = 0; @@ -2494,96 +2494,96 @@ void ObjectsManager::initBorder(int zoneIdx) { } if (!zoneIdx) - _vm->_eventsManager->_mouseCursorId = 0; + _vm->_events->_mouseCursorId = 0; else if (zoneIdx >= 1 && zoneIdx <= 28) - _vm->_eventsManager->_mouseCursorId = 8; + _vm->_events->_mouseCursorId = 8; else if (zoneIdx == 29) - _vm->_eventsManager->_mouseCursorId = 1; + _vm->_events->_mouseCursorId = 1; else if (zoneIdx == 30) - _vm->_eventsManager->_mouseCursorId = 2; + _vm->_events->_mouseCursorId = 2; else if (zoneIdx == 31) - _vm->_eventsManager->_mouseCursorId = 3; + _vm->_events->_mouseCursorId = 3; else if (zoneIdx == 32) - _vm->_eventsManager->_mouseCursorId = 16; + _vm->_events->_mouseCursorId = 16; if (zoneIdx >= 1 && zoneIdx <= 28 && !_vm->_globals->_inventory[zoneIdx]) { - _vm->_eventsManager->_mouseCursorId = 0; + _vm->_events->_mouseCursorId = 0; _borderPos = Common::Point(0, 0); _borderSpriteIndex = 0; } - if (_vm->_eventsManager->_mouseCursorId != 23) - _vm->_eventsManager->changeMouseCursor(_vm->_eventsManager->_mouseCursorId); - _vm->_eventsManager->getMouseX(); - _vm->_eventsManager->getMouseY(); + if (_vm->_events->_mouseCursorId != 23) + _vm->_events->changeMouseCursor(_vm->_events->_mouseCursorId); + _vm->_events->getMouseX(); + _vm->_events->getMouseY(); } /** * Get next icon for an object in the inventory */ void ObjectsManager::nextObjectIcon(int idx) { - if (_vm->_eventsManager->_mouseCursorId == 0 || _vm->_eventsManager->_mouseCursorId == 2 || - _vm->_eventsManager->_mouseCursorId == 3 || _vm->_eventsManager->_mouseCursorId == 16) + if (_vm->_events->_mouseCursorId == 0 || _vm->_events->_mouseCursorId == 2 || + _vm->_events->_mouseCursorId == 3 || _vm->_events->_mouseCursorId == 16) return; - int nextCursorId = _vm->_eventsManager->_mouseCursorId + 1; + int nextCursorId = _vm->_events->_mouseCursorId + 1; if (nextCursorId > 25) nextCursorId = 6; do { if (nextCursorId == 2 || nextCursorId == 5 || nextCursorId == 6) { - _vm->_eventsManager->_mouseCursorId = 6; + _vm->_events->_mouseCursorId = 6; if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag1 == 1) return; nextCursorId++; } if (nextCursorId == 7) { - _vm->_eventsManager->_mouseCursorId = 7; + _vm->_events->_mouseCursorId = 7; if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag2 == 1) return; nextCursorId++; } if (nextCursorId == 8) { - _vm->_eventsManager->_mouseCursorId = 8; + _vm->_events->_mouseCursorId = 8; return; } if (nextCursorId == 9 || nextCursorId == 10) { - _vm->_eventsManager->_mouseCursorId = 10; + _vm->_events->_mouseCursorId = 10; if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag6 == 1) return; nextCursorId = 11; } if (nextCursorId == 11) { - _vm->_eventsManager->_mouseCursorId = 11; + _vm->_events->_mouseCursorId = 11; if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag3 == 1) return; nextCursorId++; } if (nextCursorId == 12 || nextCursorId == 13) { - _vm->_eventsManager->_mouseCursorId = 13; + _vm->_events->_mouseCursorId = 13; if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag4 == 1) return; nextCursorId = 14; } if (nextCursorId == 14 || nextCursorId == 15) { - _vm->_eventsManager->_mouseCursorId = 15; + _vm->_events->_mouseCursorId = 15; if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag5 == 1) return; nextCursorId = 23; } if (nextCursorId >= 16 && nextCursorId <= 23) { - _vm->_eventsManager->_mouseCursorId = 23; + _vm->_events->_mouseCursorId = 23; if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag5 == 2) return; nextCursorId = 24; } if (nextCursorId == 24 || nextCursorId == 25) { - _vm->_eventsManager->_mouseCursorId = 25; + _vm->_events->_mouseCursorId = 25; } nextCursorId = 6; @@ -2591,7 +2591,7 @@ void ObjectsManager::nextObjectIcon(int idx) { } void ObjectsManager::takeInventoryObject(int idx) { - if (_vm->_eventsManager->_mouseCursorId == 8) + if (_vm->_events->_mouseCursorId == 8) changeObject(idx); } @@ -2602,9 +2602,9 @@ void ObjectsManager::loadObjectIniFile() { file = "OBJET1.ini"; bool fileFoundFl = false; - data = _vm->_fileManager->searchCat(file, RES_INI, fileFoundFl); + data = _vm->_fileIO->searchCat(file, RES_INI, fileFoundFl); if (!fileFoundFl) { - data = _vm->_fileManager->loadFile(file); + data = _vm->_fileIO->loadFile(file); if (data == NULL) error("INI file %s not found", file.c_str()); } @@ -2613,14 +2613,14 @@ void ObjectsManager::loadObjectIniFile() { error("File %s is not an INI file", file.c_str()); for (;;) { - int opcodeType = _vm->_scriptManager->handleOpcode(data + 20 * lastOpcodeResult); + int opcodeType = _vm->_script->handleOpcode(data + 20 * lastOpcodeResult); if (_vm->shouldQuit()) return; if (opcodeType == 2) - lastOpcodeResult = _vm->_scriptManager->handleGoto(data + 20 * lastOpcodeResult); + lastOpcodeResult = _vm->_script->handleGoto(data + 20 * lastOpcodeResult); else if (opcodeType == 3) - lastOpcodeResult = _vm->_scriptManager->handleIf(data, lastOpcodeResult); + lastOpcodeResult = _vm->_script->handleIf(data, lastOpcodeResult); if (lastOpcodeResult == -1) error("defective IFF function"); @@ -2644,40 +2644,40 @@ void ObjectsManager::handleSpecialGames() { _vm->_globals->_saveData->_data[svField173] = 1; _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("flicspe1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("flicspe1.pe2"); _vm->_globals->_introSpeechOffFl = false; if (_vm->_globals->_censorshipFl) break; oldPalette = _vm->_globals->allocMemory(1000); - memcpy(oldPalette, _vm->_graphicsManager->_palette, 769); + memcpy(oldPalette, _vm->_graphicsMan->_palette, 769); - _vm->_graphicsManager->backupScreen(); + _vm->_graphicsMan->backupScreen(); - if (!_vm->_graphicsManager->_lineNbr) - _vm->_graphicsManager->_scrollOffset = 0; - _vm->_graphicsManager->displayScreen(true); - _vm->_soundManager->_specialSoundNum = 198; + if (!_vm->_graphicsMan->_lineNbr) + _vm->_graphicsMan->_scrollOffset = 0; + _vm->_graphicsMan->displayScreen(true); + _vm->_soundMan->_specialSoundNum = 198; _charactersEnabledFl = true; - _vm->_animationManager->unsetClearAnimFlag(); - _vm->_animationManager->playAnim("otage.ANM", 1, 24, 500, true); - _vm->_soundManager->_specialSoundNum = 0; - _vm->_graphicsManager->displayScreen(false); + _vm->_animMan->unsetClearAnimFlag(); + _vm->_animMan->playAnim("otage.ANM", 1, 24, 500, true); + _vm->_soundMan->_specialSoundNum = 0; + _vm->_graphicsMan->displayScreen(false); - _vm->_graphicsManager->restoreScreen(); + _vm->_graphicsMan->restoreScreen(); _charactersEnabledFl = false; - memcpy(_vm->_graphicsManager->_palette, oldPalette, 769); - _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); + memcpy(_vm->_graphicsMan->_palette, oldPalette, 769); + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); _vm->_globals->freeMemory(oldPalette); - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->copy16BitRect(_vm->_graphicsManager->_backBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager->unlockScreen(); - memcpy(_vm->_graphicsManager->_frontBuffer, _vm->_graphicsManager->_backBuffer, 614399); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_backBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsMan->unlockScreen(); + memcpy(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_backBuffer, 614399); - _vm->_graphicsManager->_scrollStatus = 0; - _vm->_graphicsManager->updateScreen(); + _vm->_graphicsMan->_scrollStatus = 0; + _vm->_graphicsMan->updateScreen(); break; case 20: _vm->_globals->_saveData->_data[svField132] = (getSpriteX(0) > 65 && getSpriteX(0) <= 124 && getSpriteY(0) > 372 && getSpriteY(0) <= 398) ? 1 : 0; @@ -2731,14 +2731,14 @@ void ObjectsManager::handleSpecialGames() { setBobAnimDataIdx(5, 0); setBobAnimation(6); _vm->_globals->_saveData->_data[svField261] = 2; - _vm->_linesManager->disableZone(15); - _vm->_soundManager->playSoundFile("SOUND75.WAV"); + _vm->_linesMan->disableZone(15); + _vm->_soundMan->playSoundFile("SOUND75.WAV"); } if (_vm->_globals->_saveData->_data[svField261] == 2 && getBobAnimDataIdx(6) == 6) { stopBobAnimation(6); setBobAnimDataIdx(6, 0); setBobAnimation(7); - _vm->_linesManager->enableZone(14); + _vm->_linesMan->enableZone(14); _vm->_globals->_saveData->_data[svField261] = 3; } _vm->_globals->_disableInventFl = false; @@ -2749,10 +2749,10 @@ void ObjectsManager::handleSpecialGames() { _vm->_globals->_disableInventFl = true; do - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); while (getBobAnimDataIdx(8) != 3); _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("GM3.PE2"); + _vm->_talkMan->startAnimatedCharacterDialogue("GM3.PE2"); stopBobAnimation(8); _vm->_globals->_saveData->_data[svField333] = 1; _vm->_globals->_disableInventFl = false; @@ -2762,14 +2762,14 @@ void ObjectsManager::handleSpecialGames() { void ObjectsManager::quickDisplayBobSprite(int idx) { int startPos = 10 * idx; - if (!READ_LE_UINT16(_vm->_talkManager->_characterAnim + startPos + 4)) + if (!READ_LE_UINT16(_vm->_talkMan->_characterAnim + startPos + 4)) return; - int xp = READ_LE_INT16(_vm->_talkManager->_characterAnim + startPos); - int yp = READ_LE_INT16(_vm->_talkManager->_characterAnim + startPos + 2); - int spriteIndex = _vm->_talkManager->_characterAnim[startPos + 8]; + int xp = READ_LE_INT16(_vm->_talkMan->_characterAnim + startPos); + int yp = READ_LE_INT16(_vm->_talkMan->_characterAnim + startPos + 2); + int spriteIndex = _vm->_talkMan->_characterAnim[startPos + 8]; - _vm->_graphicsManager->fastDisplay(_vm->_talkManager->_characterSprite, xp, yp, spriteIndex); + _vm->_graphicsMan->fastDisplay(_vm->_talkMan->_characterSprite, xp, yp, spriteIndex); } void ObjectsManager::initVbob(byte *src, int idx, int xp, int yp, int frameIndex) { @@ -2816,7 +2816,7 @@ void ObjectsManager::doActionBack(int idx) { if (_curGestureFile != 1) { _gestureBuf = _vm->_globals->freeMemory(_gestureBuf); _curGestureFile = 1; - _gestureBuf = _vm->_fileManager->loadFile("DOS.SPR"); + _gestureBuf = _vm->_fileIO->loadFile("DOS.SPR"); } switch (idx) { @@ -2857,7 +2857,7 @@ void ObjectsManager::doActionRight(int idx) { if (_curGestureFile != 3) { _gestureBuf = _vm->_globals->freeMemory(_gestureBuf); _curGestureFile = 3; - _gestureBuf = _vm->_fileManager->loadFile("PROFIL.SPR"); + _gestureBuf = _vm->_fileIO->loadFile("PROFIL.SPR"); } switch (idx) { @@ -2898,7 +2898,7 @@ void ObjectsManager::doActionDiagRight(int idx) { if (_curGestureFile != 4) { _gestureBuf = _vm->_globals->freeMemory(_gestureBuf); _curGestureFile = 4; - _gestureBuf = _vm->_fileManager->loadFile("3Q.SPR"); + _gestureBuf = _vm->_fileIO->loadFile("3Q.SPR"); } switch (idx) { @@ -2939,7 +2939,7 @@ void ObjectsManager::doActionFront(int idx) { if (_curGestureFile != 2) { _gestureBuf = _vm->_globals->freeMemory(_gestureBuf); _curGestureFile = 2; - _gestureBuf = _vm->_fileManager->loadFile("FACE.SPR"); + _gestureBuf = _vm->_fileIO->loadFile("FACE.SPR"); } switch (idx) { @@ -2962,7 +2962,7 @@ void ObjectsManager::doActionDiagLeft(int idx) { if (_curGestureFile != 4) { _gestureBuf = _vm->_globals->freeMemory(_gestureBuf); _curGestureFile = 4; - _gestureBuf = _vm->_fileManager->loadFile("3Q.SPR"); + _gestureBuf = _vm->_fileIO->loadFile("3Q.SPR"); } switch (idx) { @@ -3003,7 +3003,7 @@ void ObjectsManager::doActionLeft(int idx) { if (_curGestureFile != 3) { _gestureBuf = _vm->_globals->freeMemory(_gestureBuf); _curGestureFile = 3; - _gestureBuf = _vm->_fileManager->loadFile("PROFIL.SPR"); + _gestureBuf = _vm->_fileIO->loadFile("PROFIL.SPR"); } switch (idx) { @@ -3047,16 +3047,16 @@ void ObjectsManager::setAndPlayAnim(int idx, int animIdx, int destPosi, bool ani // Make Hopkins walk to the expected place do { - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } while (destPosi != getBobAnimDataIdx(idx)); if (!animAction) stopBobAnimation(idx); else { - _vm->_graphicsManager->fastDisplay(_bob[idx]._spriteData, + _vm->_graphicsMan->fastDisplay(_bob[idx]._spriteData, _bob[idx]._oldX, _bob[idx]._oldY, _bob[idx]._frameIndex); stopBobAnimation(idx); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } } @@ -3102,8 +3102,8 @@ void ObjectsManager::loadLinkFile(const Common::String &file, bool skipDetails) Common::File f; Common::String filename = file + ".LNK"; bool fileFoundFl = false; - byte *ptr = _vm->_fileManager->searchCat(filename, RES_LIN, fileFoundFl); - size_t nbytes = _vm->_fileManager->_catalogSize; + byte *ptr = _vm->_fileIO->searchCat(filename, RES_LIN, fileFoundFl); + size_t nbytes = _vm->_fileIO->_catalogSize; if (!fileFoundFl) { if (!f.open(filename)) error("Error opening file - %s", filename.c_str()); @@ -3112,7 +3112,7 @@ void ObjectsManager::loadLinkFile(const Common::String &file, bool skipDetails) ptr = _vm->_globals->allocMemory(nbytes); if (ptr == NULL) error("INILINK"); - _vm->_fileManager->readStream(f, ptr, nbytes); + _vm->_fileIO->readStream(f, ptr, nbytes); f.close(); } if (!skipDetails) { @@ -3124,12 +3124,12 @@ void ObjectsManager::loadLinkFile(const Common::String &file, bool skipDetails) Common::String filename2 = Common::String((const char *)ptr + 1000); if (!filename2.empty()) { fileFoundFl = false; - _hidingItemData[1] = _vm->_fileManager->searchCat(filename2, RES_SLI, fileFoundFl); + _hidingItemData[1] = _vm->_fileIO->searchCat(filename2, RES_SLI, fileFoundFl); if (!fileFoundFl) { - _hidingItemData[1] = _vm->_fileManager->loadFile(filename2); + _hidingItemData[1] = _vm->_fileIO->loadFile(filename2); } else { - _hidingItemData[1] = _vm->_fileManager->loadFile("RES_SLI.RES"); + _hidingItemData[1] = _vm->_fileIO->loadFile("RES_SLI.RES"); } int curDataCacheId = 60; @@ -3159,18 +3159,18 @@ void ObjectsManager::loadLinkFile(const Common::String &file, bool skipDetails) } } - _vm->_linesManager->resetLines(); + _vm->_linesMan->resetLines(); for (size_t idx = 0; idx < nbytes - 3; idx++) { if (READ_BE_UINT24(&ptr[idx]) == MKTAG24('O', 'B', '2')) { byte *curDataPtr = &ptr[idx + 4]; int lineDataIdx = 0; int curLineIdx = 0; - _vm->_linesManager->resetLinesNumb(); + _vm->_linesMan->resetLinesNumb(); Directions curDirection; do { curDirection = (Directions)READ_LE_INT16(curDataPtr + 2 * lineDataIdx); if (curDirection != DIR_NONE) { - _vm->_linesManager->addLine( + _vm->_linesMan->addLine( curLineIdx, curDirection, READ_LE_INT16(curDataPtr + 2 * lineDataIdx + 2), @@ -3181,7 +3181,7 @@ void ObjectsManager::loadLinkFile(const Common::String &file, bool skipDetails) lineDataIdx += 5; ++curLineIdx; } while (curDirection != DIR_NONE); - _vm->_linesManager->initRoute(); + _vm->_linesMan->initRoute(); } } @@ -3191,34 +3191,34 @@ void ObjectsManager::loadLinkFile(const Common::String &file, bool skipDetails) byte *curDataPtr = &ptr[idx + 4]; int curDataIdx = 0; for (int i = 1; i <= 100; i++) { - _vm->_linesManager->_zone[i]._destX = 0; - _vm->_linesManager->_zone[i]._destY = 0; - _vm->_linesManager->_zone[i]._spriteIndex = 0; - _vm->_linesManager->_zone[i]._verbFl1 = 0; - _vm->_linesManager->_zone[i]._verbFl2 = 0; - _vm->_linesManager->_zone[i]._verbFl3 = 0; - _vm->_linesManager->_zone[i]._verbFl4 = 0; - _vm->_linesManager->_zone[i]._verbFl5 = 0; - _vm->_linesManager->_zone[i]._verbFl6 = 0; - _vm->_linesManager->_zone[i]._verbFl7 = 0; - _vm->_linesManager->_zone[i]._verbFl8 = 0; - _vm->_linesManager->_zone[i]._verbFl9 = 0; - _vm->_linesManager->_zone[i]._verbFl10 = 0; - _vm->_linesManager->_zone[i]._messageId = 0; + _vm->_linesMan->_zone[i]._destX = 0; + _vm->_linesMan->_zone[i]._destY = 0; + _vm->_linesMan->_zone[i]._spriteIndex = 0; + _vm->_linesMan->_zone[i]._verbFl1 = 0; + _vm->_linesMan->_zone[i]._verbFl2 = 0; + _vm->_linesMan->_zone[i]._verbFl3 = 0; + _vm->_linesMan->_zone[i]._verbFl4 = 0; + _vm->_linesMan->_zone[i]._verbFl5 = 0; + _vm->_linesMan->_zone[i]._verbFl6 = 0; + _vm->_linesMan->_zone[i]._verbFl7 = 0; + _vm->_linesMan->_zone[i]._verbFl8 = 0; + _vm->_linesMan->_zone[i]._verbFl9 = 0; + _vm->_linesMan->_zone[i]._verbFl10 = 0; + _vm->_linesMan->_zone[i]._messageId = 0; } int curLineIdx = 0; for (;;) { int bobZoneId = READ_LE_INT16(curDataPtr + 2 * curDataIdx); if (bobZoneId != -1) { - _vm->_linesManager->addZoneLine( + _vm->_linesMan->addZoneLine( curLineIdx, READ_LE_INT16(curDataPtr + 2 * curDataIdx + 2), READ_LE_INT16(curDataPtr + 2 * curDataIdx + 4), READ_LE_INT16(curDataPtr + 2 * curDataIdx + 6), READ_LE_INT16(curDataPtr + 2 * curDataIdx + 8), bobZoneId); - _vm->_linesManager->_zone[bobZoneId]._enabledFl = true; + _vm->_linesMan->_zone[bobZoneId]._enabledFl = true; } curDataIdx += 5; ++curLineIdx; @@ -3226,32 +3226,32 @@ void ObjectsManager::loadLinkFile(const Common::String &file, bool skipDetails) break; } for (int i = 1; i <= 100; i++) { - _vm->_linesManager->_zone[i]._destX = READ_LE_INT16(curDataPtr + 2 * curDataIdx); - _vm->_linesManager->_zone[i]._destY = READ_LE_INT16(curDataPtr + 2 * curDataIdx + 2); - _vm->_linesManager->_zone[i]._spriteIndex = READ_LE_INT16(curDataPtr + 2 * curDataIdx + 4); + _vm->_linesMan->_zone[i]._destX = READ_LE_INT16(curDataPtr + 2 * curDataIdx); + _vm->_linesMan->_zone[i]._destY = READ_LE_INT16(curDataPtr + 2 * curDataIdx + 2); + _vm->_linesMan->_zone[i]._spriteIndex = READ_LE_INT16(curDataPtr + 2 * curDataIdx + 4); curDataIdx += 3; } byte *verbData = ptr + idx + (10 * curLineIdx + 606) + 4; for (int i = 1; i <= 100; i++) { int j = (i - 1) * 10; - _vm->_linesManager->_zone[i]._verbFl1 = verbData[j]; - _vm->_linesManager->_zone[i]._verbFl2 = verbData[j + 1]; - _vm->_linesManager->_zone[i]._verbFl3 = verbData[j + 2]; - _vm->_linesManager->_zone[i]._verbFl4 = verbData[j + 3]; - _vm->_linesManager->_zone[i]._verbFl5 = verbData[j + 4]; - _vm->_linesManager->_zone[i]._verbFl6 = verbData[j + 5]; - _vm->_linesManager->_zone[i]._verbFl7 = verbData[j + 6]; - _vm->_linesManager->_zone[i]._verbFl8 = verbData[j + 7]; - _vm->_linesManager->_zone[i]._verbFl9 = verbData[j + 8]; - _vm->_linesManager->_zone[i]._verbFl10 = verbData[j + 9]; + _vm->_linesMan->_zone[i]._verbFl1 = verbData[j]; + _vm->_linesMan->_zone[i]._verbFl2 = verbData[j + 1]; + _vm->_linesMan->_zone[i]._verbFl3 = verbData[j + 2]; + _vm->_linesMan->_zone[i]._verbFl4 = verbData[j + 3]; + _vm->_linesMan->_zone[i]._verbFl5 = verbData[j + 4]; + _vm->_linesMan->_zone[i]._verbFl6 = verbData[j + 5]; + _vm->_linesMan->_zone[i]._verbFl7 = verbData[j + 6]; + _vm->_linesMan->_zone[i]._verbFl8 = verbData[j + 7]; + _vm->_linesMan->_zone[i]._verbFl9 = verbData[j + 8]; + _vm->_linesMan->_zone[i]._verbFl10 = verbData[j + 9]; } int dep = 1010; for (int i = 1; i <= 100; i++) { - _vm->_linesManager->_zone[i]._messageId = READ_LE_INT16(verbData + dep); + _vm->_linesMan->_zone[i]._messageId = READ_LE_INT16(verbData + dep); dep += 2; } - _vm->_linesManager->initSquareZones(); + _vm->_linesMan->initSquareZones(); } } } @@ -3263,54 +3263,54 @@ void ObjectsManager::sceneSpecialIni() { case 17: if (_vm->_globals->_prevScreenId == 20) { _vm->_globals->_disableInventFl = true; - _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0); + _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0); for (int i = 0; i <= 4; i++) - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager->fadeInLong(); + _vm->_events->refreshScreenAndEvents(); + _vm->_graphicsMan->fadeInLong(); animateSprite(0); for (int i = 0; i <= 4; i++) - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); initVbob(_vm->_globals->_levelSpriteBuf, 5, 15, 28, 1); - _vm->_fontManager->hideText(9); + _vm->_fontMan->hideText(9); bool displayedTxtFl = false; - if (!_vm->_soundManager->_textOffFl) { - _vm->_fontManager->initTextBuffers(9, 383, _vm->_globals->_textFilename, 220, 72, 6, 36, 253); - _vm->_fontManager->showText(9); + if (!_vm->_soundMan->_textOffFl) { + _vm->_fontMan->initTextBuffers(9, 383, _vm->_globals->_textFilename, 220, 72, 6, 36, 253); + _vm->_fontMan->showText(9); displayedTxtFl = true; } - if (!_vm->_soundManager->_voiceOffFl) - _vm->_soundManager->mixVoice(383, 4, displayedTxtFl); + if (!_vm->_soundMan->_voiceOffFl) + _vm->_soundMan->mixVoice(383, 4, displayedTxtFl); _vm->_globals->_saveData->_data[svField270] = 1; _vm->_globals->_saveData->_data[svField300] = 1; _vm->_globals->_saveData->_data[svField320] = 1; - if (_vm->_soundManager->_voiceOffFl) { + if (_vm->_soundMan->_voiceOffFl) { for (int i = 0; i <= 199; i++) - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } - _vm->_fontManager->hideText(9); + _vm->_fontMan->hideText(9); disableVbob(5); for (int i = 0; i <= 3; i++) - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager->_noFadingFl = true; + _vm->_events->refreshScreenAndEvents(); + _vm->_graphicsMan->_noFadingFl = true; _vm->_globals->_disableInventFl = false; } break; case 18: if (_vm->_globals->_prevScreenId == 17) { - _vm->_eventsManager->_mouseSpriteId = 4; + _vm->_events->_mouseSpriteId = 4; for (int i = 0; i <= 4; i++) - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager->fadeInLong(); + _vm->_events->refreshScreenAndEvents(); + _vm->_graphicsMan->fadeInLong(); _vm->_globals->_eventMode = EVENTMODE_IGNORE; _vm->_globals->_disableInventFl = false; - _vm->_graphicsManager->_noFadingFl = true; + _vm->_graphicsMan->_noFadingFl = true; _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("MAGE1.pe2"); - _vm->_graphicsManager->_noFadingFl = true; + _vm->_talkMan->startAnimatedCharacterDialogue("MAGE1.pe2"); + _vm->_graphicsMan->_noFadingFl = true; _vm->_globals->_disableInventFl = false; } break; @@ -3322,22 +3322,22 @@ void ObjectsManager::sceneSpecialIni() { case 39: case 40: case 41: - _vm->_linesManager->_bobZone[20] = 1; - _vm->_linesManager->_bobZone[21] = 2; - _vm->_linesManager->_bobZone[22] = 3; - _vm->_linesManager->_bobZone[23] = 4; - _vm->_linesManager->_bobZoneFl[20] = true; - _vm->_linesManager->_bobZoneFl[21] = true; - _vm->_linesManager->_bobZoneFl[22] = true; - _vm->_linesManager->_bobZoneFl[23] = true; + _vm->_linesMan->_bobZone[20] = 1; + _vm->_linesMan->_bobZone[21] = 2; + _vm->_linesMan->_bobZone[22] = 3; + _vm->_linesMan->_bobZone[23] = 4; + _vm->_linesMan->_bobZoneFl[20] = true; + _vm->_linesMan->_bobZoneFl[21] = true; + _vm->_linesMan->_bobZoneFl[22] = true; + _vm->_linesMan->_bobZoneFl[23] = true; enableVerb(20, 5); enableVerb(21, 5); enableVerb(22, 5); enableVerb(23, 5); - _vm->_linesManager->_zone[20]._messageId = 30; - _vm->_linesManager->_zone[21]._messageId = 30; - _vm->_linesManager->_zone[22]._messageId = 30; - _vm->_linesManager->_zone[23]._messageId = 30; + _vm->_linesMan->_zone[20]._messageId = 30; + _vm->_linesMan->_zone[21]._messageId = 30; + _vm->_linesMan->_zone[22]._messageId = 30; + _vm->_linesMan->_zone[23]._messageId = 30; for (int i = svField200; i <= svField214; i++) { if (_vm->_globals->_saveData->_data[i] != 2) _vm->_globals->_saveData->_data[i] = 0; @@ -3370,8 +3370,8 @@ void ObjectsManager::setMultiBobAnim(int idx1, int idx2, int anim1Idx, int anim2 } void ObjectsManager::checkEventBobAnim(int idx, int animIdx, int animDataIdx, int a4) { - _vm->_eventsManager->_curMouseButton = 0; - _vm->_eventsManager->_mouseButton = 0; + _vm->_events->_curMouseButton = 0; + _vm->_events->_mouseButton = 0; if (a4 != 3) { setBobAnimation(idx); @@ -3379,8 +3379,8 @@ void ObjectsManager::checkEventBobAnim(int idx, int animIdx, int animDataIdx, in } do { - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_eventsManager->_curMouseButton) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_events->_curMouseButton) break; } while (animDataIdx != getBobAnimDataIdx(idx)); if (!a4) @@ -3391,42 +3391,42 @@ void ObjectsManager::disableVerb(int idx, int a2) { switch (a2) { case 6: case 16: - _vm->_linesManager->_zone[idx]._verbFl1 = 0; + _vm->_linesMan->_zone[idx]._verbFl1 = 0; break; case 7: - _vm->_linesManager->_zone[idx]._verbFl2 = 0; + _vm->_linesMan->_zone[idx]._verbFl2 = 0; break; case 5: case 8: - _vm->_linesManager->_zone[idx]._verbFl3 = 0; + _vm->_linesMan->_zone[idx]._verbFl3 = 0; break; case 9: case 17: case 24: - _vm->_linesManager->_zone[idx]._verbFl4 = 0; + _vm->_linesMan->_zone[idx]._verbFl4 = 0; break; case 10: case 18: - _vm->_linesManager->_zone[idx]._verbFl5 = 0; + _vm->_linesMan->_zone[idx]._verbFl5 = 0; break; case 11: case 19: - _vm->_linesManager->_zone[idx]._verbFl6 = 0; + _vm->_linesMan->_zone[idx]._verbFl6 = 0; break; case 12: case 20: - _vm->_linesManager->_zone[idx]._verbFl7 = 0; + _vm->_linesMan->_zone[idx]._verbFl7 = 0; break; case 13: case 22: - _vm->_linesManager->_zone[idx]._verbFl8 = 0; + _vm->_linesMan->_zone[idx]._verbFl8 = 0; case 14: case 21: case 25: - _vm->_linesManager->_zone[idx]._verbFl9 = 0; + _vm->_linesMan->_zone[idx]._verbFl9 = 0; break; case 15: - _vm->_linesManager->_zone[idx]._verbFl10 = 0; + _vm->_linesMan->_zone[idx]._verbFl10 = 0; break; } _changeVerbFl = true; @@ -3435,64 +3435,64 @@ void ObjectsManager::disableVerb(int idx, int a2) { void ObjectsManager::enableVerb(int idx, int a2) { switch (a2) { case 5: - _vm->_linesManager->_zone[idx]._verbFl3 = 2; + _vm->_linesMan->_zone[idx]._verbFl3 = 2; break; case 6: - _vm->_linesManager->_zone[idx]._verbFl1 = 1; + _vm->_linesMan->_zone[idx]._verbFl1 = 1; break; case 7: - _vm->_linesManager->_zone[idx]._verbFl2 = 1; + _vm->_linesMan->_zone[idx]._verbFl2 = 1; break; case 8: - _vm->_linesManager->_zone[idx]._verbFl3 = 1; + _vm->_linesMan->_zone[idx]._verbFl3 = 1; break; case 9: - _vm->_linesManager->_zone[idx]._verbFl4 = 1; + _vm->_linesMan->_zone[idx]._verbFl4 = 1; break; case 10: - _vm->_linesManager->_zone[idx]._verbFl5 = 1; + _vm->_linesMan->_zone[idx]._verbFl5 = 1; break; case 11: - _vm->_linesManager->_zone[idx]._verbFl6 = 1; + _vm->_linesMan->_zone[idx]._verbFl6 = 1; break; case 12: - _vm->_linesManager->_zone[idx]._verbFl7 = 1; + _vm->_linesMan->_zone[idx]._verbFl7 = 1; break; case 13: - _vm->_linesManager->_zone[idx]._verbFl8 = 1; + _vm->_linesMan->_zone[idx]._verbFl8 = 1; break; case 14: - _vm->_linesManager->_zone[idx]._verbFl8 = 1; + _vm->_linesMan->_zone[idx]._verbFl8 = 1; break; case 15: - _vm->_linesManager->_zone[idx]._verbFl9 = 1; + _vm->_linesMan->_zone[idx]._verbFl9 = 1; break; case 16: - _vm->_linesManager->_zone[idx]._verbFl1 = 2; + _vm->_linesMan->_zone[idx]._verbFl1 = 2; break; case 17: - _vm->_linesManager->_zone[idx]._verbFl4 = 2; + _vm->_linesMan->_zone[idx]._verbFl4 = 2; break; case 18: - _vm->_linesManager->_zone[idx]._verbFl5 = 2; + _vm->_linesMan->_zone[idx]._verbFl5 = 2; break; case 19: - _vm->_linesManager->_zone[idx]._verbFl6 = 2; + _vm->_linesMan->_zone[idx]._verbFl6 = 2; break; case 20: - _vm->_linesManager->_zone[idx]._verbFl7 = 2; + _vm->_linesMan->_zone[idx]._verbFl7 = 2; break; case 21: - _vm->_linesManager->_zone[idx]._verbFl9 = 2; + _vm->_linesMan->_zone[idx]._verbFl9 = 2; break; case 22: - _vm->_linesManager->_zone[idx]._verbFl8 = 2; + _vm->_linesMan->_zone[idx]._verbFl8 = 2; break; case 24: - _vm->_linesManager->_zone[idx]._verbFl4 = 3; + _vm->_linesMan->_zone[idx]._verbFl4 = 3; break; case 25: - _vm->_linesManager->_zone[idx]._verbFl9 = 2; + _vm->_linesMan->_zone[idx]._verbFl9 = 2; break; } } @@ -3531,7 +3531,7 @@ void ObjectsManager::showActionAnimation(const byte *spriteData, const Common::S _sprite[0]._spriteIndex = idx; } for (int i = 0; i < realSpeed; i++) - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); if (idx == -1) break; } @@ -3576,7 +3576,7 @@ void ObjectsManager::showSpecialActionAnimationWithFlip(byte *spriteData, const _sprite[0]._spriteIndex = spriteIndex; } for (int i = 0; i < realSpeed; i++) - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } while (spriteIndex != -1); } @@ -3614,7 +3614,7 @@ void ObjectsManager::showSpecialActionAnimation(byte *spriteData, const Common:: } for (int i = 0; i < realSpeed; i++) - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); if (spriteIndex == -1) break; @@ -3678,8 +3678,8 @@ void ObjectsManager::handleForest(int screenId, int minX, int maxX, int minY, in if (_vm->_globals->_saveData->_data[savegameIdx]) { if (_vm->_globals->_saveData->_data[savegameIdx] == 1) { if (((idx == 1 || idx == 2) && getBobAnimDataIdx(idx) == 26) || ((idx == 3 || idx == 4) && getBobAnimDataIdx(idx) == 27)) { - _vm->_dialogsManager->disableInvent(); - _vm->_soundManager->playSample(1); + _vm->_dialog->disableInvent(); + _vm->_soundMan->playSample(1); _vm->_globals->_saveData->_data[savegameIdx] = 4; } } @@ -3688,10 +3688,10 @@ void ObjectsManager::handleForest(int screenId, int minX, int maxX, int minY, in _vm->_globals->_saveData->_data[savegameIdx] = 3; } if (_vm->_globals->_saveData->_data[savegameIdx] == 3) { - _vm->_graphicsManager->_fadingFl = true; - _vm->_animationManager->playAnim("CREVE2.ANM", 100, 24, 500); + _vm->_graphicsMan->_fadingFl = true; + _vm->_animMan->playAnim("CREVE2.ANM", 100, 24, 500); _vm->_globals->_exitId = 150; - _vm->_graphicsManager->_noFadingFl = true; + _vm->_graphicsMan->_noFadingFl = true; hideBob(1); hideBob(2); hideBob(3); @@ -3717,73 +3717,73 @@ void ObjectsManager::lockAnimX(int idx, int x) { */ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Common::String &linkFile, const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen) { - _vm->_dialogsManager->_inventFl = false; - _vm->_eventsManager->_gameKey = KEY_NONE; - _vm->_dialogsManager->enableInvent(); - _vm->_graphicsManager->_scrollOffset = 0; + _vm->_dialog->_inventFl = false; + _vm->_events->_gameKey = KEY_NONE; + _vm->_dialog->enableInvent(); + _vm->_graphicsMan->_scrollOffset = 0; _vm->_globals->_cityMapEnabledFl = false; _vm->_globals->_eventMode = EVENTMODE_IGNORE; - _vm->_soundManager->playSound(soundNum); - _vm->_linesManager->_route = NULL; + _vm->_soundMan->playSound(soundNum); + _vm->_linesMan->_route = NULL; _vm->_globals->_freezeCharacterFl = true; _vm->_globals->_exitId = 0; if (!backgroundFile.empty()) - _vm->_graphicsManager->loadImage(backgroundFile); + _vm->_graphicsMan->loadImage(backgroundFile); if (!linkFile.empty()) loadLinkFile(linkFile); if (!animFile.empty()) - _vm->_animationManager->loadAnim(animFile); - _vm->_graphicsManager->displayAllBob(); + _vm->_animMan->loadAnim(animFile); + _vm->_graphicsMan->displayAllBob(); if (!s4.empty()) { if (initializeScreen) - _vm->_graphicsManager->initScreen(s4, 0, initializeScreen); + _vm->_graphicsMan->initScreen(s4, 0, initializeScreen); else - _vm->_graphicsManager->initScreen(s4, 2, initializeScreen); + _vm->_graphicsMan->initScreen(s4, 2, initializeScreen); } - _vm->_eventsManager->mouseOn(); + _vm->_events->mouseOn(); if (_vm->_globals->_screenId == 61) { addStaticSprite(_vm->_globals->_characterSpriteBuf, Common::Point(330, 418), 0, 60, 0, false, 34, 190); animateSprite(0); - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; computeAndSetSpriteSize(); } - _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0); - _vm->_eventsManager->changeMouseCursor(4); + _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0); + _vm->_events->changeMouseCursor(4); for (int i = 0; i <= 4; i++) - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager->fadeInLong(); + _vm->_events->refreshScreenAndEvents(); + _vm->_graphicsMan->fadeInLong(); if (_vm->_globals->_screenId == 61) { - _vm->_animationManager->playSequence("OUVRE.SEQ", 10, 4, 10, false, false); + _vm->_animMan->playSequence("OUVRE.SEQ", 10, 4, 10, false, false); stopBobAnimation(3); _vm->_globals->_checkDistanceFl = true; _oldCharacterPosX = getSpriteX(0); _oldDirection = DIR_NONE; _homeRateCounter = 0; - _vm->_linesManager->_route = NULL; - _vm->_linesManager->_route = _vm->_linesManager->findRoute(getSpriteX(0), getSpriteY(0), 330, 345); + _vm->_linesMan->_route = NULL; + _vm->_linesMan->_route = _vm->_linesMan->findRoute(getSpriteX(0), getSpriteY(0), 330, 345); _vm->_globals->_checkDistanceFl = true; do { GOHOME(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_linesManager->_route); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_linesMan->_route); setSpriteIndex(0, 64); } do { - int mouseButton = _vm->_eventsManager->getMouseButton(); + int mouseButton = _vm->_events->getMouseButton(); if (mouseButton == 1) { handleLeftButton(); mouseButton = 1; } else if (mouseButton == 2) handleRightButton(); - _vm->_dialogsManager->testDialogOpening(); - _vm->_linesManager->checkZone(); + _vm->_dialog->testDialogOpening(); + _vm->_linesMan->checkZone(); if (_vm->_globals->_actionMoveTo) PARADISE(); if (!_vm->_globals->_exitId) - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); if (_vm->_globals->_exitId) break; @@ -3791,9 +3791,9 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo if (_vm->shouldQuit()) return; - _vm->_graphicsManager->fadeOutLong(); + _vm->_graphicsMan->fadeOutLong(); if (!animFile.empty()) - _vm->_graphicsManager->endDisplayBob(); + _vm->_graphicsMan->endDisplayBob(); if (_vm->_globals->_screenId == 61) removeSprite(0); clearScreen(); @@ -3805,51 +3805,51 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo */ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Common::String &linkFile, const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen) { - _vm->_dialogsManager->_inventFl = false; - _vm->_eventsManager->_gameKey = KEY_NONE; + _vm->_dialog->_inventFl = false; + _vm->_events->_gameKey = KEY_NONE; _verb = 4; - _vm->_graphicsManager->_scrollOffset = 0; - _vm->_dialogsManager->enableInvent(); + _vm->_graphicsMan->_scrollOffset = 0; + _vm->_dialog->enableInvent(); _vm->_globals->_cityMapEnabledFl = false; - _vm->_graphicsManager->_noFadingFl = false; + _vm->_graphicsMan->_noFadingFl = false; _vm->_globals->_freezeCharacterFl = false; _vm->_globals->_exitId = 0; _vm->_globals->_checkDistanceFl = true; - _vm->_soundManager->playSound(soundNum); + _vm->_soundMan->playSound(soundNum); _vm->_globals->_eventMode = EVENTMODE_IGNORE; if (!backgroundFile.empty()) - _vm->_graphicsManager->loadImage(backgroundFile); + _vm->_graphicsMan->loadImage(backgroundFile); if (!linkFile.empty()) loadLinkFile(linkFile); if (!animFile.empty()) { - _vm->_animationManager->loadAnim(animFile); - _vm->_graphicsManager->displayAllBob(); + _vm->_animMan->loadAnim(animFile); + _vm->_graphicsMan->displayAllBob(); } if (!s4.empty()) { if (initializeScreen) - _vm->_graphicsManager->initScreen(s4, 0, initializeScreen); + _vm->_graphicsMan->initScreen(s4, 0, initializeScreen); else - _vm->_graphicsManager->initScreen(s4, 2, initializeScreen); - } - _vm->_eventsManager->mouseOn(); - _vm->_eventsManager->_mouseCursorId = 4; - _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0); + _vm->_graphicsMan->initScreen(s4, 2, initializeScreen); + } + _vm->_events->mouseOn(); + _vm->_events->_mouseCursorId = 4; + _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0); if (_vm->_globals->_characterType) { if (!_vm->_globals->_saveData->_data[svAlternateSpriteFl] && !_vm->_globals->_saveData->_data[svField356]) { - _vm->_globals->_characterSpriteBuf = _vm->_fileManager->loadFile("PERSO.SPR"); + _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PERSO.SPR"); _vm->_globals->_characterType = 0; } } if (!_vm->_globals->_characterType && _vm->_globals->_saveData->_data[svAlternateSpriteFl] == 1) { - _vm->_globals->_characterSpriteBuf = _vm->_fileManager->loadFile("HOPFEM.SPR"); + _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("HOPFEM.SPR"); _vm->_globals->_characterType = 1; } if (_vm->_globals->_characterType != 2 && _vm->_globals->_saveData->_data[svField356] == 1) { - _vm->_globals->_characterSpriteBuf = _vm->_fileManager->loadFile("PSAMAN.SPR"); + _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PSAMAN.SPR"); _vm->_globals->_characterType = 2; } _vm->_globals->loadCharacterData(); @@ -3864,44 +3864,44 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm addStaticSprite(_vm->_globals->_characterSpriteBuf, _characterPos, 0, _startSpriteIndex, 0, false, 20, 127); break; } - _vm->_eventsManager->setMouseXY(_characterPos); - if (_vm->_graphicsManager->_largeScreenFl) - _vm->_graphicsManager->_scrollPosX = (int16)getSpriteX(0) - 320; + _vm->_events->setMouseXY(_characterPos); + if (_vm->_graphicsMan->_largeScreenFl) + _vm->_graphicsMan->_scrollPosX = (int16)getSpriteX(0) - 320; computeAndSetSpriteSize(); animateSprite(0); enableHidingBehavior(); - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; computeAndSetSpriteSize(); sceneSpecialIni(); - _vm->_eventsManager->_mouseSpriteId = 4; + _vm->_events->_mouseSpriteId = 4; _oldCharacterPosX = _characterPos.x; _oldCharacterPosY = _characterPos.y; _oldDirection = DIR_NONE; _homeRateCounter = 0; for (int idx = 0; idx < 5; ++idx) - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); _vm->_globals->_eventMode = EVENTMODE_IGNORE; - if (!_vm->_graphicsManager->_noFadingFl) - _vm->_graphicsManager->fadeInLong(); - _vm->_graphicsManager->_noFadingFl = false; - _vm->_eventsManager->changeMouseCursor(4); + if (!_vm->_graphicsMan->_noFadingFl) + _vm->_graphicsMan->fadeInLong(); + _vm->_graphicsMan->_noFadingFl = false; + _vm->_events->changeMouseCursor(4); int xCheck = 0; int yCheck = 0; bool breakFlag = false; while (!_vm->shouldQuit() && !breakFlag) { - int mouseButtons = _vm->_eventsManager->getMouseButton(); + int mouseButtons = _vm->_events->getMouseButton(); if (mouseButtons) { if (mouseButtons == 1) { - if (_verb == 16 && _vm->_eventsManager->_mouseCursorId == 16) { - int xp = _vm->_eventsManager->getMouseX(); - int yp = _vm->_eventsManager->getMouseY(); + if (_verb == 16 && _vm->_events->_mouseCursorId == 16) { + int xp = _vm->_events->getMouseX(); + int yp = _vm->_events->getMouseY(); if ((xCheck == xp) && (yCheck == yp)) { - _vm->_linesManager->_route = NULL; + _vm->_linesMan->_route = NULL; PARADISE(); if (_vm->_globals->_exitId) breakFlag = true; @@ -3915,15 +3915,15 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm } } if (!_vm->_globals->_exitId) { - _vm->_dialogsManager->testDialogOpening(); - _vm->_linesManager->checkZone(); - if (_vm->_linesManager->_route == NULL - || (GOHOME(), _vm->_linesManager->_route == NULL)) { + _vm->_dialog->testDialogOpening(); + _vm->_linesMan->checkZone(); + if (_vm->_linesMan->_route == NULL + || (GOHOME(), _vm->_linesMan->_route == NULL)) { if (_vm->_globals->_actionMoveTo) PARADISE(); } handleSpecialGames(); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); if (!_vm->_globals->_exitId) continue; } @@ -3931,16 +3931,16 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm } if (_vm->_globals->_exitId != 8 || _vm->_globals->_screenId != 5 || !_helicopterFl) { - if (!_vm->_graphicsManager->_noFadingFl) - _vm->_graphicsManager->fadeOutLong(); - _vm->_graphicsManager->_noFadingFl = false; + if (!_vm->_graphicsMan->_noFadingFl) + _vm->_graphicsMan->fadeOutLong(); + _vm->_graphicsMan->_noFadingFl = false; removeSprite(0); if (_twoCharactersFl) { removeSprite(1); _twoCharactersFl = false; } if (!animFile.empty()) - _vm->_graphicsManager->endDisplayBob(); + _vm->_graphicsMan->endDisplayBob(); clearScreen(); } else { _helicopterFl = false; @@ -3963,14 +3963,14 @@ void ObjectsManager::setHidingUseCount(int idx) { // Load Hiding Items void ObjectsManager::loadHidingItems(const Common::String &file) { resetHidingItems(); - byte *ptr = _vm->_fileManager->loadFile(file); + byte *ptr = _vm->_fileIO->loadFile(file); Common::String filename = Common::String((const char *)ptr); Common::File f; if (!f.exists(filename)) return; - byte *spriteData = _vm->_fileManager->loadFile(filename); + byte *spriteData = _vm->_fileIO->loadFile(filename); _hidingItemData[1] = spriteData; int curBufIdx = 60; for (int i = 0; i <= 21; i++) { diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp index a823eee352..0576b851cd 100644 --- a/engines/hopkins/saveload.cpp +++ b/engines/hopkins/saveload.cpp @@ -136,7 +136,7 @@ void SaveLoadManager::writeSavegameHeader(Common::OutSaveFile *out, hopkinsSaveg out->writeSint16LE(td.tm_mday); out->writeSint16LE(td.tm_hour); out->writeSint16LE(td.tm_min); - out->writeUint32LE(_vm->_eventsManager->_gameCounter); + out->writeUint32LE(_vm->_events->_gameCounter); } Common::Error SaveLoadManager::saveGame(int slot, const Common::String &saveName) { @@ -148,8 +148,8 @@ Common::Error SaveLoadManager::saveGame(int slot, const Common::String &saveName for (int i = 0; i < 35; ++i) _vm->_globals->_saveData->_inventory[i] = _vm->_globals->_inventory[i]; - _vm->_globals->_saveData->_mapCarPosX = _vm->_objectsManager->_mapCarPosX; - _vm->_globals->_saveData->_mapCarPosY = _vm->_objectsManager->_mapCarPosY; + _vm->_globals->_saveData->_mapCarPosX = _vm->_objectsMan->_mapCarPosX; + _vm->_globals->_saveData->_mapCarPosY = _vm->_objectsMan->_mapCarPosY; /* Create the savegame */ Common::OutSaveFile *savefile = g_system->getSavefileManager()->openForSaving(_vm->generateSaveName(slot)); @@ -207,8 +207,8 @@ Common::Error SaveLoadManager::loadGame(int slot) { _vm->_globals->_exitId = _vm->_globals->_saveData->_data[svLastScreenId]; _vm->_globals->_saveData->_data[svLastPrevScreenId] = 0; _vm->_globals->_screenId = 0; - _vm->_objectsManager->_mapCarPosX = _vm->_globals->_saveData->_mapCarPosX; - _vm->_objectsManager->_mapCarPosY = _vm->_globals->_saveData->_mapCarPosY; + _vm->_objectsMan->_mapCarPosX = _vm->_globals->_saveData->_mapCarPosX; + _vm->_objectsMan->_mapCarPosY = _vm->_globals->_saveData->_mapCarPosY; return Common::kNoError; } @@ -228,14 +228,14 @@ bool SaveLoadManager::readSavegameHeader(int slot, hopkinsSavegameHeader &header #define REDUCE_AMOUNT 80 void SaveLoadManager::createThumbnail(Graphics::Surface *s) { - int w = _vm->_graphicsManager->zoomOut(SCREEN_WIDTH, REDUCE_AMOUNT); - int h = _vm->_graphicsManager->zoomOut(SCREEN_HEIGHT - 40, REDUCE_AMOUNT); + int w = _vm->_graphicsMan->zoomOut(SCREEN_WIDTH, REDUCE_AMOUNT); + int h = _vm->_graphicsMan->zoomOut(SCREEN_HEIGHT - 40, REDUCE_AMOUNT); Graphics::Surface thumb8; thumb8.create(w, h, Graphics::PixelFormat::createFormatCLUT8()); - _vm->_graphicsManager->reduceScreenPart(_vm->_graphicsManager->_frontBuffer, (byte *)thumb8.pixels, - _vm->_eventsManager->_startPos.x, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 40, 80); + _vm->_graphicsMan->reduceScreenPart(_vm->_graphicsMan->_frontBuffer, (byte *)thumb8.pixels, + _vm->_events->_startPos.x, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 40, 80); // Convert the 8-bit pixel to 16 bit surface s->create(w, h, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0)); @@ -249,7 +249,7 @@ void SaveLoadManager::createThumbnail(Graphics::Surface *s) { uint16 *lineDestP = destP; for (int xp = 0; xp < w; ++xp) - *lineDestP++ = *(uint16 *)&_vm->_graphicsManager->_palettePixels[*lineSrcP++ * 2]; + *lineDestP++ = *(uint16 *)&_vm->_graphicsMan->_palettePixels[*lineSrcP++ * 2]; // Move to the start of the next line srcP += w; @@ -292,7 +292,7 @@ void SaveLoadManager::convertThumb16To8(Graphics::Surface *thumb16, Graphics::Su byte paletteG[PALETTE_SIZE]; byte paletteB[PALETTE_SIZE]; for (int palIndex = 0; palIndex < PALETTE_SIZE; ++palIndex) { - uint16 p = READ_LE_UINT16(&_vm->_graphicsManager->_palettePixels[palIndex * 2]); + uint16 p = READ_LE_UINT16(&_vm->_graphicsMan->_palettePixels[palIndex * 2]); pixelFormat16.colorToRGB(p, paletteR[palIndex], paletteG[palIndex], paletteB[palIndex]); } diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index 04f22498b0..c8dc0ebd5d 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -122,69 +122,69 @@ int ScriptManager::handleOpcode(byte *dataP) { if (mesgId == 363) mesgId = 636; } - if (!_vm->_soundManager->_soundOffFl && _vm->_soundManager->_soundFl) { + if (!_vm->_soundMan->_soundOffFl && _vm->_soundMan->_soundFl) { do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_soundManager->_soundFl); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_soundMan->_soundFl); } bool displayedTxtFl = false; - if (!_vm->_soundManager->_textOffFl) { + if (!_vm->_soundMan->_textOffFl) { int textPosX = READ_LE_INT16(dataP + 9); int textPosY = READ_LE_INT16(dataP + 11); - _vm->_fontManager->initTextBuffers(9, mesgId, _vm->_globals->_textFilename, 2 * textPosX, 2 * textPosY + 40, 6, dataP[7], 253); - _vm->_fontManager->showText(9); + _vm->_fontMan->initTextBuffers(9, mesgId, _vm->_globals->_textFilename, 2 * textPosX, 2 * textPosY + 40, 6, dataP[7], 253); + _vm->_fontMan->showText(9); displayedTxtFl = true; } - if (!_vm->_soundManager->_voiceOffFl) - _vm->_soundManager->mixVoice(mesgId, 4, displayedTxtFl); + if (!_vm->_soundMan->_voiceOffFl) + _vm->_soundMan->mixVoice(mesgId, 4, displayedTxtFl); } else { // if (_tempObjectFl) if (_vm->_globals->_saveData->_data[svField356]) { - _vm->_fontManager->initTextBuffers(9, 635, _vm->_globals->_textFilename, 55, 20, dataP[8], 35, 253); + _vm->_fontMan->initTextBuffers(9, 635, _vm->_globals->_textFilename, 55, 20, dataP[8], 35, 253); bool displayedTxtFl = false; - if (!_vm->_soundManager->_textOffFl) { - _vm->_fontManager->showText(9); + if (!_vm->_soundMan->_textOffFl) { + _vm->_fontMan->showText(9); displayedTxtFl = true; } - if (!_vm->_soundManager->_voiceOffFl) - _vm->_soundManager->mixVoice(635, 4, displayedTxtFl); + if (!_vm->_soundMan->_voiceOffFl) + _vm->_soundMan->mixVoice(635, 4, displayedTxtFl); } else { int textPosX = READ_LE_INT16(dataP + 9); - if (_vm->_globals->_language == LANG_FR && !_vm->_soundManager->_textOffFl) - _vm->_fontManager->initTextBuffers(9, mesgId, "OBJET1.TXT", 2 * textPosX, 60, 6, dataP[7], 253); - else if (_vm->_globals->_language == LANG_EN && !_vm->_soundManager->_textOffFl) - _vm->_fontManager->initTextBuffers(9, mesgId, "OBJETAN.TXT", 2 * textPosX, 60, 6, dataP[7], 253); - else if (_vm->_globals->_language == LANG_SP && !_vm->_soundManager->_textOffFl) { - _vm->_fontManager->initTextBuffers(9, mesgId, "OBJETES.TXT", 2 * textPosX, 60, 6, dataP[7], 253); + if (_vm->_globals->_language == LANG_FR && !_vm->_soundMan->_textOffFl) + _vm->_fontMan->initTextBuffers(9, mesgId, "OBJET1.TXT", 2 * textPosX, 60, 6, dataP[7], 253); + else if (_vm->_globals->_language == LANG_EN && !_vm->_soundMan->_textOffFl) + _vm->_fontMan->initTextBuffers(9, mesgId, "OBJETAN.TXT", 2 * textPosX, 60, 6, dataP[7], 253); + else if (_vm->_globals->_language == LANG_SP && !_vm->_soundMan->_textOffFl) { + _vm->_fontMan->initTextBuffers(9, mesgId, "OBJETES.TXT", 2 * textPosX, 60, 6, dataP[7], 253); } bool displayedTxtFl = false; - if (!_vm->_soundManager->_textOffFl) { - _vm->_fontManager->showText(9); + if (!_vm->_soundMan->_textOffFl) { + _vm->_fontMan->showText(9); displayedTxtFl = true; } - if (!_vm->_soundManager->_voiceOffFl) - _vm->_soundManager->mixVoice(mesgId, 5, displayedTxtFl); + if (!_vm->_soundMan->_voiceOffFl) + _vm->_soundMan->mixVoice(mesgId, 5, displayedTxtFl); } } break; } case MKTAG24('B', 'O', 'B'): - if (!_vm->_objectsManager->_disableFl) { + if (!_vm->_objectsMan->_disableFl) { int vbobIdx = dataP[5]; vbobFrameIndex = dataP[6]; int moveChange = dataP[7]; int vbobPosX = READ_LE_INT16(dataP + 8); int vbobPosY = READ_LE_INT16(dataP + 10); if (vbobIdx == 52) { - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, vbobPosX, READ_LE_INT16(dataP + 10), vbobFrameIndex); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, vbobPosX, READ_LE_INT16(dataP + 10), vbobFrameIndex); } else if (vbobIdx == 51) { - _vm->_objectsManager->quickDisplayBobSprite(vbobFrameIndex); + _vm->_objectsMan->quickDisplayBobSprite(vbobFrameIndex); } else if (vbobIdx != 50) { - _vm->_objectsManager->initVbob(_vm->_globals->_levelSpriteBuf, vbobIdx, vbobPosX, vbobPosY, vbobFrameIndex); + _vm->_objectsMan->initVbob(_vm->_globals->_levelSpriteBuf, vbobIdx, vbobPosX, vbobPosY, vbobFrameIndex); if (moveChange) moveChange /= _vm->_globals->_speed; if (moveChange > 1) { @@ -193,7 +193,7 @@ int ScriptManager::handleOpcode(byte *dataP) { return -1; // Exiting game --moveChange; - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } while (moveChange); } } @@ -201,36 +201,36 @@ int ScriptManager::handleOpcode(byte *dataP) { opcodeType = 1; break; case MKTAG24('S', 'T', 'P'): - if (!_vm->_objectsManager->_disableFl) { - _vm->_objectsManager->_twoCharactersFl = false; - _vm->_objectsManager->_characterPos.x = READ_LE_INT16(dataP + 6); - _vm->_objectsManager->_characterPos.y = READ_LE_INT16(dataP + 8); - _vm->_objectsManager->_startSpriteIndex = dataP[5]; - if (_vm->_objectsManager->_changeHeadFl) { + if (!_vm->_objectsMan->_disableFl) { + _vm->_objectsMan->_twoCharactersFl = false; + _vm->_objectsMan->_characterPos.x = READ_LE_INT16(dataP + 6); + _vm->_objectsMan->_characterPos.y = READ_LE_INT16(dataP + 8); + _vm->_objectsMan->_startSpriteIndex = dataP[5]; + if (_vm->_objectsMan->_changeHeadFl) { if (_vm->_globals->_saveData->_data[svField354] == 1 && _vm->_globals->_saveData->_cloneHopkins._pos.x && _vm->_globals->_saveData->_cloneHopkins._pos.y && _vm->_globals->_saveData->_cloneHopkins._startSpriteIndex && _vm->_globals->_saveData->_cloneHopkins._location) { - _vm->_objectsManager->_characterPos = _vm->_globals->_saveData->_cloneHopkins._pos; - _vm->_objectsManager->_startSpriteIndex = _vm->_globals->_saveData->_cloneHopkins._startSpriteIndex; + _vm->_objectsMan->_characterPos = _vm->_globals->_saveData->_cloneHopkins._pos; + _vm->_objectsMan->_startSpriteIndex = _vm->_globals->_saveData->_cloneHopkins._startSpriteIndex; } if (_vm->_globals->_saveData->_data[svField356] == 1 && _vm->_globals->_saveData->_samantha._pos.x && _vm->_globals->_saveData->_samantha._pos.y && _vm->_globals->_saveData->_samantha._startSpriteIndex && _vm->_globals->_saveData->_samantha._location) { - _vm->_objectsManager->_characterPos = _vm->_globals->_saveData->_samantha._pos; - _vm->_objectsManager->_startSpriteIndex = _vm->_globals->_saveData->_samantha._startSpriteIndex; + _vm->_objectsMan->_characterPos = _vm->_globals->_saveData->_samantha._pos; + _vm->_objectsMan->_startSpriteIndex = _vm->_globals->_saveData->_samantha._startSpriteIndex; } if (_vm->_globals->_saveData->_data[svField357] == 1 && _vm->_globals->_saveData->_realHopkins._pos.x && _vm->_globals->_saveData->_realHopkins._pos.y && _vm->_globals->_saveData->_realHopkins._startSpriteIndex && _vm->_globals->_saveData->_realHopkins._location) { - _vm->_objectsManager->_characterPos = _vm->_globals->_saveData->_realHopkins._pos; - _vm->_objectsManager->_startSpriteIndex = _vm->_globals->_saveData->_realHopkins._startSpriteIndex; + _vm->_objectsMan->_characterPos = _vm->_globals->_saveData->_realHopkins._pos; + _vm->_objectsMan->_startSpriteIndex = _vm->_globals->_saveData->_realHopkins._startSpriteIndex; } } if (_vm->_globals->_saveData->_data[svField356] == 1 && _vm->_globals->_saveData->_realHopkins._location == _vm->_globals->_screenId) { - _vm->_objectsManager->addStaticSprite( - _vm->_objectsManager->_headSprites, + _vm->_objectsMan->addStaticSprite( + _vm->_objectsMan->_headSprites, _vm->_globals->_saveData->_realHopkins._pos, 1, 2, @@ -238,14 +238,14 @@ int ScriptManager::handleOpcode(byte *dataP) { false, 34, 190); - _vm->_objectsManager->animateSprite(1); - _vm->_objectsManager->_twoCharactersFl = true; + _vm->_objectsMan->animateSprite(1); + _vm->_objectsMan->_twoCharactersFl = true; } if (_vm->_globals->_saveData->_data[svField357] == 1 && _vm->_globals->_saveData->_data[svField355] == 1 && _vm->_globals->_saveData->_samantha._location == _vm->_globals->_screenId) { - _vm->_objectsManager->addStaticSprite( - _vm->_objectsManager->_headSprites, + _vm->_objectsMan->addStaticSprite( + _vm->_objectsMan->_headSprites, _vm->_globals->_saveData->_samantha._pos, 1, 3, @@ -253,15 +253,15 @@ int ScriptManager::handleOpcode(byte *dataP) { false, 20, 127); - _vm->_objectsManager->animateSprite(1); - _vm->_objectsManager->_twoCharactersFl = true; + _vm->_objectsMan->animateSprite(1); + _vm->_objectsMan->_twoCharactersFl = true; } } opcodeType = 1; - _vm->_objectsManager->_changeHeadFl = false; + _vm->_objectsMan->_changeHeadFl = false; break; case MKTAG24('S', 'T', 'E'): - if (!_vm->_objectsManager->_disableFl) { + if (!_vm->_objectsMan->_disableFl) { _vm->_globals->_prevScreenId = _vm->_globals->_screenId; _vm->_globals->_saveData->_data[svLastPrevScreenId] = _vm->_globals->_screenId; _vm->_globals->_screenId = _vm->_globals->_saveData->_data[svLastScreenId] = dataP[5]; @@ -270,8 +270,8 @@ int ScriptManager::handleOpcode(byte *dataP) { opcodeType = 1; break; case MKTAG24('B', 'O', 'F'): - if (!_vm->_objectsManager->_disableFl) - _vm->_objectsManager->disableVbob(READ_LE_INT16(dataP + 5)); + if (!_vm->_objectsMan->_disableFl) + _vm->_objectsMan->disableVbob(READ_LE_INT16(dataP + 5)); opcodeType = 1; break; case MKTAG24('P', 'E', 'R'): { @@ -283,172 +283,172 @@ int ScriptManager::handleOpcode(byte *dataP) { case 1: case 14: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(4); + _vm->_objectsMan->doActionBack(4); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(4); + _vm->_objectsMan->doActionRight(4); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(4); + _vm->_objectsMan->doActionDiagRight(4); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(4); + _vm->_objectsMan->doActionFront(4); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(4); + _vm->_objectsMan->doActionDiagLeft(4); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(4); + _vm->_objectsMan->doActionLeft(4); break; case 2: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(7); + _vm->_objectsMan->doActionBack(7); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(7); + _vm->_objectsMan->doActionRight(7); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(7); + _vm->_objectsMan->doActionDiagRight(7); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(7); + _vm->_objectsMan->doActionFront(7); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(7); + _vm->_objectsMan->doActionDiagLeft(7); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(7); + _vm->_objectsMan->doActionLeft(7); if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(8); + _vm->_objectsMan->doActionBack(8); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(8); + _vm->_objectsMan->doActionRight(8); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(8); + _vm->_objectsMan->doActionDiagRight(8); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(8); + _vm->_objectsMan->doActionFront(8); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(8); + _vm->_objectsMan->doActionDiagLeft(8); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(8); + _vm->_objectsMan->doActionLeft(8); break; case 19: case 4: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(1); + _vm->_objectsMan->doActionBack(1); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(1); + _vm->_objectsMan->doActionRight(1); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(1); + _vm->_objectsMan->doActionDiagRight(1); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(1); + _vm->_objectsMan->doActionFront(1); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(1); + _vm->_objectsMan->doActionDiagLeft(1); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(1); + _vm->_objectsMan->doActionLeft(1); break; case 5: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(5); + _vm->_objectsMan->doActionBack(5); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(5); + _vm->_objectsMan->doActionRight(5); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(5); + _vm->_objectsMan->doActionDiagRight(5); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(5); + _vm->_objectsMan->doActionFront(5); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(5); + _vm->_objectsMan->doActionDiagLeft(5); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(5); + _vm->_objectsMan->doActionLeft(5); if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(6); + _vm->_objectsMan->doActionBack(6); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(6); + _vm->_objectsMan->doActionRight(6); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(6); + _vm->_objectsMan->doActionDiagRight(6); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(6); + _vm->_objectsMan->doActionFront(6); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(6); + _vm->_objectsMan->doActionDiagLeft(6); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(6); + _vm->_objectsMan->doActionLeft(6); break; case 17: case 7: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(2); + _vm->_objectsMan->doActionBack(2); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(2); + _vm->_objectsMan->doActionRight(2); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(2); + _vm->_objectsMan->doActionDiagRight(2); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(2); + _vm->_objectsMan->doActionFront(2); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(2); + _vm->_objectsMan->doActionDiagLeft(2); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(2); + _vm->_objectsMan->doActionLeft(2); break; case 18: case 8: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(3); + _vm->_objectsMan->doActionBack(3); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(3); + _vm->_objectsMan->doActionRight(3); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(3); + _vm->_objectsMan->doActionDiagRight(3); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(3); + _vm->_objectsMan->doActionFront(3); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(3); + _vm->_objectsMan->doActionDiagLeft(3); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(3); + _vm->_objectsMan->doActionLeft(3); break; case 9: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(5); + _vm->_objectsMan->doActionBack(5); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(5); + _vm->_objectsMan->doActionRight(5); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(5); + _vm->_objectsMan->doActionDiagRight(5); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(5); + _vm->_objectsMan->doActionFront(5); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(5); + _vm->_objectsMan->doActionDiagLeft(5); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(5); + _vm->_objectsMan->doActionLeft(5); break; case 10: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(6); + _vm->_objectsMan->doActionBack(6); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(6); + _vm->_objectsMan->doActionRight(6); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(6); + _vm->_objectsMan->doActionDiagRight(6); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(6); + _vm->_objectsMan->doActionFront(6); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(6); + _vm->_objectsMan->doActionDiagLeft(6); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(6); + _vm->_objectsMan->doActionLeft(6); break; case 15: case 11: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(7); + _vm->_objectsMan->doActionBack(7); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(7); + _vm->_objectsMan->doActionRight(7); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(7); + _vm->_objectsMan->doActionDiagRight(7); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(7); + _vm->_objectsMan->doActionFront(7); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(7); + _vm->_objectsMan->doActionDiagLeft(7); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(7); + _vm->_objectsMan->doActionLeft(7); break; case 16: case 12: if (_vm->_globals->_actionDirection == DIR_UP) - _vm->_objectsManager->doActionBack(8); + _vm->_objectsMan->doActionBack(8); if (_vm->_globals->_actionDirection == DIR_RIGHT) - _vm->_objectsManager->doActionRight(8); + _vm->_objectsMan->doActionRight(8); if (_vm->_globals->_actionDirection == DIR_UP_RIGHT) - _vm->_objectsManager->doActionDiagRight(8); + _vm->_objectsMan->doActionDiagRight(8); if (_vm->_globals->_actionDirection == DIR_DOWN) - _vm->_objectsManager->doActionFront(8); + _vm->_objectsMan->doActionFront(8); if (_vm->_globals->_actionDirection == DIR_UP_LEFT) - _vm->_objectsManager->doActionDiagLeft(8); + _vm->_objectsMan->doActionDiagLeft(8); if (_vm->_globals->_actionDirection == DIR_LEFT) - _vm->_objectsManager->doActionLeft(8); + _vm->_objectsMan->doActionLeft(8); break; } } @@ -466,28 +466,28 @@ int ScriptManager::handleOpcode(byte *dataP) { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } opcodeType = 1; break; } case MKTAG24('O', 'B', 'P'): opcodeType = 1; - _vm->_objectsManager->addObject(READ_LE_INT16(dataP + 5)); + _vm->_objectsMan->addObject(READ_LE_INT16(dataP + 5)); break; case MKTAG24('O', 'B', 'M'): opcodeType = 1; - _vm->_objectsManager->removeObject(READ_LE_INT16(dataP + 5)); + _vm->_objectsMan->removeObject(READ_LE_INT16(dataP + 5)); break; case MKTAG24('G', 'O', 'T'): opcodeType = 2; break; case MKTAG24('Z', 'O', 'N'): - _vm->_linesManager->enableZone(READ_LE_INT16(dataP + 5)); + _vm->_linesMan->enableZone(READ_LE_INT16(dataP + 5)); opcodeType = 1; break; case MKTAG24('Z', 'O', 'F'): - _vm->_linesManager->disableZone(READ_LE_INT16(dataP + 5)); + _vm->_linesMan->disableZone(READ_LE_INT16(dataP + 5)); opcodeType = 1; break; case MKTAG24('E', 'X', 'I'): @@ -498,192 +498,192 @@ int ScriptManager::handleOpcode(byte *dataP) { opcodeType = 5; break; case MKTAG24('B', 'C', 'A'): - _vm->_objectsManager->disableHidingItem(READ_LE_INT16(dataP + 5)); + _vm->_objectsMan->disableHidingItem(READ_LE_INT16(dataP + 5)); opcodeType = 1; break; case MKTAG24('A', 'N', 'I'): { int animId = READ_LE_INT16(dataP + 5); if (animId <= 100) - _vm->_objectsManager->setBobAnimation(animId); + _vm->_objectsMan->setBobAnimation(animId); else - _vm->_objectsManager->stopBobAnimation(animId - 100); + _vm->_objectsMan->stopBobAnimation(animId - 100); opcodeType = 1; break; } case MKTAG24('S', 'P', 'E'): switch (READ_LE_INT16(dataP + 5)) { case 6: - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setAndPlayAnim(20, 0, 14, true); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setAndPlayAnim(20, 0, 14, true); break; case 7: - _vm->_talkManager->startAnimatedCharacterDialogue("rueh1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("rueh1.pe2"); break; case 8: - _vm->_talkManager->startAnimatedCharacterDialogue("ruef1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("ruef1.pe2"); break; case 10: - _vm->_talkManager->startAnimatedCharacterDialogue("bqeflic1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("bqeflic1.pe2"); break; case 11: - _vm->_talkManager->startAnimatedCharacterDialogue("bqeflic2.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("bqeflic2.pe2"); break; case 12: - _vm->_fontManager->hideText(9); - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_talkManager->startAnimatedCharacterDialogue("bqetueur.pe2"); + _vm->_fontMan->hideText(9); + _vm->_events->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); + _vm->_talkMan->startAnimatedCharacterDialogue("bqetueur.pe2"); break; case 13: - _vm->_eventsManager->_mouseButton = _vm->_eventsManager->_curMouseButton; + _vm->_events->_mouseButton = _vm->_events->_curMouseButton; _vm->_globals->_disableInventFl = true; - _vm->_graphicsManager->fadeOutLong(); - _vm->_objectsManager->disableHidingBehavior(); - _vm->_objectsManager->removeSprite(0); - _vm->_fontManager->hideText(5); - _vm->_fontManager->hideText(9); - _vm->_graphicsManager->endDisplayBob(); - _vm->_objectsManager->clearScreen(); + _vm->_graphicsMan->fadeOutLong(); + _vm->_objectsMan->disableHidingBehavior(); + _vm->_objectsMan->removeSprite(0); + _vm->_fontMan->hideText(5); + _vm->_fontMan->hideText(9); + _vm->_graphicsMan->endDisplayBob(); + _vm->_objectsMan->clearScreen(); if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo()) { - _vm->_graphicsManager->fadeOutLong(); + _vm->_graphicsMan->fadeOutLong(); } else { - _vm->_soundManager->playSoundFile("SOUND17.WAV"); - _vm->_graphicsManager->_fadingFl = true; - _vm->_animationManager->playSequence2("HELICO.SEQ", 10, 4, 10); + _vm->_soundMan->playSoundFile("SOUND17.WAV"); + _vm->_graphicsMan->_fadingFl = true; + _vm->_animMan->playSequence2("HELICO.SEQ", 10, 4, 10); } - _vm->_animationManager->loadAnim("otage"); - _vm->_graphicsManager->loadImage("IM05"); - _vm->_graphicsManager->displayAllBob(); + _vm->_animMan->loadAnim("otage"); + _vm->_graphicsMan->loadImage("IM05"); + _vm->_graphicsMan->displayAllBob(); for (int i = 0; i <= 4; i++) { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } - _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager->fadeInDefaultLength(_vm->_graphicsManager->_frontBuffer); + _vm->_events->mouseOff(); + _vm->_graphicsMan->fadeInDefaultLength(_vm->_graphicsMan->_frontBuffer); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(3) != 100); - _vm->_graphicsManager->fadeOutDefaultLength(_vm->_graphicsManager->_frontBuffer); - _vm->_graphicsManager->endDisplayBob(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(3) != 100); + _vm->_graphicsMan->fadeOutDefaultLength(_vm->_graphicsMan->_frontBuffer); + _vm->_graphicsMan->endDisplayBob(); // If uncensored, rip the throat of the hostage if (!_vm->_globals->_censorshipFl) { - _vm->_soundManager->_specialSoundNum = 16; - _vm->_graphicsManager->_fadingFl = true; - _vm->_animationManager->playAnim("EGORGE.ANM", 50, 28, 500); - _vm->_soundManager->_specialSoundNum = 0; + _vm->_soundMan->_specialSoundNum = 16; + _vm->_graphicsMan->_fadingFl = true; + _vm->_animMan->playAnim("EGORGE.ANM", 50, 28, 500); + _vm->_soundMan->_specialSoundNum = 0; } - _vm->_animationManager->loadAnim("ASCEN"); - _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager->loadImage("ASCEN"); - _vm->_graphicsManager->displayAllBob(); + _vm->_animMan->loadAnim("ASCEN"); + _vm->_events->mouseOff(); + _vm->_graphicsMan->loadImage("ASCEN"); + _vm->_graphicsMan->displayAllBob(); for (int i = 0; i <= 4; i++) { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } - _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager->fadeInDefaultLength(_vm->_graphicsManager->_frontBuffer); - _vm->_objectsManager->checkEventBobAnim(1, 0, 17, 3); - _vm->_graphicsManager->fadeOutDefaultLength(_vm->_graphicsManager->_frontBuffer); - _vm->_graphicsManager->endDisplayBob(); + _vm->_events->mouseOff(); + _vm->_graphicsMan->fadeInDefaultLength(_vm->_graphicsMan->_frontBuffer); + _vm->_objectsMan->checkEventBobAnim(1, 0, 17, 3); + _vm->_graphicsMan->fadeOutDefaultLength(_vm->_graphicsMan->_frontBuffer); + _vm->_graphicsMan->endDisplayBob(); if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo()) - _vm->_soundManager->playSoundFile("SOUND17.WAV"); + _vm->_soundMan->playSoundFile("SOUND17.WAV"); - _vm->_soundManager->_specialSoundNum = 14; - _vm->_graphicsManager->_fadingFl = true; - _vm->_animationManager->playSequence2("ASSOM.SEQ", 10, 4, 500); - _vm->_soundManager->_specialSoundNum = 0; + _vm->_soundMan->_specialSoundNum = 14; + _vm->_graphicsMan->_fadingFl = true; + _vm->_animMan->playSequence2("ASSOM.SEQ", 10, 4, 500); + _vm->_soundMan->_specialSoundNum = 0; if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo()) - _vm->_graphicsManager->fadeOutLong(); + _vm->_graphicsMan->fadeOutLong(); _vm->_globals->_disableInventFl = false; - _vm->_objectsManager->_helicopterFl = true; + _vm->_objectsMan->_helicopterFl = true; break; case 16: - _vm->_talkManager->startAnimatedCharacterDialogue("ftoubib.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("ftoubib.pe2"); break; case 17: - _vm->_talkManager->startAnimatedCharacterDialogue("flic2b.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("flic2b.pe2"); break; case 18: - _vm->_talkManager->startAnimatedCharacterDialogue("fjour.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("fjour.pe2"); break; case 20: - _vm->_talkManager->startAnimatedCharacterDialogue("PUNK.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("PUNK.pe2"); break; case 21: - _vm->_talkManager->startAnimatedCharacterDialogue("MEDLEG.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("MEDLEG.pe2"); break; case 22: - _vm->_talkManager->animateObject("CADAVRE1.pe2"); + _vm->_talkMan->animateObject("CADAVRE1.pe2"); break; case 23: - _vm->_talkManager->startStaticCharacterDialogue("CHERCHE1.pe2"); + _vm->_talkMan->startStaticCharacterDialogue("CHERCHE1.pe2"); break; case 25: - _vm->_talkManager->startAnimatedCharacterDialogue("AGENT1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("AGENT1.pe2"); break; case 26: - _vm->_talkManager->startAnimatedCharacterDialogue("AGENT2.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("AGENT2.pe2"); break; case 27: if (_vm->_globals->_saveData->_data[svField94] != 1 || _vm->_globals->_saveData->_data[svField95] != 1) - _vm->_talkManager->startAnimatedCharacterDialogue("STANDAR.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("STANDAR.pe2"); else - _vm->_talkManager->startAnimatedCharacterDialogue("STANDAR1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("STANDAR1.pe2"); break; case 29: _vm->_globals->_disableInventFl = true; - _vm->_talkManager->animateObject("TELEP.pe2"); + _vm->_talkMan->animateObject("TELEP.pe2"); _vm->_globals->_disableInventFl = false; break; case 32: - _vm->_talkManager->startAnimatedCharacterDialogue("SAMAN.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("SAMAN.pe2"); break; case 35: - if (!_vm->_soundManager->_soundOffFl) { + if (!_vm->_soundMan->_soundOffFl) { do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_soundManager->_soundFl); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_soundMan->_soundFl); } - _vm->_talkManager->startAnimatedCharacterDialogue("PTLAB.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("PTLAB.pe2"); break; case 36: @@ -692,20 +692,20 @@ int ScriptManager::handleOpcode(byte *dataP) { switch (_vm->_globals->_saveData->_data[svField270]) { case 0: - _vm->_talkManager->startStaticCharacterDialogue("PATRON0.pe2"); + _vm->_talkMan->startStaticCharacterDialogue("PATRON0.pe2"); break; case 1: - _vm->_talkManager->startStaticCharacterDialogue("PATRON1.pe2"); + _vm->_talkMan->startStaticCharacterDialogue("PATRON1.pe2"); break; case 2: - _vm->_talkManager->startStaticCharacterDialogue("PATRON2.pe2"); + _vm->_talkMan->startStaticCharacterDialogue("PATRON2.pe2"); break; case 3: - _vm->_talkManager->startStaticCharacterDialogue("PATRON3.pe2"); + _vm->_talkMan->startStaticCharacterDialogue("PATRON3.pe2"); break; default: if (_vm->_globals->_saveData->_data[svField270] > 3) { - _vm->_talkManager->startStaticCharacterDialogue("PATRON4.pe2"); + _vm->_talkMan->startStaticCharacterDialogue("PATRON4.pe2"); _vm->_globals->_saveData->_data[svField270] = 5; } break; @@ -713,78 +713,78 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 37: - _vm->_graphicsManager->_fadingFl = true; - _vm->_animationManager->playSequence2("corde.SEQ", 32, 32, 100); - _vm->_graphicsManager->_noFadingFl = true; + _vm->_graphicsMan->_fadingFl = true; + _vm->_animMan->playSequence2("corde.SEQ", 32, 32, 100); + _vm->_graphicsMan->_noFadingFl = true; break; case 38: - _vm->_soundManager->loadSample(1, "SOUND44.WAV"); - _vm->_soundManager->loadSample(2, "SOUND42.WAV"); - _vm->_soundManager->loadSample(3, "SOUND41.WAV"); - _vm->_soundManager->_specialSoundNum = 17; - _vm->_animationManager->playSequence("grenade.SEQ", 1, 32, 100, false, false); - _vm->_soundManager->_specialSoundNum = 0; - _vm->_graphicsManager->_fadingFl = true; - _vm->_animationManager->playAnim("CREVE17.ANM", 24, 24, 200); - _vm->_soundManager->removeSample(1); - _vm->_soundManager->removeSample(2); - _vm->_soundManager->removeSample(3); - _vm->_graphicsManager->_noFadingFl = true; + _vm->_soundMan->loadSample(1, "SOUND44.WAV"); + _vm->_soundMan->loadSample(2, "SOUND42.WAV"); + _vm->_soundMan->loadSample(3, "SOUND41.WAV"); + _vm->_soundMan->_specialSoundNum = 17; + _vm->_animMan->playSequence("grenade.SEQ", 1, 32, 100, false, false); + _vm->_soundMan->_specialSoundNum = 0; + _vm->_graphicsMan->_fadingFl = true; + _vm->_animMan->playAnim("CREVE17.ANM", 24, 24, 200); + _vm->_soundMan->removeSample(1); + _vm->_soundMan->removeSample(2); + _vm->_soundMan->removeSample(3); + _vm->_graphicsMan->_noFadingFl = true; break; case 40: - _vm->_talkManager->startAnimatedCharacterDialogue("MAGE.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("MAGE.pe2"); break; case 41: - _vm->_talkManager->startAnimatedCharacterDialogue("MORT3.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("MORT3.pe2"); break; case 42: - _vm->_talkManager->startAnimatedCharacterDialogue("MORT2.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("MORT2.pe2"); break; case 43: - _vm->_talkManager->startAnimatedCharacterDialogue("MORT1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("MORT1.pe2"); break; case 44: - _vm->_talkManager->startAnimatedCharacterDialogue("MORT3A.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("MORT3A.pe2"); break; case 45: - _vm->_talkManager->startAnimatedCharacterDialogue("FEM3.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("FEM3.pe2"); break; case 46: { _vm->_globals->_checkDistanceFl = true; - _vm->_linesManager->_route = (RouteItem *)NULL; - _vm->_linesManager->_route = _vm->_linesManager->findRoute(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 564, 420); - _vm->_objectsManager->_zoneNum = -1; + _vm->_linesMan->_route = (RouteItem *)NULL; + _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 564, 420); + _vm->_objectsMan->_zoneNum = -1; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager->GOHOME(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_linesManager->_route != (RouteItem *)NULL); - _vm->_objectsManager->removeSprite(0); + _vm->_objectsMan->GOHOME(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_linesMan->_route != (RouteItem *)NULL); + _vm->_objectsMan->removeSprite(0); _vm->_globals->_checkDistanceFl = true; - _vm->_soundManager->loadSample(1, "SOUND44.WAV"); - _vm->_soundManager->loadSample(2, "SOUND45.WAV"); - _vm->_objectsManager->setMultiBobAnim(9, 10, 0, 0); + _vm->_soundMan->loadSample(1, "SOUND44.WAV"); + _vm->_soundMan->loadSample(2, "SOUND45.WAV"); + _vm->_objectsMan->setMultiBobAnim(9, 10, 0, 0); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(9)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(9)) { case 4: case 16: case 28: if (!playFl) { - _vm->_soundManager->playSample(1); + _vm->_soundMan->playSample(1); playFl = true; } break; @@ -795,12 +795,12 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } - switch (_vm->_objectsManager->getBobAnimDataIdx(10)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(10)) { case 10: case 22: case 33: if (!playFl) { - _vm->_soundManager->playSample(2); + _vm->_soundMan->playSample(2); playFl = true; } break; @@ -808,41 +808,41 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; case 12: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 249, 1); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 249, 1); break; case 23: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 249, 2); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 249, 2); playFl = false; break; case 34: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 249, 3); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 249, 3); playFl = false; break; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(9) == 36) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(9) == 36) break; } - _vm->_objectsManager->animateSprite(0); - _vm->_objectsManager->stopBobAnimation(9); - _vm->_objectsManager->stopBobAnimation(10); - _vm->_soundManager->removeSample(1); - _vm->_soundManager->removeSample(2); + _vm->_objectsMan->animateSprite(0); + _vm->_objectsMan->stopBobAnimation(9); + _vm->_objectsMan->stopBobAnimation(10); + _vm->_soundMan->removeSample(1); + _vm->_soundMan->removeSample(2); break; } case 47: - _vm->_talkManager->startAnimatedCharacterDialogue("BARMAN.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("BARMAN.pe2"); break; case 48: - _vm->_talkManager->startAnimatedCharacterDialogue("SAMAN2.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("SAMAN2.pe2"); break; case 49: { - _vm->_objectsManager->disableHidingBehavior(); - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setMultiBobAnim(9, 10, 0, 0); + _vm->_objectsMan->disableHidingBehavior(); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setMultiBobAnim(9, 10, 0, 0); int endIdx; if (_vm->_globals->_saveData->_data[svField133] == 1) @@ -854,11 +854,11 @@ int ScriptManager::handleOpcode(byte *dataP) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(9)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(9)) { case 4: case 18: if (!playFl) { - _vm->_soundManager->directPlayWav("SOUND44.WAV"); + _vm->_soundMan->directPlayWav("SOUND44.WAV"); playFl = true; } break; @@ -868,10 +868,10 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } - switch (_vm->_objectsManager->getBobAnimDataIdx(10)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(10)) { case 11: if (!playFl) { - _vm->_soundManager->directPlayWav("SOUND45.WAV"); + _vm->_soundMan->directPlayWav("SOUND45.WAV"); playFl = true; } break; @@ -879,101 +879,101 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(9) == endIdx) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(9) == endIdx) break; } if (endIdx == 12) { - _vm->_objectsManager->animateSprite(0); - _vm->_objectsManager->stopBobAnimation(9); + _vm->_objectsMan->animateSprite(0); + _vm->_objectsMan->stopBobAnimation(9); } - _vm->_objectsManager->enableHidingBehavior(); + _vm->_objectsMan->enableHidingBehavior(); break; } case 50: - _vm->_soundManager->playSoundFile("SOUND46.WAv"); - _vm->_objectsManager->setAndPlayAnim(11, 0, 23, false); + _vm->_soundMan->playSoundFile("SOUND46.WAv"); + _vm->_objectsMan->setAndPlayAnim(11, 0, 23, false); break; case 51: { - _vm->_graphicsManager->fadeOutLong(); - _vm->_objectsManager->disableHidingBehavior(); - _vm->_objectsManager->removeSprite(0); - _vm->_fontManager->hideText(5); - _vm->_fontManager->hideText(9); - _vm->_graphicsManager->endDisplayBob(); - _vm->_graphicsManager->loadImage("IM20f"); - _vm->_animationManager->loadAnim("ANIM20f"); - _vm->_graphicsManager->displayAllBob(); - _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager->fadeInLong(); - _vm->_soundManager->loadWav("SOUND46.WAV", 1); + _vm->_graphicsMan->fadeOutLong(); + _vm->_objectsMan->disableHidingBehavior(); + _vm->_objectsMan->removeSprite(0); + _vm->_fontMan->hideText(5); + _vm->_fontMan->hideText(9); + _vm->_graphicsMan->endDisplayBob(); + _vm->_graphicsMan->loadImage("IM20f"); + _vm->_animMan->loadAnim("ANIM20f"); + _vm->_graphicsMan->displayAllBob(); + _vm->_events->mouseOff(); + _vm->_graphicsMan->fadeInLong(); + _vm->_soundMan->loadWav("SOUND46.WAV", 1); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - if (_vm->_objectsManager->getBobAnimDataIdx(12) == 5 && !playFl) { - _vm->_soundManager->playWav(1); + if (_vm->_objectsMan->getBobAnimDataIdx(12) == 5 && !playFl) { + _vm->_soundMan->playWav(1); playFl = true; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(12) == 34) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(12) == 34) break; } - _vm->_objectsManager->stopBobAnimation(2); - _vm->_graphicsManager->fadeOutLong(); - _vm->_graphicsManager->_noFadingFl = true; + _vm->_objectsMan->stopBobAnimation(2); + _vm->_graphicsMan->fadeOutLong(); + _vm->_graphicsMan->_noFadingFl = true; _vm->_globals->_exitId = 20; break; } case 52: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("GARDE.PE2"); + _vm->_talkMan->startAnimatedCharacterDialogue("GARDE.PE2"); _vm->_globals->_introSpeechOffFl = false; break; case 53: - _vm->_talkManager->startAnimatedCharacterDialogue("GARDE1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("GARDE1.pe2"); break; case 54: - _vm->_talkManager->startAnimatedCharacterDialogue("GARDE2.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("GARDE2.pe2"); break; case 55: - _vm->_objectsManager->stopBobAnimation(1); - _vm->_objectsManager->setAndPlayAnim(15, 0, 12, false); - _vm->_objectsManager->stopBobAnimation(15); - _vm->_objectsManager->loadLinkFile("IM19a", true); + _vm->_objectsMan->stopBobAnimation(1); + _vm->_objectsMan->setAndPlayAnim(15, 0, 12, false); + _vm->_objectsMan->stopBobAnimation(15); + _vm->_objectsMan->loadLinkFile("IM19a", true); break; case 56: - _vm->_globals->_characterSpriteBuf = _vm->_fileManager->loadFile("HOPFEM.SPR"); + _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("HOPFEM.SPR"); _vm->_globals->_characterType = 1; _vm->_globals->_saveData->_data[svAlternateSpriteFl] = 1; _vm->_globals->loadCharacterData(); - _vm->_objectsManager->_sprite[0]._deltaX = 28; - _vm->_objectsManager->_sprite[0]._deltaY = 155; - _vm->_objectsManager->computeAndSetSpriteSize(); + _vm->_objectsMan->_sprite[0]._deltaX = 28; + _vm->_objectsMan->_sprite[0]._deltaY = 155; + _vm->_objectsMan->computeAndSetSpriteSize(); break; case 57: - _vm->_globals->_characterSpriteBuf = _vm->_fileManager->loadFile("PERSO.SPR"); + _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PERSO.SPR"); _vm->_globals->_characterType = 0; _vm->_globals->_saveData->_data[svAlternateSpriteFl] = 0; _vm->_globals->loadCharacterData(); - _vm->_objectsManager->_sprite[0]._deltaX = 34; - _vm->_objectsManager->_sprite[0]._deltaY = 190; - _vm->_objectsManager->computeAndSetSpriteSize(); + _vm->_objectsMan->_sprite[0]._deltaX = 34; + _vm->_objectsMan->_sprite[0]._deltaY = 190; + _vm->_objectsMan->computeAndSetSpriteSize(); break; case 58: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("Gm1.PE2"); + _vm->_talkMan->startAnimatedCharacterDialogue("Gm1.PE2"); _vm->_globals->_saveData->_data[svField176] = 1; _vm->_globals->_saveData->_data[svField270] = 2; _vm->_globals->_introSpeechOffFl = false; @@ -981,33 +981,33 @@ int ScriptManager::handleOpcode(byte *dataP) { case 59: { _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0); - _vm->_objectsManager->resetOldDirection(); - _vm->_objectsManager->resetHomeRateCounter(); - _vm->_linesManager->_route = (RouteItem *)NULL; - _vm->_linesManager->_route = _vm->_linesManager->findRoute(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 445, 332); + _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0); + _vm->_objectsMan->resetOldDirection(); + _vm->_objectsMan->resetHomeRateCounter(); + _vm->_linesMan->_route = (RouteItem *)NULL; + _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 445, 332); _vm->_globals->_checkDistanceFl = true; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager->GOHOME(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_linesManager->_route != (RouteItem *)NULL); - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setBobAnimation(7); - _vm->_objectsManager->setBobAnimDataIdx(7, 0); + _vm->_objectsMan->GOHOME(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_linesMan->_route != (RouteItem *)NULL); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setBobAnimation(7); + _vm->_objectsMan->setBobAnimDataIdx(7, 0); bool playFl = false; - _vm->_soundManager->loadSample(1, "SOUND40.WAV"); + _vm->_soundMan->loadSample(1, "SOUND40.WAV"); for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(7)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(7)) { case 10: case 18: if (!playFl) { - _vm->_soundManager->playSample(1); + _vm->_soundMan->playSample(1); playFl = true; } break; @@ -1015,48 +1015,48 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; case 19: - _vm->_objectsManager->setBobAnimation(3); + _vm->_objectsMan->setBobAnimation(3); playFl = false; break; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(3) == 48) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(3) == 48) break; } - _vm->_soundManager->removeSample(1); - _vm->_objectsManager->setSpriteIndex(0, 62); - _vm->_objectsManager->animateSprite(0); - _vm->_objectsManager->setBobAnimation(6); - _vm->_objectsManager->stopBobAnimation(7); - _vm->_objectsManager->stopBobAnimation(3); + _vm->_soundMan->removeSample(1); + _vm->_objectsMan->setSpriteIndex(0, 62); + _vm->_objectsMan->animateSprite(0); + _vm->_objectsMan->setBobAnimation(6); + _vm->_objectsMan->stopBobAnimation(7); + _vm->_objectsMan->stopBobAnimation(3); break; } case 62: - _vm->_talkManager->animateObject("SBCADA.pe2"); + _vm->_talkMan->animateObject("SBCADA.pe2"); break; case 65: - _vm->_talkManager->animateObject("ScCADA.pe2"); + _vm->_talkMan->animateObject("ScCADA.pe2"); break; case 80: { - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setBobAnimation(12); - _vm->_objectsManager->setBobAnimation(13); - _vm->_objectsManager->setBobAnimDataIdx(12, 0); - _vm->_objectsManager->setBobAnimDataIdx(13, 0); - _vm->_soundManager->loadWav("SOUND44.WAV", 1); - _vm->_soundManager->loadWav("SOUND71.WAV", 2); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setBobAnimation(12); + _vm->_objectsMan->setBobAnimation(13); + _vm->_objectsMan->setBobAnimDataIdx(12, 0); + _vm->_objectsMan->setBobAnimDataIdx(13, 0); + _vm->_soundMan->loadWav("SOUND44.WAV", 1); + _vm->_soundMan->loadWav("SOUND71.WAV", 2); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(12)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(12)) { case 4: if (!playFl) { - _vm->_soundManager->playWav(1); + _vm->_soundMan->playWav(1); playFl = true; } break; @@ -1065,10 +1065,10 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } - switch (_vm->_objectsManager->getBobAnimDataIdx(4)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(4)) { case 5: if (!playFl) { - _vm->_soundManager->playWav(2); + _vm->_soundMan->playWav(2); playFl = true; } case 6: @@ -1076,57 +1076,57 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } - if (_vm->_objectsManager->getBobAnimDataIdx(13) == 8) { - _vm->_objectsManager->stopBobAnimation(13); - _vm->_objectsManager->stopBobAnimation(3); - _vm->_objectsManager->setBobAnimation(4); - _vm->_objectsManager->setBobAnimDataIdx(4, 0); - _vm->_objectsManager->setBobAnimDataIdx(13, 0); + if (_vm->_objectsMan->getBobAnimDataIdx(13) == 8) { + _vm->_objectsMan->stopBobAnimation(13); + _vm->_objectsMan->stopBobAnimation(3); + _vm->_objectsMan->setBobAnimation(4); + _vm->_objectsMan->setBobAnimDataIdx(4, 0); + _vm->_objectsMan->setBobAnimDataIdx(13, 0); } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(4) == 16) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(4) == 16) break; } - _vm->_objectsManager->stopBobAnimation(12); - _vm->_objectsManager->stopBobAnimation(4); - _vm->_objectsManager->animateSprite(0); - _vm->_objectsManager->loadLinkFile("IM27a", true); + _vm->_objectsMan->stopBobAnimation(12); + _vm->_objectsMan->stopBobAnimation(4); + _vm->_objectsMan->animateSprite(0); + _vm->_objectsMan->loadLinkFile("IM27a", true); break; } case 81: { _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0); - _vm->_objectsManager->resetOldDirection(); - _vm->_objectsManager->resetHomeRateCounter(); - _vm->_linesManager->_route = (RouteItem *)NULL; - _vm->_linesManager->_route = _vm->_linesManager->findRoute(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 119, 268); + _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0); + _vm->_objectsMan->resetOldDirection(); + _vm->_objectsMan->resetHomeRateCounter(); + _vm->_linesMan->_route = (RouteItem *)NULL; + _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 119, 268); _vm->_globals->_checkDistanceFl = true; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager->GOHOME(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_linesManager->_route != (RouteItem *)NULL); - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setBobAnimation(11); - _vm->_objectsManager->setBobAnimation(8); - _vm->_objectsManager->setBobAnimDataIdx(11, 0); - _vm->_objectsManager->setBobAnimDataIdx(8, 0); - _vm->_soundManager->loadWav("SOUND44.WAV", 1); - _vm->_soundManager->loadWav("SOUND48.WAV", 2); - _vm->_soundManager->loadWav("SOUND49.WAV", 3); + _vm->_objectsMan->GOHOME(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_linesMan->_route != (RouteItem *)NULL); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setBobAnimation(11); + _vm->_objectsMan->setBobAnimation(8); + _vm->_objectsMan->setBobAnimDataIdx(11, 0); + _vm->_objectsMan->setBobAnimDataIdx(8, 0); + _vm->_soundMan->loadWav("SOUND44.WAV", 1); + _vm->_soundMan->loadWav("SOUND48.WAV", 2); + _vm->_soundMan->loadWav("SOUND49.WAV", 3); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(11)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(11)) { case 4: if (!playFl) { - _vm->_soundManager->playWav(1); + _vm->_soundMan->playWav(1); playFl = true; } break; @@ -1135,10 +1135,10 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } - switch (_vm->_objectsManager->getBobAnimDataIdx(8)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(8)) { case 11: if (!playFl) { - _vm->_soundManager->playWav(2); + _vm->_soundMan->playWav(2); playFl = true; } break; @@ -1147,93 +1147,93 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(8) == 32) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(8) == 32) break; } - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 201, 14, 1); - _vm->_objectsManager->animateSprite(0); - _vm->_objectsManager->stopBobAnimation(11); - _vm->_objectsManager->stopBobAnimation(8); - _vm->_objectsManager->setBobAnimation(5); - _vm->_objectsManager->setBobAnimation(6); - _vm->_objectsManager->setBobAnimDataIdx(5, 0); - _vm->_objectsManager->setBobAnimDataIdx(6, 0); - _vm->_soundManager->playWav(3); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 201, 14, 1); + _vm->_objectsMan->animateSprite(0); + _vm->_objectsMan->stopBobAnimation(11); + _vm->_objectsMan->stopBobAnimation(8); + _vm->_objectsMan->setBobAnimation(5); + _vm->_objectsMan->setBobAnimation(6); + _vm->_objectsMan->setBobAnimDataIdx(5, 0); + _vm->_objectsMan->setBobAnimDataIdx(6, 0); + _vm->_soundMan->playWav(3); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 74); - _vm->_objectsManager->stopBobAnimation(5); - _vm->_objectsManager->stopBobAnimation(6); - _vm->_objectsManager->setBobAnimation(9); - _vm->_objectsManager->setBobAnimation(7); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 74); + _vm->_objectsMan->stopBobAnimation(5); + _vm->_objectsMan->stopBobAnimation(6); + _vm->_objectsMan->setBobAnimation(9); + _vm->_objectsMan->setBobAnimation(7); break; } case 83: - _vm->_talkManager->startAnimatedCharacterDialogue("CVIGIL.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("CVIGIL.pe2"); break; case 84: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("CVIGIL1.PE2"); + _vm->_talkMan->startAnimatedCharacterDialogue("CVIGIL1.PE2"); _vm->_globals->_introSpeechOffFl = false; break; case 85: - _vm->_objectsManager->stopBobAnimation(3); - _vm->_objectsManager->setBobAnimation(5); - _vm->_objectsManager->setBobAnimDataIdx(5, 0); + _vm->_objectsMan->stopBobAnimation(3); + _vm->_objectsMan->setBobAnimation(5); + _vm->_objectsMan->setBobAnimDataIdx(5, 0); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 6); - _vm->_objectsManager->stopBobAnimation(5); - _vm->_objectsManager->setBobAnimation(6); - _vm->_objectsManager->loadLinkFile("IM24a", true); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 6); + _vm->_objectsMan->stopBobAnimation(5); + _vm->_objectsMan->setBobAnimation(6); + _vm->_objectsMan->loadLinkFile("IM24a", true); break; case 86: if (_vm->_globals->_saveData->_data[svField231] == 1) { - _vm->_talkManager->startAnimatedCharacterDialogue("chotess1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("chotess1.pe2"); } else { _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("chotesse.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("chotesse.pe2"); _vm->_globals->_introSpeechOffFl = false; } break; case 87: if (_vm->_globals->_saveData->_data[svField188]) - _vm->_talkManager->startAnimatedCharacterDialogue("stand2.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("stand2.pe2"); else - _vm->_talkManager->startAnimatedCharacterDialogue("stand1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("stand1.pe2"); break; case 88: if (_vm->_globals->_saveData->_data[svField183] == 1) { - _vm->_objectsManager->setBobAnimDataIdx(1, 0); - _vm->_objectsManager->setBobAnimDataIdx(2, 0); - _vm->_objectsManager->setBobAnimation(1); - _vm->_objectsManager->setBobAnimation(2); - _vm->_soundManager->loadSample(1, "SOUND40.WAV"); + _vm->_objectsMan->setBobAnimDataIdx(1, 0); + _vm->_objectsMan->setBobAnimDataIdx(2, 0); + _vm->_objectsMan->setBobAnimation(1); + _vm->_objectsMan->setBobAnimation(2); + _vm->_soundMan->loadSample(1, "SOUND40.WAV"); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(1)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(1)) { case 1: case 3: case 5: case 7: if (!playFl) { - _vm->_soundManager->playSample(1); + _vm->_soundMan->playSample(1); playFl = true; } break; @@ -1244,33 +1244,33 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(1) == 9) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(1) == 9) break; } - _vm->_objectsManager->stopBobAnimation(1); - _vm->_objectsManager->stopBobAnimation(2); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 160, 6); - _vm->_soundManager->removeSample(1); + _vm->_objectsMan->stopBobAnimation(1); + _vm->_objectsMan->stopBobAnimation(2); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 160, 6); + _vm->_soundMan->removeSample(1); } if (_vm->_globals->_saveData->_data[svField183] == 2) { - _vm->_objectsManager->setBobAnimDataIdx(1, 0); - _vm->_objectsManager->setBobAnimDataIdx(3, 0); - _vm->_objectsManager->setBobAnimation(1); - _vm->_objectsManager->setBobAnimation(3); - _vm->_soundManager->loadSample(1, "SOUND40.WAV"); + _vm->_objectsMan->setBobAnimDataIdx(1, 0); + _vm->_objectsMan->setBobAnimDataIdx(3, 0); + _vm->_objectsMan->setBobAnimation(1); + _vm->_objectsMan->setBobAnimation(3); + _vm->_soundMan->loadSample(1, "SOUND40.WAV"); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(1)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(1)) { case 1: case 3: case 5: case 7: if (!playFl) { - _vm->_soundManager->playSample(1); + _vm->_soundMan->playSample(1); playFl = true; } break; @@ -1281,151 +1281,151 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(1) == 9) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(1) == 9) break; } - _vm->_objectsManager->stopBobAnimation(1); - _vm->_objectsManager->stopBobAnimation(3); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 161, 8); - _vm->_soundManager->removeSample(1); + _vm->_objectsMan->stopBobAnimation(1); + _vm->_objectsMan->stopBobAnimation(3); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 161, 8); + _vm->_soundMan->removeSample(1); } break; case 90: - _vm->_soundManager->playSoundFile("SOUND52.WAV"); + _vm->_soundMan->playSoundFile("SOUND52.WAV"); if (!_vm->_globals->_saveData->_data[svField186]) { - _vm->_animationManager->playSequence("CIB5A.SEQ", 1, 12, 1, false, false); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0); + _vm->_animMan->playSequence("CIB5A.SEQ", 1, 12, 1, false, false); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0); } else if (_vm->_globals->_saveData->_data[svField186] == 1) { - _vm->_animationManager->playSequence("CIB5C.SEQ", 1, 12, 1, false, false); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 329, 87, 2); + _vm->_animMan->playSequence("CIB5C.SEQ", 1, 12, 1, false, false); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 329, 87, 2); } break; case 91: - _vm->_soundManager->playSoundFile("SOUND52.WAV"); + _vm->_soundMan->playSoundFile("SOUND52.WAV"); if (!_vm->_globals->_saveData->_data[svField186]) { - _vm->_animationManager->playSequence("CIB5B.SEQ", 1, 12, 1, false, false); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5); + _vm->_animMan->playSequence("CIB5B.SEQ", 1, 12, 1, false, false); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5); } else if (_vm->_globals->_saveData->_data[svField186] == 1) { - _vm->_animationManager->playSequence("CIB5D.SEQ", 1, 12, 1, false, false); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 160, 6); + _vm->_animMan->playSequence("CIB5D.SEQ", 1, 12, 1, false, false); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 160, 6); } break; case 92: - _vm->_soundManager->playSoundFile("SOUND52.WAV"); + _vm->_soundMan->playSoundFile("SOUND52.WAV"); if (!_vm->_globals->_saveData->_data[svField184]) { - _vm->_animationManager->playSequence("CIB6A.SEQ", 1, 12, 1, false, false); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0); + _vm->_animMan->playSequence("CIB6A.SEQ", 1, 12, 1, false, false); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0); } else if (_vm->_globals->_saveData->_data[svField184] == 1) { - _vm->_animationManager->playSequence("CIB6C.SEQ", 1, 12, 1, false, false); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 293, 139, 3); + _vm->_animMan->playSequence("CIB6C.SEQ", 1, 12, 1, false, false); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 0); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 293, 139, 3); } break; case 93: - _vm->_soundManager->playSoundFile("SOUND52.WAV"); + _vm->_soundMan->playSoundFile("SOUND52.WAV"); if (!_vm->_globals->_saveData->_data[svField184]) { - _vm->_animationManager->playSequence("CIB6B.SEQ", 1, 12, 1, false, false); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5); + _vm->_animMan->playSequence("CIB6B.SEQ", 1, 12, 1, false, false); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5); } else if (_vm->_globals->_saveData->_data[svField184] == 1) { - _vm->_animationManager->playSequence("CIB6D.SEQ", 1, 12, 1, false, false); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 161, 8); + _vm->_animMan->playSequence("CIB6D.SEQ", 1, 12, 1, false, false); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 155, 29, 5); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 283, 161, 8); } break; case 94: if (!_vm->_globals->_saveData->_data[svField228]) - _vm->_talkManager->startAnimatedCharacterDialogue("flicn.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("flicn.pe2"); else if (_vm->_globals->_saveData->_data[svField228] == 1) - _vm->_talkManager->startAnimatedCharacterDialogue("flicn1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("flicn1.pe2"); break; case 95: - _vm->_objectsManager->setBobAnimation(9); - _vm->_objectsManager->setBobAnimation(10); - _vm->_objectsManager->setBobAnimation(12); - _vm->_objectsManager->setBobAnimDataIdx(9, 0); - _vm->_objectsManager->setBobAnimDataIdx(10, 0); - _vm->_objectsManager->setBobAnimDataIdx(12, 0); - _vm->_objectsManager->removeSprite(0); + _vm->_objectsMan->setBobAnimation(9); + _vm->_objectsMan->setBobAnimation(10); + _vm->_objectsMan->setBobAnimation(12); + _vm->_objectsMan->setBobAnimDataIdx(9, 0); + _vm->_objectsMan->setBobAnimDataIdx(10, 0); + _vm->_objectsMan->setBobAnimDataIdx(12, 0); + _vm->_objectsMan->removeSprite(0); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(9) != 15); - _vm->_objectsManager->stopBobAnimation(9); - _vm->_objectsManager->animateSprite(0); - _vm->_soundManager->playSoundFile("SOUND50.WAV"); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(9) != 15); + _vm->_objectsMan->stopBobAnimation(9); + _vm->_objectsMan->animateSprite(0); + _vm->_soundMan->playSoundFile("SOUND50.WAV"); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(12) != 117); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 830, 122, 0); - _vm->_objectsManager->stopBobAnimation(12); - _vm->_objectsManager->stopBobAnimation(10); - _vm->_objectsManager->setBobAnimation(11); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(12) != 117); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 830, 122, 0); + _vm->_objectsMan->stopBobAnimation(12); + _vm->_objectsMan->stopBobAnimation(10); + _vm->_objectsMan->setBobAnimation(11); break; case 98: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("CVIGIL2.PE2"); + _vm->_talkMan->startAnimatedCharacterDialogue("CVIGIL2.PE2"); _vm->_globals->_introSpeechOffFl = false; break; case 100: - _vm->_talkManager->startAnimatedCharacterDialogue("tourist.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("tourist.pe2"); break; case 101: - _vm->_talkManager->startAnimatedCharacterDialogue("tahi1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("tahi1.pe2"); break; case 103: // Dice game _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("tourist1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("tourist1.pe2"); _vm->_globals->_introSpeechOffFl = false; - _vm->_animationManager->playAnim2("T421.ANM", 100, 14, 500); - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_animMan->playAnim2("T421.ANM", 100, 14, 500); + _vm->_events->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("tourist2.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("tourist2.pe2"); _vm->_globals->_introSpeechOffFl = false; break; case 104: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("tourist3.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("tourist3.pe2"); _vm->_globals->_introSpeechOffFl = false; break; case 105: _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0); - _vm->_objectsManager->resetOldDirection(); - _vm->_objectsManager->resetHomeRateCounter(); - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0); + _vm->_objectsMan->resetOldDirection(); + _vm->_objectsMan->resetHomeRateCounter(); + _vm->_linesMan->_route = (RouteItem *)NULL; switch (_vm->_globals->_saveData->_data[svField253]) { case 1: - _vm->_linesManager->_route = _vm->_linesManager->findRoute(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 201, 294); + _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 201, 294); break; case 2: - _vm->_linesManager->_route = _vm->_linesManager->findRoute(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 158, 338); + _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 158, 338); break; default: if (_vm->_globals->_saveData->_data[svField253] > 2) - _vm->_linesManager->_route = _vm->_linesManager->findRoute(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 211, 393); + _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 211, 393); break; } _vm->_globals->_checkDistanceFl = true; @@ -1433,25 +1433,25 @@ int ScriptManager::handleOpcode(byte *dataP) { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager->GOHOME(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_linesManager->_route != (RouteItem *)NULL); - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setSpriteIndex(0, 60); - _vm->_soundManager->loadSample(1, "SOUND63.WAV"); + _vm->_objectsMan->GOHOME(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_linesMan->_route != (RouteItem *)NULL); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setSpriteIndex(0, 60); + _vm->_soundMan->loadSample(1, "SOUND63.WAV"); if (_vm->_globals->_saveData->_data[svField253] > 2) { - _vm->_objectsManager->setBobAnimation(4); + _vm->_objectsMan->setBobAnimation(4); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(4)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(4)) { case 9: case 32: case 55: if (!playFl) { - _vm->_soundManager->playSample(1); + _vm->_soundMan->playSample(1); playFl = true; } break; @@ -1461,25 +1461,25 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(4) == 72) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(4) == 72) break; } - _vm->_objectsManager->stopBobAnimation(4); + _vm->_objectsMan->stopBobAnimation(4); } if (_vm->_globals->_saveData->_data[svField253] == 1) { - _vm->_objectsManager->setBobAnimation(6); + _vm->_objectsMan->setBobAnimation(6); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(6)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(6)) { case 9: case 32: case 55: if (!playFl) { - _vm->_soundManager->playSample(1); + _vm->_soundMan->playSample(1); playFl = true; } break; @@ -1489,25 +1489,25 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(6) == 72) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(6) == 72) break; } - _vm->_objectsManager->stopBobAnimation(6); + _vm->_objectsMan->stopBobAnimation(6); } if (_vm->_globals->_saveData->_data[svField253] == 2) { - _vm->_objectsManager->setBobAnimation(5); + _vm->_objectsMan->setBobAnimation(5); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(5)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(5)) { case 9: case 32: case 55: if (!playFl) { - _vm->_soundManager->playSample(1); + _vm->_soundMan->playSample(1); playFl = true; } break; @@ -1517,310 +1517,310 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(5) == 72) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(5) == 72) break; } - _vm->_objectsManager->stopBobAnimation(5); + _vm->_objectsMan->stopBobAnimation(5); } - _vm->_objectsManager->animateSprite(0); - _vm->_objectsManager->doActionBack(1); - _vm->_soundManager->removeSample(1); + _vm->_objectsMan->animateSprite(0); + _vm->_objectsMan->doActionBack(1); + _vm->_soundMan->removeSample(1); break; case 106: - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setBobAnimation(4); - _vm->_objectsManager->setBobAnimDataIdx(4, 0); - _vm->_soundManager->loadWav("SOUND61.WAV", 1); - _vm->_soundManager->loadWav("SOUND62.WAV", 2); - _vm->_soundManager->loadWav("SOUND61.WAV", 3); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setBobAnimation(4); + _vm->_objectsMan->setBobAnimDataIdx(4, 0); + _vm->_soundMan->loadWav("SOUND61.WAV", 1); + _vm->_soundMan->loadWav("SOUND62.WAV", 2); + _vm->_soundMan->loadWav("SOUND61.WAV", 3); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(4) != 10); - _vm->_soundManager->playWav(1); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(4) != 10); + _vm->_soundMan->playWav(1); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(4) != 18); - _vm->_soundManager->playWav(2); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(4) != 18); + _vm->_soundMan->playWav(2); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(4) != 62); - _vm->_soundManager->playWav(3); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(4) != 62); + _vm->_soundMan->playWav(3); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(4) != 77); - _vm->_objectsManager->stopBobAnimation(4); - _vm->_objectsManager->animateSprite(0); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(4) != 77); + _vm->_objectsMan->stopBobAnimation(4); + _vm->_objectsMan->animateSprite(0); break; case 107: - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setBobAnimation(5); - _vm->_objectsManager->setBobAnimDataIdx(5, 0); - _vm->_soundManager->loadWav("SOUND61.WAV", 1); - _vm->_soundManager->loadWav("SOUND62.WAV", 2); - _vm->_soundManager->loadWav("SOUND61.WAV", 3); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setBobAnimation(5); + _vm->_objectsMan->setBobAnimDataIdx(5, 0); + _vm->_soundMan->loadWav("SOUND61.WAV", 1); + _vm->_soundMan->loadWav("SOUND62.WAV", 2); + _vm->_soundMan->loadWav("SOUND61.WAV", 3); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 10); - _vm->_soundManager->playWav(1); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 10); + _vm->_soundMan->playWav(1); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 18); - _vm->_soundManager->playWav(2); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 18); + _vm->_soundMan->playWav(2); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 38); - _vm->_soundManager->playWav(3); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 38); + _vm->_soundMan->playWav(3); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(5) != 53); - _vm->_objectsManager->stopBobAnimation(5); - _vm->_objectsManager->animateSprite(0); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(5) != 53); + _vm->_objectsMan->stopBobAnimation(5); + _vm->_objectsMan->animateSprite(0); break; case 108: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("peche1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("peche1.pe2"); _vm->_globals->_introSpeechOffFl = false; break; case 109: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("peche2.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("peche2.pe2"); _vm->_globals->_introSpeechOffFl = false; break; case 110: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("peche3.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("peche3.pe2"); _vm->_globals->_introSpeechOffFl = false; break; case 111: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("peche4.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("peche4.pe2"); _vm->_globals->_introSpeechOffFl = false; break; case 112: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("teint1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("teint1.pe2"); _vm->_globals->_introSpeechOffFl = false; break; case 113: - _vm->_talkManager->startAnimatedCharacterDialogue("teint.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("teint.pe2"); break; case 114: - _vm->_talkManager->startAnimatedCharacterDialogue("tahibar.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("tahibar.pe2"); break; case 115: - _vm->_talkManager->startAnimatedCharacterDialogue("ilebar.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("ilebar.pe2"); break; case 116: - _vm->_talkManager->startAnimatedCharacterDialogue("Profred.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("Profred.pe2"); break; case 170: - _vm->_talkManager->startAnimatedCharacterDialogue("GRED.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("GRED.pe2"); break; case 171: { _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("gred1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("gred1.pe2"); _vm->_globals->_introSpeechOffFl = false; _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0); - _vm->_objectsManager->resetOldDirection(); - _vm->_objectsManager->resetHomeRateCounter(); + _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0); + _vm->_objectsMan->resetOldDirection(); + _vm->_objectsMan->resetHomeRateCounter(); _vm->_globals->_checkDistanceFl = true; - _vm->_linesManager->_route = (RouteItem *)NULL; - _vm->_linesManager->_route = _vm->_linesManager->findRoute(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 361, 325); + _vm->_linesMan->_route = (RouteItem *)NULL; + _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 361, 325); _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager->_zoneNum = -1; + _vm->_objectsMan->_zoneNum = -1; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager->GOHOME(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_linesManager->_route != (RouteItem *)NULL); + _vm->_objectsMan->GOHOME(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_linesMan->_route != (RouteItem *)NULL); _vm->_globals->_exitId = 59; break; } case 172: - _vm->_talkManager->startAnimatedCharacterDialogue("GBLEU.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("GBLEU.pe2"); break; case 173: { _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("gbleu1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("gbleu1.pe2"); _vm->_globals->_introSpeechOffFl = false; _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0); - _vm->_objectsManager->resetOldDirection(); - _vm->_objectsManager->resetHomeRateCounter(); + _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0); + _vm->_objectsMan->resetOldDirection(); + _vm->_objectsMan->resetHomeRateCounter(); _vm->_globals->_checkDistanceFl = true; - _vm->_linesManager->_route = (RouteItem *)NULL; - _vm->_linesManager->_route = _vm->_linesManager->findRoute(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 361, 325); + _vm->_linesMan->_route = (RouteItem *)NULL; + _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 361, 325); _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager->_zoneNum = -1; + _vm->_objectsMan->_zoneNum = -1; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager->GOHOME(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_linesManager->_route != (RouteItem *)NULL); + _vm->_objectsMan->GOHOME(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_linesMan->_route != (RouteItem *)NULL); _vm->_globals->_exitId = 59; break; } case 174: - _vm->_talkManager->startAnimatedCharacterDialogue("Profbl.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("Profbl.pe2"); break; case 175: - _vm->_objectsManager->setSpriteIndex(0, 55); - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setBobAnimation(9); - _vm->_objectsManager->setBobAnimation(10); - _vm->_objectsManager->setBobOffset(10, 300); - _vm->_soundManager->playSoundFile("SOUND44.WAV"); + _vm->_objectsMan->setSpriteIndex(0, 55); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setBobAnimation(9); + _vm->_objectsMan->setBobAnimation(10); + _vm->_objectsMan->setBobOffset(10, 300); + _vm->_soundMan->playSoundFile("SOUND44.WAV"); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(10) != 7); - _vm->_objectsManager->setBobAnimation(6); - _vm->_objectsManager->stopBobAnimation(3); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(10) != 7); + _vm->_objectsMan->setBobAnimation(6); + _vm->_objectsMan->stopBobAnimation(3); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(6) != 10); - _vm->_soundManager->playSoundFile("SOUND71.WAV"); - _vm->_objectsManager->setBobAnimation(7); - _vm->_objectsManager->stopBobAnimation(4); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(6) != 10); + _vm->_soundMan->playSoundFile("SOUND71.WAV"); + _vm->_objectsMan->setBobAnimation(7); + _vm->_objectsMan->stopBobAnimation(4); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(7) != 15); - _vm->_objectsManager->stopBobAnimation(5); - _vm->_objectsManager->setBobAnimation(8); - _vm->_soundManager->playSoundFile("SOUND70.WAV"); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(7) != 15); + _vm->_objectsMan->stopBobAnimation(5); + _vm->_objectsMan->setBobAnimation(8); + _vm->_soundMan->playSoundFile("SOUND70.WAV"); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(8) != 76); - _vm->_objectsManager->stopBobAnimation(6); - _vm->_objectsManager->stopBobAnimation(7); - _vm->_objectsManager->stopBobAnimation(8); - _vm->_objectsManager->stopBobAnimation(9); - _vm->_objectsManager->stopBobAnimation(10); - _vm->_objectsManager->animateSprite(0); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(8) != 76); + _vm->_objectsMan->stopBobAnimation(6); + _vm->_objectsMan->stopBobAnimation(7); + _vm->_objectsMan->stopBobAnimation(8); + _vm->_objectsMan->stopBobAnimation(9); + _vm->_objectsMan->stopBobAnimation(10); + _vm->_objectsMan->animateSprite(0); break; case 176: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("gred2.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("gred2.pe2"); _vm->_globals->_introSpeechOffFl = false; break; case 177: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("gbleu2.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("gbleu2.pe2"); _vm->_globals->_introSpeechOffFl = false; break; case 200: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("Gm2.PE2"); + _vm->_talkMan->startAnimatedCharacterDialogue("Gm2.PE2"); _vm->_globals->_introSpeechOffFl = false; break; case 201: - _vm->_objectsManager->setBobAnimation(3); + _vm->_objectsMan->setBobAnimation(3); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(3) != 18); - _vm->_objectsManager->stopBobAnimation(3); - _vm->_objectsManager->setBobAnimation(4); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(3) != 18); + _vm->_objectsMan->stopBobAnimation(3); + _vm->_objectsMan->setBobAnimation(4); break; case 202: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("SVGARD2.PE2"); + _vm->_talkMan->startAnimatedCharacterDialogue("SVGARD2.PE2"); _vm->_globals->_introSpeechOffFl = false; break; case 203: - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setBobAnimation(4); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setBobAnimation(4); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(4) == 18) - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 18, 334, 0, false); - } while (_vm->_objectsManager->getBobAnimDataIdx(4) != 26); - _vm->_objectsManager->stopBobAnimation(4); - _vm->_objectsManager->animateSprite(0); + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(4) == 18) + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 18, 334, 0, false); + } while (_vm->_objectsMan->getBobAnimDataIdx(4) != 26); + _vm->_objectsMan->stopBobAnimation(4); + _vm->_objectsMan->animateSprite(0); break; case 204: { - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setBobAnimation(3); - _vm->_soundManager->loadWav("SOUND67.WAV", 1); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setBobAnimation(3); + _vm->_soundMan->loadWav("SOUND67.WAV", 1); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(3)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(3)) { case 10: if (!playFl) { - _vm->_soundManager->playWav(1); + _vm->_soundMan->playWav(1); playFl = true; } break; @@ -1828,28 +1828,28 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(3) == 50) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(3) == 50) break; } - _vm->_objectsManager->stopBobAnimation(3); - _vm->_objectsManager->animateSprite(0); + _vm->_objectsMan->stopBobAnimation(3); + _vm->_objectsMan->animateSprite(0); break; } case 205: { - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setBobAnimation(4); - _vm->_soundManager->loadWav("SOUND69.WAV", 1); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setBobAnimation(4); + _vm->_soundMan->loadWav("SOUND69.WAV", 1); bool playFl = false; for (;;) { if (_vm->shouldQuit()) return -1; // Exiting game - switch (_vm->_objectsManager->getBobAnimDataIdx(4)) { + switch (_vm->_objectsMan->getBobAnimDataIdx(4)) { case 10: if (!playFl) { - _vm->_soundManager->playWav(1); + _vm->_soundMan->playWav(1); playFl = true; } break; @@ -1857,233 +1857,233 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(4) == 24) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(4) == 24) break; } - _vm->_objectsManager->stopBobAnimation(4); - _vm->_objectsManager->animateSprite(0); + _vm->_objectsMan->stopBobAnimation(4); + _vm->_objectsMan->animateSprite(0); break; } case 207: - _vm->_talkManager->animateObject("PANNEAU.PE2"); + _vm->_talkMan->animateObject("PANNEAU.PE2"); break; case 208: { _vm->_globals->_disableInventFl = true; if (_vm->_globals->_saveData->_data[svLastPrevScreenId] != _vm->_globals->_saveData->_data[svField401]) { - _vm->_soundManager->_specialSoundNum = 208; - _vm->_animationManager->playSequence("SORT.SEQ", 10, 4, 10, true, false); - _vm->_soundManager->_specialSoundNum = 0; + _vm->_soundMan->_specialSoundNum = 208; + _vm->_animMan->playSequence("SORT.SEQ", 10, 4, 10, true, false); + _vm->_soundMan->_specialSoundNum = 0; } _vm->_globals->_checkDistanceFl = true; - _vm->_linesManager->_route = (RouteItem *)NULL; - _vm->_linesManager->_route = _vm->_linesManager->findRoute(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 330, 418); + _vm->_linesMan->_route = (RouteItem *)NULL; + _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 330, 418); _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager->_zoneNum = 0; + _vm->_objectsMan->_zoneNum = 0; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager->GOHOME(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_linesManager->_route != (RouteItem *)NULL); - _vm->_objectsManager->setSpriteIndex(0, 64); + _vm->_objectsMan->GOHOME(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_linesMan->_route != (RouteItem *)NULL); + _vm->_objectsMan->setSpriteIndex(0, 64); _vm->_globals->_exitId = _vm->_globals->_saveData->_data[svField401]; _vm->_globals->_disableInventFl = false; break; } case 209: { - _vm->_objectsManager->setBobAnimDataIdx(1, 0); - _vm->_objectsManager->setBobAnimDataIdx(2, 0); - _vm->_objectsManager->setSpriteIndex(0, 60); - _vm->_objectsManager->stopBobAnimation(4); - _vm->_objectsManager->setBobAnimation(1); + _vm->_objectsMan->setBobAnimDataIdx(1, 0); + _vm->_objectsMan->setBobAnimDataIdx(2, 0); + _vm->_objectsMan->setSpriteIndex(0, 60); + _vm->_objectsMan->stopBobAnimation(4); + _vm->_objectsMan->setBobAnimation(1); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(1) != 9); - _vm->_objectsManager->stopBobAnimation(1); - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(1) != 9); + _vm->_objectsMan->stopBobAnimation(1); + _vm->_linesMan->_route = (RouteItem *)NULL; _vm->_globals->_checkDistanceFl = true; - _vm->_linesManager->_route = _vm->_linesManager->findRoute(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 330, 314); - _vm->_objectsManager->_zoneNum = 0; + _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 330, 314); + _vm->_objectsMan->_zoneNum = 0; _vm->_globals->_checkDistanceFl = true; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager->GOHOME(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_linesManager->_route != (RouteItem *)NULL); - _vm->_objectsManager->setSpriteIndex(0, 64); - _vm->_objectsManager->setBobAnimation(2); - _vm->_soundManager->playSoundFile("SOUND66.WAV"); + _vm->_objectsMan->GOHOME(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_linesMan->_route != (RouteItem *)NULL); + _vm->_objectsMan->setSpriteIndex(0, 64); + _vm->_objectsMan->setBobAnimation(2); + _vm->_soundMan->playSoundFile("SOUND66.WAV"); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(2) != 10); - _vm->_objectsManager->stopBobAnimation(2); - _vm->_objectsManager->setBobAnimation(4); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(2) != 10); + _vm->_objectsMan->stopBobAnimation(2); + _vm->_objectsMan->setBobAnimation(4); break; } case 210: - _vm->_soundManager->_specialSoundNum = 210; - _vm->_animationManager->playSequence2("SECRET1.SEQ", 1, 12, 1, true); - _vm->_soundManager->_specialSoundNum = 0; - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 192, 152, 0); - _vm->_objectsManager->setBobAnimation(9); - _vm->_objectsManager->loadLinkFile("IM73a", true); - _vm->_objectsManager->enableHidingBehavior(); - _vm->_objectsManager->setHidingUseCount(0); - _vm->_objectsManager->setHidingUseCount(1); - _vm->_graphicsManager->setColorPercentage2(252, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage2(253, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage2(254, 0, 0, 0); + _vm->_soundMan->_specialSoundNum = 210; + _vm->_animMan->playSequence2("SECRET1.SEQ", 1, 12, 1, true); + _vm->_soundMan->_specialSoundNum = 0; + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 192, 152, 0); + _vm->_objectsMan->setBobAnimation(9); + _vm->_objectsMan->loadLinkFile("IM73a", true); + _vm->_objectsMan->enableHidingBehavior(); + _vm->_objectsMan->setHidingUseCount(0); + _vm->_objectsMan->setHidingUseCount(1); + _vm->_graphicsMan->setColorPercentage2(252, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage2(253, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage2(254, 0, 0, 0); break; case 211: - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->disableHidingBehavior(); - _vm->_soundManager->_specialSoundNum = 211; - _vm->_animationManager->playSequence("SECRET2.SEQ", 1, 12, 100, false, true); - _vm->_soundManager->_specialSoundNum = 0; - _vm->_graphicsManager->_noFadingFl = true; - _vm->_graphicsManager->fadeOutLong(); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->disableHidingBehavior(); + _vm->_soundMan->_specialSoundNum = 211; + _vm->_animMan->playSequence("SECRET2.SEQ", 1, 12, 100, false, true); + _vm->_soundMan->_specialSoundNum = 0; + _vm->_graphicsMan->_noFadingFl = true; + _vm->_graphicsMan->fadeOutLong(); for (int i = 1; i <= 39; i++) { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } - _vm->_graphicsManager->setColorPercentage2(252, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage2(253, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage2(254, 0, 0, 0); + _vm->_graphicsMan->setColorPercentage2(252, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage2(253, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage2(251, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage2(254, 0, 0, 0); break; case 215: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("aviat.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("aviat.pe2"); _vm->_globals->_introSpeechOffFl = false; break; case 216: _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("aviat1.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("aviat1.pe2"); _vm->_globals->_introSpeechOffFl = false; break; case 229: - _vm->_soundManager->_specialSoundNum = 229; - _vm->_animationManager->playSequence("MUR.SEQ", 1, 12, 1, false, false); - _vm->_soundManager->_specialSoundNum = 0; - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 340, 157, 2); + _vm->_soundMan->_specialSoundNum = 229; + _vm->_animMan->playSequence("MUR.SEQ", 1, 12, 1, false, false); + _vm->_soundMan->_specialSoundNum = 0; + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 340, 157, 2); break; case 230: { - _vm->_objectsManager->loadLinkFile("IM93a", true); - _vm->_objectsManager->enableHidingBehavior(); + _vm->_objectsMan->loadLinkFile("IM93a", true); + _vm->_objectsMan->enableHidingBehavior(); _vm->_globals->_checkDistanceFl = true; - _vm->_objectsManager->_oldCharacterPosX = _vm->_objectsManager->getSpriteX(0); - _vm->_objectsManager->resetOldDirection(); - _vm->_objectsManager->resetHomeRateCounter(); + _vm->_objectsMan->_oldCharacterPosX = _vm->_objectsMan->getSpriteX(0); + _vm->_objectsMan->resetOldDirection(); + _vm->_objectsMan->resetHomeRateCounter(); _vm->_globals->_checkDistanceFl = true; - _vm->_linesManager->_route = (RouteItem *)NULL; - _vm->_linesManager->_route = _vm->_linesManager->findRoute(_vm->_objectsManager->getSpriteX(0), _vm->_objectsManager->getSpriteY(0), 488, 280); + _vm->_linesMan->_route = (RouteItem *)NULL; + _vm->_linesMan->_route = _vm->_linesMan->findRoute(_vm->_objectsMan->getSpriteX(0), _vm->_objectsMan->getSpriteY(0), 488, 280); _vm->_globals->_checkDistanceFl = true; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_objectsManager->GOHOME(); - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_linesManager->_route != (RouteItem *)NULL); - _vm->_objectsManager->removeSprite(0); + _vm->_objectsMan->GOHOME(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_linesMan->_route != (RouteItem *)NULL); + _vm->_objectsMan->removeSprite(0); bool playFl = false; - _vm->_objectsManager->setBobAnimation(7); + _vm->_objectsMan->setBobAnimation(7); do { if (_vm->shouldQuit()) return -1; // Exiting game - if (_vm->_objectsManager->getBobAnimDataIdx(7) == 9 && !playFl) { + if (_vm->_objectsMan->getBobAnimDataIdx(7) == 9 && !playFl) { playFl = true; - _vm->_soundManager->playSoundFile("SOUND81.WAV"); + _vm->_soundMan->playSoundFile("SOUND81.WAV"); } - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(7) != 15); - _vm->_objectsManager->stopBobAnimation(7); - _vm->_objectsManager->setSpriteX(0, 476); - _vm->_objectsManager->setSpriteY(0, 278); - _vm->_objectsManager->animateSprite(0); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 337, 154, 3); - _vm->_objectsManager->loadLinkFile("IM93c", true); - _vm->_objectsManager->enableHidingBehavior(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(7) != 15); + _vm->_objectsMan->stopBobAnimation(7); + _vm->_objectsMan->setSpriteX(0, 476); + _vm->_objectsMan->setSpriteY(0, 278); + _vm->_objectsMan->animateSprite(0); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 337, 154, 3); + _vm->_objectsMan->loadLinkFile("IM93c", true); + _vm->_objectsMan->enableHidingBehavior(); break; } case 231: - _vm->_objectsManager->disableHidingBehavior(); - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setBobAnimation(12); + _vm->_objectsMan->disableHidingBehavior(); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setBobAnimation(12); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(12) != 6); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(12) != 6); _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("PRMORT.pe2"); + _vm->_talkMan->startAnimatedCharacterDialogue("PRMORT.pe2"); _vm->_globals->_introSpeechOffFl = false; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(12) != 12); - _vm->_objectsManager->animateSprite(0); - _vm->_objectsManager->stopBobAnimation(12); - _vm->_objectsManager->enableHidingBehavior(); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(12) != 12); + _vm->_objectsMan->animateSprite(0); + _vm->_objectsMan->stopBobAnimation(12); + _vm->_objectsMan->enableHidingBehavior(); break; case 233: { - _vm->_objectsManager->disableHidingBehavior(); - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setBobAnimation(11); + _vm->_objectsMan->disableHidingBehavior(); + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setBobAnimation(11); bool playFl = false; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_objectsManager->getBobAnimDataIdx(11) == 10 && !playFl) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_objectsMan->getBobAnimDataIdx(11) == 10 && !playFl) playFl = true; - } while (_vm->_objectsManager->getBobAnimDataIdx(11) != 13); - _vm->_objectsManager->stopBobAnimation(11); - _vm->_objectsManager->enableHidingBehavior(); - _vm->_objectsManager->setBobAnimation(13); + } while (_vm->_objectsMan->getBobAnimDataIdx(11) != 13); + _vm->_objectsMan->stopBobAnimation(11); + _vm->_objectsMan->enableHidingBehavior(); + _vm->_objectsMan->setBobAnimation(13); do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_objectsManager->getBobAnimDataIdx(13) != 48); + _vm->_events->refreshScreenAndEvents(); + } while (_vm->_objectsMan->getBobAnimDataIdx(13) != 48); _vm->_globals->_introSpeechOffFl = true; - _vm->_talkManager->startAnimatedCharacterDialogue("HRADIO.PE2"); + _vm->_talkMan->startAnimatedCharacterDialogue("HRADIO.PE2"); _vm->_globals->_introSpeechOffFl = false; - _vm->_graphicsManager->fadeOutLong(); - _vm->_objectsManager->stopBobAnimation(13); - _vm->_graphicsManager->_noFadingFl = true; + _vm->_graphicsMan->fadeOutLong(); + _vm->_objectsMan->stopBobAnimation(13); + _vm->_graphicsMan->_noFadingFl = true; _vm->_globals->_exitId = 94; break; } @@ -2101,27 +2101,27 @@ int ScriptManager::handleOpcode(byte *dataP) { vbobFrameIndex = 4; break; } - _vm->_soundManager->playSoundFile("SOUND83.WAV"); - _vm->_objectsManager->setAndPlayAnim(vbobFrameIndex, 26, 50, false); + _vm->_soundMan->playSoundFile("SOUND83.WAV"); + _vm->_objectsMan->setAndPlayAnim(vbobFrameIndex, 26, 50, false); switch (_vm->_globals->_saveData->_data[svField341]) { case 1: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 0); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 0); _vm->_globals->_saveData->_data[svField338] = 0; break; case 2: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 2); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 2); _vm->_globals->_saveData->_data[svField339] = 0; break; case 3: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4); _vm->_globals->_saveData->_data[svField340] = 0; break; } } - _vm->_soundManager->playSoundFile("SOUND83.WAV"); - _vm->_objectsManager->setAndPlayAnim(6, 0, 23, false); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 1); + _vm->_soundMan->playSoundFile("SOUND83.WAV"); + _vm->_objectsMan->setAndPlayAnim(6, 0, 23, false); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 1); break; } @@ -2139,28 +2139,28 @@ int ScriptManager::handleOpcode(byte *dataP) { } if (_vm->_globals->_saveData->_data[svField341]) { - _vm->_soundManager->playSoundFile("SOUND83.WAV"); - _vm->_objectsManager->setAndPlayAnim(vbobFrameIndex, 26, 50, false); + _vm->_soundMan->playSoundFile("SOUND83.WAV"); + _vm->_objectsMan->setAndPlayAnim(vbobFrameIndex, 26, 50, false); switch (_vm->_globals->_saveData->_data[svField341]) { case 1: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 0); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 0); _vm->_globals->_saveData->_data[svField338] = 0; break; case 2: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 2); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 2); _vm->_globals->_saveData->_data[svField339] = 0; break; case 3: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4); _vm->_globals->_saveData->_data[svField340] = 0; break; } } - _vm->_soundManager->playSoundFile("SOUND83.WAV"); - _vm->_objectsManager->setAndPlayAnim(5, 0, 23, false); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 3); + _vm->_soundMan->playSoundFile("SOUND83.WAV"); + _vm->_objectsMan->setAndPlayAnim(5, 0, 23, false); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 3); break; } @@ -2178,47 +2178,47 @@ int ScriptManager::handleOpcode(byte *dataP) { } if (_vm->_globals->_saveData->_data[svField341]) { - _vm->_soundManager->playSoundFile("SOUND83.WAV"); - _vm->_objectsManager->setAndPlayAnim(vbobFrameIndex, 26, 50, false); + _vm->_soundMan->playSoundFile("SOUND83.WAV"); + _vm->_objectsMan->setAndPlayAnim(vbobFrameIndex, 26, 50, false); switch (_vm->_globals->_saveData->_data[svField341]) { case 1: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 0); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 0); _vm->_globals->_saveData->_data[svField338] = 0; break; case 2: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 2); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 145, 166, 2); _vm->_globals->_saveData->_data[svField339] = 0; break; case 3: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 4); _vm->_globals->_saveData->_data[svField340] = 0; break; } } - _vm->_soundManager->playSoundFile("SOUND83.WAV"); - _vm->_objectsManager->setAndPlayAnim(4, 0, 23, false); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 5); + _vm->_soundMan->playSoundFile("SOUND83.WAV"); + _vm->_objectsMan->setAndPlayAnim(4, 0, 23, false); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 296, 212, 5); break; } case 239: - _vm->_objectsManager->removeSprite(0); - _vm->_soundManager->playSoundFile("SOUND84.WAV"); - _vm->_objectsManager->setAndPlayAnim(16, 0, 10, false); + _vm->_objectsMan->removeSprite(0); + _vm->_soundMan->playSoundFile("SOUND84.WAV"); + _vm->_objectsMan->setAndPlayAnim(16, 0, 10, false); break; case 240: { - _vm->_objectsManager->setBobAnimation(1); + _vm->_objectsMan->setBobAnimation(1); bool soundFlag = false; do { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); - switch (_vm->_objectsManager->getBobAnimDataIdx(1)) { + _vm->_events->refreshScreenAndEvents(); + switch (_vm->_objectsMan->getBobAnimDataIdx(1)) { case 12: if (!soundFlag) { - _vm->_soundManager->playSoundFile("SOUND86.WAV"); + _vm->_soundMan->playSoundFile("SOUND86.WAV"); soundFlag = true; } break; @@ -2230,32 +2230,32 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 25: if (!soundFlag) { - _vm->_soundManager->playSoundFile("SOUND85.WAV"); + _vm->_soundMan->playSoundFile("SOUND85.WAV"); soundFlag = true; } break; } - } while (_vm->_objectsManager->getBobAnimDataIdx(1) != 32); - _vm->_objectsManager->stopBobAnimation(1); - _vm->_objectsManager->setBobAnimation(2); - _vm->_fontManager->hideText(9); + } while (_vm->_objectsMan->getBobAnimDataIdx(1) != 32); + _vm->_objectsMan->stopBobAnimation(1); + _vm->_objectsMan->setBobAnimation(2); + _vm->_fontMan->hideText(9); bool displayedTxtFl = false; - if (!_vm->_soundManager->_textOffFl) { - _vm->_fontManager->initTextBuffers(9, 617, _vm->_globals->_textFilename, 91, 41, 3, 30, 253); - _vm->_fontManager->showText(9); + if (!_vm->_soundMan->_textOffFl) { + _vm->_fontMan->initTextBuffers(9, 617, _vm->_globals->_textFilename, 91, 41, 3, 30, 253); + _vm->_fontMan->showText(9); displayedTxtFl = true; } - if (!_vm->_soundManager->_voiceOffFl) - _vm->_soundManager->mixVoice(617, 4, displayedTxtFl); + if (!_vm->_soundMan->_voiceOffFl) + _vm->_soundMan->mixVoice(617, 4, displayedTxtFl); for (int i = 0; i <= 29; i++) { if (_vm->shouldQuit()) return -1; // Exiting game - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } CharacterLocation *realHopkins = &_vm->_globals->_saveData->_realHopkins; - realHopkins->_pos.x = _vm->_objectsManager->getSpriteX(0); - realHopkins->_pos.y = _vm->_objectsManager->getSpriteY(0); + realHopkins->_pos.x = _vm->_objectsMan->getSpriteX(0); + realHopkins->_pos.y = _vm->_objectsMan->getSpriteY(0); realHopkins->_startSpriteIndex = 57; realHopkins->_location = 97; _vm->_globals->_saveData->_data[svHopkinsCloneFl] = 1; @@ -2266,13 +2266,13 @@ int ScriptManager::handleOpcode(byte *dataP) { } case 241: - _vm->_talkManager->startAnimatedCharacterDialogue("RECEP.PE2"); + _vm->_talkMan->startAnimatedCharacterDialogue("RECEP.PE2"); break; // Resurrect Samantha's clone case 242: { - _vm->_soundManager->playSoundFile("SOUND87.WAV"); - _vm->_animationManager->playSequence("RESUF.SEQ", 1, 24, 1, false, true); + _vm->_soundMan->playSoundFile("SOUND87.WAV"); + _vm->_animMan->playSequence("RESUF.SEQ", 1, 24, 1, false, true); CharacterLocation *samantha = &_vm->_globals->_saveData->_samantha; samantha->_pos.x = 404; @@ -2285,110 +2285,110 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals->_saveData->_data[svField354] = 0; _vm->_globals->_saveData->_data[svField356] = 0; _vm->_globals->_saveData->_data[svField355] = 1; - _vm->_objectsManager->_twoCharactersFl = true; - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 373, 191, 3); - _vm->_objectsManager->addStaticSprite(_vm->_objectsManager->_headSprites, samantha->_pos, 1, 3, samantha->_zoomFactor, false, 20, 127); - _vm->_objectsManager->animateSprite(1); + _vm->_objectsMan->_twoCharactersFl = true; + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 373, 191, 3); + _vm->_objectsMan->addStaticSprite(_vm->_objectsMan->_headSprites, samantha->_pos, 1, 3, samantha->_zoomFactor, false, 20, 127); + _vm->_objectsMan->animateSprite(1); break; } case 243: - _vm->_soundManager->playSoundFile("SOUND88.WAV"); + _vm->_soundMan->playSoundFile("SOUND88.WAV"); if (_vm->_globals->_saveData->_data[svField341] == 2) { - _vm->_animationManager->playSequence("RESU.SEQ", 2, 24, 2, false, true); + _vm->_animMan->playSequence("RESU.SEQ", 2, 24, 2, false, true); } else { - _vm->_objectsManager->setAndPlayAnim(7, 0, 14, false); + _vm->_objectsMan->setAndPlayAnim(7, 0, 14, false); } break; case 245: - _vm->_soundManager->playSoundFile("SOUND89.WAV"); - _vm->_objectsManager->setAndPlayAnim(5, 0, 6, false); - _vm->_linesManager->_zone[4]._destX = 276; - _vm->_objectsManager->enableVerb(4, 19); - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 285, 379, 0); + _vm->_soundMan->playSoundFile("SOUND89.WAV"); + _vm->_objectsMan->setAndPlayAnim(5, 0, 6, false); + _vm->_linesMan->_zone[4]._destX = 276; + _vm->_objectsMan->enableVerb(4, 19); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 285, 379, 0); _vm->_globals->_saveData->_data[svField399] = 1; break; case 246: - _vm->_objectsManager->removeSprite(0); - _vm->_objectsManager->setAndPlayAnim(6, 0, 15, false); - _vm->_objectsManager->_charactersEnabledFl = true; - _vm->_graphicsManager->displayScreen(true); - _vm->_animationManager->playSequence2("TUNNEL.SEQ", 1, 18, 20, true); - _vm->_graphicsManager->_noFadingFl = true; - _vm->_graphicsManager->fadeOutLong(); - _vm->_objectsManager->_charactersEnabledFl = false; + _vm->_objectsMan->removeSprite(0); + _vm->_objectsMan->setAndPlayAnim(6, 0, 15, false); + _vm->_objectsMan->_charactersEnabledFl = true; + _vm->_graphicsMan->displayScreen(true); + _vm->_animMan->playSequence2("TUNNEL.SEQ", 1, 18, 20, true); + _vm->_graphicsMan->_noFadingFl = true; + _vm->_graphicsMan->fadeOutLong(); + _vm->_objectsMan->_charactersEnabledFl = false; _vm->_globals->_exitId = 100; break; case 600: if (!_vm->getIsDemo()) { - _vm->_graphicsManager->_fadingFl = true; - _vm->_graphicsManager->_fadeDefaultSpeed = 1; - _vm->_animationManager->playAnim("BOMBE1A.ANM", 100, 18, 100); + _vm->_graphicsMan->_fadingFl = true; + _vm->_graphicsMan->_fadeDefaultSpeed = 1; + _vm->_animMan->playAnim("BOMBE1A.ANM", 100, 18, 100); } - _vm->_graphicsManager->loadImage("BOMBEB"); - _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100); - _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0); - _vm->_graphicsManager->initScreen("BOMBE", 2, true); - _vm->_graphicsManager->fadeInShort(); + _vm->_graphicsMan->loadImage("BOMBEB"); + _vm->_graphicsMan->setColorPercentage(252, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(251, 100, 100, 100); + _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0); + _vm->_graphicsMan->initScreen("BOMBE", 2, true); + _vm->_graphicsMan->fadeInShort(); break; case 601: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); - _vm->_objectsManager->setAndPlayAnim(2, 0, 16, true); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); + _vm->_objectsMan->setAndPlayAnim(2, 0, 16, true); break; case 602: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); - _vm->_objectsManager->setAndPlayAnim(4, 0, 16, true); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); + _vm->_objectsMan->setAndPlayAnim(4, 0, 16, true); break; case 603: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); - _vm->_objectsManager->setAndPlayAnim(3, 0, 16, true); - _vm->_soundManager->_specialSoundNum = 199; - _vm->_graphicsManager->_fadingFl = true; - _vm->_animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); - _vm->_soundManager->_specialSoundNum = 0; - memset(_vm->_graphicsManager->_frontBuffer, 0, 614400); - _vm->_graphicsManager->_noFadingFl = true; + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); + _vm->_objectsMan->setAndPlayAnim(3, 0, 16, true); + _vm->_soundMan->_specialSoundNum = 199; + _vm->_graphicsMan->_fadingFl = true; + _vm->_animMan->playAnim("BOMBE2A.ANM", 50, 14, 500); + _vm->_soundMan->_specialSoundNum = 0; + memset(_vm->_graphicsMan->_frontBuffer, 0, 614400); + _vm->_graphicsMan->_noFadingFl = true; _vm->_globals->_exitId = 151; break; case 604: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); - _vm->_objectsManager->setAndPlayAnim(1, 0, 16, true); - _vm->_soundManager->_specialSoundNum = 199; - _vm->_animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); - _vm->_soundManager->_specialSoundNum = 0; - _vm->_graphicsManager->_noFadingFl = true; - memset(_vm->_graphicsManager->_frontBuffer, 0, 614400); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); + _vm->_objectsMan->setAndPlayAnim(1, 0, 16, true); + _vm->_soundMan->_specialSoundNum = 199; + _vm->_animMan->playAnim("BOMBE2A.ANM", 50, 14, 500); + _vm->_soundMan->_specialSoundNum = 0; + _vm->_graphicsMan->_noFadingFl = true; + memset(_vm->_graphicsMan->_frontBuffer, 0, 614400); _vm->_globals->_exitId = 151; break; case 605: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); - _vm->_objectsManager->setAndPlayAnim(5, 0, 16, true); - _vm->_graphicsManager->fadeOutShort(); - _vm->_soundManager->_specialSoundNum = 199; - _vm->_graphicsManager->_fadingFl = true; - _vm->_animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); - _vm->_soundManager->_specialSoundNum = 0; - _vm->_graphicsManager->_noFadingFl = true; - memset(_vm->_graphicsManager->_frontBuffer, 0, 614400); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); + _vm->_objectsMan->setAndPlayAnim(5, 0, 16, true); + _vm->_graphicsMan->fadeOutShort(); + _vm->_soundMan->_specialSoundNum = 199; + _vm->_graphicsMan->_fadingFl = true; + _vm->_animMan->playAnim("BOMBE2A.ANM", 50, 14, 500); + _vm->_soundMan->_specialSoundNum = 0; + _vm->_graphicsMan->_noFadingFl = true; + memset(_vm->_graphicsMan->_frontBuffer, 0, 614400); _vm->_globals->_exitId = 151; break; case 606: - _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); - _vm->_objectsManager->setAndPlayAnim(6, 0, 16, true); + _vm->_graphicsMan->fastDisplay(_vm->_globals->_levelSpriteBuf, 513, 163, 7, false); + _vm->_objectsMan->setAndPlayAnim(6, 0, 16, true); if ((_vm->getPlatform() != Common::kPlatformWindows) || !_vm->getIsDemo()) { - _vm->_animationManager->playAnim("BOMBE3A.ANM", 50, 14, 500); - memset(_vm->_graphicsManager->_frontBuffer, 0, 614400); + _vm->_animMan->playAnim("BOMBE3A.ANM", 50, 14, 500); + memset(_vm->_graphicsMan->_frontBuffer, 0, 614400); } _vm->_globals->_exitId = 6; break; @@ -2396,46 +2396,46 @@ int ScriptManager::handleOpcode(byte *dataP) { case 607: // Display bomb plan if (!_vm->getIsDemo()) { - memcpy(_vm->_graphicsManager->_oldPalette, _vm->_graphicsManager->_palette, 769); - _vm->_animationManager->playAnim2("PLAN.ANM", 50, 10, 800); + memcpy(_vm->_graphicsMan->_oldPalette, _vm->_graphicsMan->_palette, 769); + _vm->_animMan->playAnim2("PLAN.ANM", 50, 10, 800); } - _vm->_graphicsManager->resetDirtyRects(); + _vm->_graphicsMan->resetDirtyRects(); break; case 608: - _vm->_objectsManager->stopBobAnimation(2); - _vm->_objectsManager->stopBobAnimation(3); - _vm->_objectsManager->stopBobAnimation(4); - _vm->_objectsManager->stopBobAnimation(6); - _vm->_objectsManager->stopBobAnimation(11); - _vm->_objectsManager->stopBobAnimation(10); + _vm->_objectsMan->stopBobAnimation(2); + _vm->_objectsMan->stopBobAnimation(3); + _vm->_objectsMan->stopBobAnimation(4); + _vm->_objectsMan->stopBobAnimation(6); + _vm->_objectsMan->stopBobAnimation(11); + _vm->_objectsMan->stopBobAnimation(10); break; case 609: - _vm->_objectsManager->setBobAnimation(2); - _vm->_objectsManager->setBobAnimation(3); - _vm->_objectsManager->setBobAnimation(4); - _vm->_objectsManager->setBobAnimation(6); - _vm->_objectsManager->setBobAnimation(11); - _vm->_objectsManager->setBobAnimation(10); + _vm->_objectsMan->setBobAnimation(2); + _vm->_objectsMan->setBobAnimation(3); + _vm->_objectsMan->setBobAnimation(4); + _vm->_objectsMan->setBobAnimation(6); + _vm->_objectsMan->setBobAnimation(11); + _vm->_objectsMan->setBobAnimation(10); break; case 610: - _vm->_objectsManager->stopBobAnimation(5); - _vm->_objectsManager->stopBobAnimation(7); - _vm->_objectsManager->stopBobAnimation(8); - _vm->_objectsManager->stopBobAnimation(9); - _vm->_objectsManager->stopBobAnimation(12); - _vm->_objectsManager->stopBobAnimation(13); + _vm->_objectsMan->stopBobAnimation(5); + _vm->_objectsMan->stopBobAnimation(7); + _vm->_objectsMan->stopBobAnimation(8); + _vm->_objectsMan->stopBobAnimation(9); + _vm->_objectsMan->stopBobAnimation(12); + _vm->_objectsMan->stopBobAnimation(13); break; case 611: - _vm->_objectsManager->setBobAnimation(5); - _vm->_objectsManager->setBobAnimation(7); - _vm->_objectsManager->setBobAnimation(8); - _vm->_objectsManager->setBobAnimation(9); - _vm->_objectsManager->setBobAnimation(12); - _vm->_objectsManager->setBobAnimation(13); + _vm->_objectsMan->setBobAnimation(5); + _vm->_objectsMan->setBobAnimation(7); + _vm->_objectsMan->setBobAnimation(8); + _vm->_objectsMan->setBobAnimation(9); + _vm->_objectsMan->setBobAnimation(12); + _vm->_objectsMan->setBobAnimation(13); break; } opcodeType = 1; @@ -2456,31 +2456,31 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case MKTAG24('B', 'O', 'S'): opcodeType = 1; - _vm->_objectsManager->setBobOffset(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); + _vm->_objectsMan->setBobOffset(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); break; case MKTAG24('V', 'O', 'N'): - _vm->_objectsManager->enableVerb(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); + _vm->_objectsMan->enableVerb(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); opcodeType = 1; break; case MKTAG24('Z', 'C', 'H'): - _vm->_linesManager->_zone[READ_LE_INT16(dataP + 5)]._messageId = READ_LE_INT16(dataP + 7); + _vm->_linesMan->_zone[READ_LE_INT16(dataP + 5)]._messageId = READ_LE_INT16(dataP + 7); opcodeType = 1; break; case MKTAG24('J', 'U', 'M'): - _vm->_objectsManager->_jumpZone = READ_LE_INT16(dataP + 5); - _vm->_objectsManager->_jumpVerb = READ_LE_INT16(dataP + 7); + _vm->_objectsMan->_jumpZone = READ_LE_INT16(dataP + 5); + _vm->_objectsMan->_jumpVerb = READ_LE_INT16(dataP + 7); opcodeType = 6; break; case MKTAG24('S', 'O', 'U'): { int soundNum = READ_LE_INT16(dataP + 5); Common::String file = Common::String::format("SOUND%d.WAV", soundNum); - _vm->_soundManager->playSoundFile(file); + _vm->_soundMan->playSoundFile(file); opcodeType = 1; break; } case MKTAG24('V', 'O', 'F'): - _vm->_objectsManager->disableVerb(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); + _vm->_objectsMan->disableVerb(READ_LE_INT16(dataP + 5), READ_LE_INT16(dataP + 7)); opcodeType = 1; break; case MKTAG24('I', 'I', 'F'): diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index f30ca4a401..d8dfba5246 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -518,7 +518,7 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) { filename = Common::String::format("%s%d", prefix.c_str(), mappedFileNumber); bool fileFoundFl = false; - _vm->_fileManager->searchCat(filename + ".WAV", RES_VOI, fileFoundFl); + _vm->_fileIO->searchCat(filename + ".WAV", RES_VOI, fileFoundFl); if (fileFoundFl) { if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) filename = "ENG_VOI.RES"; @@ -530,10 +530,10 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) { else if (_vm->_globals->_language == LANG_SP) filename = "RES_VES.RES"; - catPos = _vm->_fileManager->_catalogPos; - catLen = _vm->_fileManager->_catalogSize; + catPos = _vm->_fileIO->_catalogPos; + catLen = _vm->_fileIO->_catalogSize; } else { - _vm->_fileManager->searchCat(filename + ".APC", RES_VOI, fileFoundFl); + _vm->_fileIO->searchCat(filename + ".APC", RES_VOI, fileFoundFl); if (fileFoundFl) { if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) filename = "ENG_VOI.RES"; @@ -545,10 +545,10 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) { else if (_vm->_globals->_language == LANG_SP) filename = "RES_VES.RES"; - catPos = _vm->_fileManager->_catalogPos; - catLen = _vm->_fileManager->_catalogSize; + catPos = _vm->_fileIO->_catalogPos; + catLen = _vm->_fileIO->_catalogSize; } else { - _vm->_fileManager->searchCat(filename + ".RAW", RES_VOI, fileFoundFl); + _vm->_fileIO->searchCat(filename + ".RAW", RES_VOI, fileFoundFl); if (fileFoundFl) { if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) filename = "ENG_VOI.RES"; @@ -560,8 +560,8 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) { else if (_vm->_globals->_language == LANG_SP) filename = "RES_VES.RES"; - catPos = _vm->_fileManager->_catalogPos; - catLen = _vm->_fileManager->_catalogSize; + catPos = _vm->_fileIO->_catalogPos; + catLen = _vm->_fileIO->_catalogSize; } else { if (!f.exists(filename + ".WAV")) { if (!f.exists(filename + ".APC")) @@ -593,17 +593,17 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) { } playVoice(); - _vm->_eventsManager->_escKeyFl = false; + _vm->_events->_escKeyFl = false; // Loop for playing voice breakFlag = false; do { if (_specialSoundNum != 4 && !_skipRefreshFl) - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_eventsManager->getMouseButton()) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_events->getMouseButton()) break; - _vm->_eventsManager->refreshEvents(); - if (_vm->_eventsManager->_escKeyFl) + _vm->_events->refreshEvents(); + if (_vm->_events->_escKeyFl) break; // We only check the voice status if the file has been loaded properly // This avoids skipping completely the talk animations in the Win95 UK Demo @@ -624,7 +624,7 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) { if (!_musicOffFl && _musicVolume > 2) { setMODMusicVolume(_musicVolume); } - _vm->_eventsManager->_escKeyFl = false; + _vm->_events->_escKeyFl = false; _skipRefreshFl = false; return true; } diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index d6d86070e1..abcf36c93e 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -49,18 +49,18 @@ TalkManager::TalkManager(HopkinsEngine *vm) { void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) { Common::String spriteFilename; - _vm->_fontManager->hideText(5); - _vm->_fontManager->hideText(9); - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager->_scrollStatus = 1; + _vm->_fontMan->hideText(5); + _vm->_fontMan->hideText(9); + _vm->_events->refreshScreenAndEvents(); + _vm->_graphicsMan->_scrollStatus = 1; bool oldDisableInventFl = _vm->_globals->_disableInventFl; _vm->_globals->_disableInventFl = true; bool fileFoundFl = false; - _characterBuffer = _vm->_fileManager->searchCat(filename, RES_PER, fileFoundFl); - _characterSize = _vm->_fileManager->_catalogSize; + _characterBuffer = _vm->_fileIO->searchCat(filename, RES_PER, fileFoundFl); + _characterSize = _vm->_fileIO->_catalogSize; if (!fileFoundFl) { - _characterBuffer = _vm->_fileManager->loadFile(filename); - _characterSize = _vm->_fileManager->fileSize(filename); + _characterBuffer = _vm->_fileIO->loadFile(filename); + _characterSize = _vm->_fileIO->fileSize(filename); } _vm->_globals->_saveData->_data[svDialogField4] = 0; @@ -78,28 +78,28 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) _dialogueMesgId1 = READ_LE_INT16((uint16 *)_characterBuffer + 40); _paletteBufferIdx = 20 * READ_LE_INT16((uint16 *)_characterBuffer + 42) + 110; fileFoundFl = false; - _characterSprite = _vm->_fileManager->searchCat(spriteFilename, RES_SAN, fileFoundFl); + _characterSprite = _vm->_fileIO->searchCat(spriteFilename, RES_SAN, fileFoundFl); if (!fileFoundFl) { - _characterSprite = _vm->_objectsManager->loadSprite(spriteFilename); + _characterSprite = _vm->_objectsMan->loadSprite(spriteFilename); } else { - _characterSprite = _vm->_objectsManager->loadSprite("RES_SAN.RES"); + _characterSprite = _vm->_objectsMan->loadSprite("RES_SAN.RES"); } - _vm->_graphicsManager->backupScreen(); + _vm->_graphicsMan->backupScreen(); - if (!_vm->_graphicsManager->_lineNbr) - _vm->_graphicsManager->_scrollOffset = 0; - _vm->_graphicsManager->displayScreen(true); - _vm->_objectsManager->_charactersEnabledFl = true; + if (!_vm->_graphicsMan->_lineNbr) + _vm->_graphicsMan->_scrollOffset = 0; + _vm->_graphicsMan->displayScreen(true); + _vm->_objectsMan->_charactersEnabledFl = true; searchCharacterPalette(_paletteBufferIdx, false); startCharacterAnim0(_paletteBufferIdx, false); initCharacterAnim(); _dialogueMesgId2 = _dialogueMesgId1 + 1; _dialogueMesgId3 = _dialogueMesgId1 + 2; _dialogueMesgId4 = _dialogueMesgId1 + 3; - int oldMouseCursorId = _vm->_eventsManager->_mouseCursorId; - _vm->_eventsManager->_mouseCursorId = 4; - _vm->_eventsManager->changeMouseCursor(0); + int oldMouseCursorId = _vm->_events->_mouseCursorId; + _vm->_events->_mouseCursorId = 4; + _vm->_events->changeMouseCursor(0); if (!_vm->_globals->_introSpeechOffFl) { int answer = 0; int dlgAnswer; @@ -109,7 +109,7 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) answer = dialogAnswer(dlgAnswer, false); if (answer == -1) dlgAnswer = _dialogueMesgId4; - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } while (dlgAnswer != _dialogueMesgId4); } if (_vm->_globals->_introSpeechOffFl) { @@ -123,30 +123,30 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) _vm->_globals->_introSpeechOffFl = false; _characterBuffer = _vm->_globals->freeMemory(_characterBuffer); _characterSprite = _vm->_globals->freeMemory(_characterSprite); - _vm->_graphicsManager->displayScreen(false); + _vm->_graphicsMan->displayScreen(false); - _vm->_graphicsManager->restoreScreen(); + _vm->_graphicsMan->restoreScreen(); - _vm->_objectsManager->_charactersEnabledFl = false; - _vm->_eventsManager->_mouseCursorId = oldMouseCursorId; + _vm->_objectsMan->_charactersEnabledFl = false; + _vm->_events->_mouseCursorId = oldMouseCursorId; - _vm->_eventsManager->changeMouseCursor(oldMouseCursorId); - _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100); + _vm->_events->changeMouseCursor(oldMouseCursorId); + _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100); if (_vm->getIsDemo() == false) - _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0); - - _vm->_graphicsManager->initColorTable(145, 150, _vm->_graphicsManager->_palette); - _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->copy16BitRect(_vm->_graphicsManager->_backBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager->unlockScreen(); - memcpy(_vm->_graphicsManager->_frontBuffer, _vm->_graphicsManager->_backBuffer, 614399); + _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0); + + _vm->_graphicsMan->initColorTable(145, 150, _vm->_graphicsMan->_palette); + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_backBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsMan->unlockScreen(); + memcpy(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_backBuffer, 614399); _vm->_globals->_disableInventFl = oldDisableInventFl; - _vm->_graphicsManager->updateScreen(); + _vm->_graphicsMan->updateScreen(); for (int i = 0; i <= 4; i++) - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager->_scrollStatus = 0; + _vm->_events->refreshScreenAndEvents(); + _vm->_graphicsMan->_scrollStatus = 0; } void TalkManager::startStaticCharacterDialogue(const Common::String &filename) { @@ -154,11 +154,11 @@ void TalkManager::startStaticCharacterDialogue(const Common::String &filename) { bool oldDisableInventFl = _vm->_globals->_disableInventFl; _vm->_globals->_disableInventFl = true; bool fileFoundFl = false; - _characterBuffer = _vm->_fileManager->searchCat(filename, RES_PER, fileFoundFl); - _characterSize = _vm->_fileManager->_catalogSize; + _characterBuffer = _vm->_fileIO->searchCat(filename, RES_PER, fileFoundFl); + _characterSize = _vm->_fileIO->_catalogSize; if (!fileFoundFl) { - _characterBuffer = _vm->_fileManager->loadFile(filename); - _characterSize = _vm->_fileManager->fileSize(filename); + _characterBuffer = _vm->_fileIO->loadFile(filename); + _characterSize = _vm->_fileIO->fileSize(filename); } _vm->_globals->_saveData->_data[svDialogField4] = 0; @@ -187,9 +187,9 @@ void TalkManager::startStaticCharacterDialogue(const Common::String &filename) { _dialogueMesgId2 = _dialogueMesgId1 + 1; _dialogueMesgId3 = _dialogueMesgId1 + 2; _dialogueMesgId4 = _dialogueMesgId1 + 3; - int oldMouseCursorId = _vm->_eventsManager->_mouseCursorId; - _vm->_eventsManager->_mouseCursorId = 4; - _vm->_eventsManager->changeMouseCursor(0); + int oldMouseCursorId = _vm->_events->_mouseCursorId; + _vm->_events->_mouseCursorId = 4; + _vm->_events->changeMouseCursor(0); if (!_vm->_globals->_introSpeechOffFl) { int answer; @@ -211,11 +211,11 @@ void TalkManager::startStaticCharacterDialogue(const Common::String &filename) { } _characterBuffer = _vm->_globals->freeMemory(_characterBuffer); - _vm->_eventsManager->_mouseCursorId = oldMouseCursorId; + _vm->_events->_mouseCursorId = oldMouseCursorId; - _vm->_eventsManager->changeMouseCursor(oldMouseCursorId); - _vm->_graphicsManager->initColorTable(145, 150, _vm->_graphicsManager->_palette); - _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); + _vm->_events->changeMouseCursor(oldMouseCursorId); + _vm->_graphicsMan->initColorTable(145, 150, _vm->_graphicsMan->_palette); + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); // TODO: The original re-enables the mouse cursor here _vm->_globals->_disableInventFl = oldDisableInventFl; } @@ -229,15 +229,15 @@ int TalkManager::dialogQuestion(bool animatedFl) { uint16 *bufPtr = (uint16 *)_characterBuffer + 48; int curVal = READ_LE_INT16(bufPtr); if (curVal != 0) - _vm->_objectsManager->setBobAnimation(curVal); + _vm->_objectsMan->setBobAnimation(curVal); if (curVal != 1) - _vm->_objectsManager->setBobAnimation(READ_LE_INT16(bufPtr + 1)); + _vm->_objectsMan->setBobAnimation(READ_LE_INT16(bufPtr + 1)); if (curVal != 2) - _vm->_objectsManager->setBobAnimation(READ_LE_INT16(bufPtr + 2)); + _vm->_objectsMan->setBobAnimation(READ_LE_INT16(bufPtr + 2)); if (curVal != 3) - _vm->_objectsManager->setBobAnimation(READ_LE_INT16(bufPtr + 3)); + _vm->_objectsMan->setBobAnimation(READ_LE_INT16(bufPtr + 3)); if (curVal != 4) - _vm->_objectsManager->setBobAnimation(READ_LE_INT16(bufPtr + 4)); + _vm->_objectsMan->setBobAnimation(READ_LE_INT16(bufPtr + 4)); } else { dialogWait(); } @@ -252,76 +252,76 @@ int TalkManager::dialogQuestion(bool animatedFl) { int sentence2PosY = sentence3PosY - 20 * sentence2LineNumb; int sentence1PosY = sentence2PosY - 20 * sentence1LineNumb; - _vm->_fontManager->initTextBuffers(5, _dialogueMesgId1, _questionsFilename, 5, sentence1PosY, 0, 65, 255); - _vm->_fontManager->initTextBuffers(6, _dialogueMesgId2, _questionsFilename, 5, sentence2PosY, 0, 65, 255); - _vm->_fontManager->initTextBuffers(7, _dialogueMesgId3, _questionsFilename, 5, sentence3PosY, 0, 65, 255); - _vm->_fontManager->initTextBuffers(8, _dialogueMesgId4, _questionsFilename, 5, sentence4PosY, 0, 65, 255); - _vm->_fontManager->showText(5); - _vm->_fontManager->showText(6); - _vm->_fontManager->showText(7); - _vm->_fontManager->showText(8); + _vm->_fontMan->initTextBuffers(5, _dialogueMesgId1, _questionsFilename, 5, sentence1PosY, 0, 65, 255); + _vm->_fontMan->initTextBuffers(6, _dialogueMesgId2, _questionsFilename, 5, sentence2PosY, 0, 65, 255); + _vm->_fontMan->initTextBuffers(7, _dialogueMesgId3, _questionsFilename, 5, sentence3PosY, 0, 65, 255); + _vm->_fontMan->initTextBuffers(8, _dialogueMesgId4, _questionsFilename, 5, sentence4PosY, 0, 65, 255); + _vm->_fontMan->showText(5); + _vm->_fontMan->showText(6); + _vm->_fontMan->showText(7); + _vm->_fontMan->showText(8); int retVal = -1; bool loopCond = false; do { - int mousePosY = _vm->_eventsManager->getMouseY(); + int mousePosY = _vm->_events->getMouseY(); if (sentence1PosY < mousePosY && mousePosY < (sentence2PosY - 1)) { - _vm->_fontManager->setOptimalColor(6, 7, 8, 5); + _vm->_fontMan->setOptimalColor(6, 7, 8, 5); retVal = _dialogueMesgId1; } if (sentence2PosY < mousePosY && mousePosY < (sentence3PosY - 1)) { - _vm->_fontManager->setOptimalColor(5, 7, 8, 6); + _vm->_fontMan->setOptimalColor(5, 7, 8, 6); retVal = _dialogueMesgId2; } if (sentence3PosY < mousePosY && mousePosY < (sentence4PosY - 1)) { - _vm->_fontManager->setOptimalColor(5, 6, 8, 7); + _vm->_fontMan->setOptimalColor(5, 6, 8, 7); retVal = _dialogueMesgId3; } if (sentence4PosY < mousePosY && mousePosY < 419) { - _vm->_fontManager->setOptimalColor(5, 6, 7, 8); + _vm->_fontMan->setOptimalColor(5, 6, 7, 8); retVal = _dialogueMesgId4; } - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_eventsManager->getMouseButton()) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_events->getMouseButton()) loopCond = true; if (retVal == -1) loopCond = false; } while (!_vm->shouldQuit() && !loopCond); - _vm->_soundManager->mixVoice(retVal, 1); - _vm->_fontManager->hideText(5); - _vm->_fontManager->hideText(6); - _vm->_fontManager->hideText(7); - _vm->_fontManager->hideText(8); + _vm->_soundMan->mixVoice(retVal, 1); + _vm->_fontMan->hideText(5); + _vm->_fontMan->hideText(6); + _vm->_fontMan->hideText(7); + _vm->_fontMan->hideText(8); if (animatedFl) { uint16 *bufPtr = (uint16 *)_characterBuffer + 48; int curVal = READ_LE_INT16(bufPtr); if (curVal != 0) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 1); if (curVal != 1) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 2); if (curVal != 2) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 3); if (curVal != 3) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 4); if (curVal != 4) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); } else { dialogTalk(); } - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); return retVal; } @@ -353,75 +353,75 @@ int TalkManager::dialogAnswer(int idx, bool animatedFl) { uint16 *bufPtr = (uint16 *)_characterBuffer + 43; int curVal = READ_LE_INT16(bufPtr); if (curVal) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 1); if (curVal) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 2); if (curVal) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 3); if (curVal) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 4); if (curVal) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); } else { dialogAnim(); } bool displayedTxtFl = false; - if (!_vm->_soundManager->_textOffFl) { - _vm->_fontManager->initTextBuffers(9, mesgId, _answersFilename, mesgPosX, mesgPosY, 5, mesgLength, 252); - _vm->_fontManager->showText(9); + if (!_vm->_soundMan->_textOffFl) { + _vm->_fontMan->initTextBuffers(9, mesgId, _answersFilename, mesgPosX, mesgPosY, 5, mesgLength, 252); + _vm->_fontMan->showText(9); displayedTxtFl = true; } - if (!_vm->_soundManager->mixVoice(mesgId, 1, displayedTxtFl)) { - _vm->_eventsManager->_curMouseButton = 0; - _vm->_eventsManager->_mouseButton = 0; + if (!_vm->_soundMan->mixVoice(mesgId, 1, displayedTxtFl)) { + _vm->_events->_curMouseButton = 0; + _vm->_events->_mouseButton = 0; if (_vm->getIsDemo()) { for (int i = 0; i < frameNumb; i++) { - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); } } else { for (int i = 0; i < frameNumb; i++) { - _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_eventsManager->_mouseButton || _vm->_eventsManager->_curMouseButton) + _vm->_events->refreshScreenAndEvents(); + if (_vm->_events->_mouseButton || _vm->_events->_curMouseButton) break; - if (_vm->_eventsManager->getMouseButton() && i + 1 > abs(frameNumb / 5)) + if (_vm->_events->getMouseButton() && i + 1 > abs(frameNumb / 5)) break; } } } - if (!_vm->_soundManager->_textOffFl) - _vm->_fontManager->hideText(9); + if (!_vm->_soundMan->_textOffFl) + _vm->_fontMan->hideText(9); if (animatedFl) { uint16 *bufPtr = (uint16 *)_characterBuffer + 43; int curVal = READ_LE_INT16(bufPtr); if (curVal) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 1); if (curVal) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 2); if (curVal) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 3); if (curVal) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); curVal = READ_LE_INT16(bufPtr + 4); if (curVal) - _vm->_objectsManager->stopBobAnimation(curVal); + _vm->_objectsMan->stopBobAnimation(curVal); } else { dialogEndTalk(); } @@ -463,46 +463,46 @@ void TalkManager::searchCharacterPalette(int startIdx, bool dark) { else _characterPalette[761] = 255; - _vm->_graphicsManager->setPaletteVGA256(_characterPalette); - _vm->_graphicsManager->initColorTable(145, 150, _characterPalette); + _vm->_graphicsMan->setPaletteVGA256(_characterPalette); + _vm->_graphicsMan->initColorTable(145, 150, _characterPalette); } void TalkManager::dialogWait() { for (int idx = 26; idx <= 30; ++idx) { - if (_vm->_animationManager->_animBqe[idx]._enabledFl) + if (_vm->_animMan->_animBqe[idx]._enabledFl) displayBobDialogAnim(idx); } } void TalkManager::dialogTalk() { for (int idx = 26; idx <= 30; ++idx) { - if (_vm->_animationManager->_animBqe[idx]._enabledFl) - _vm->_objectsManager->hideBob(idx); + if (_vm->_animMan->_animBqe[idx]._enabledFl) + _vm->_objectsMan->hideBob(idx); } for (int idx = 26; idx <= 30; ++idx) { - if (_vm->_animationManager->_animBqe[idx]._enabledFl) - _vm->_objectsManager->resetBob(idx); + if (_vm->_animMan->_animBqe[idx]._enabledFl) + _vm->_objectsMan->resetBob(idx); } } void TalkManager::dialogEndTalk() { for (int idx = 21; idx <= 25; ++idx) { - if (_vm->_animationManager->_animBqe[idx]._enabledFl) - _vm->_objectsManager->hideBob(idx); + if (_vm->_animMan->_animBqe[idx]._enabledFl) + _vm->_objectsMan->hideBob(idx); } - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); + _vm->_events->refreshScreenAndEvents(); for (int idx = 21; idx <= 25; ++idx) { - if (_vm->_animationManager->_animBqe[idx]._enabledFl) - _vm->_objectsManager->resetBob(idx); + if (_vm->_animMan->_animBqe[idx]._enabledFl) + _vm->_objectsMan->resetBob(idx); } } int TalkManager::countBoxLines(int idx, const Common::String &file) { - _vm->_fontManager->_fontFixedWidth = 11; + _vm->_fontMan->_fontFixedWidth = 11; // Build up the filename Common::String filename; @@ -591,30 +591,30 @@ int TalkManager::countBoxLines(int idx, const Common::String &file) { void TalkManager::dialogAnim() { for (int idx = 21; idx <= 25; ++idx) { - if (_vm->_animationManager->_animBqe[idx]._enabledFl) + if (_vm->_animMan->_animBqe[idx]._enabledFl) displayBobDialogAnim(idx); } } void TalkManager::displayBobDialogAnim(int idx) { - _vm->_objectsManager->_priorityFl = true; - if (!_vm->_objectsManager->_bob[idx]._bobMode) { - _vm->_objectsManager->resetBob(idx); - byte *bqeData = _vm->_animationManager->_animBqe[idx]._data; + _vm->_objectsMan->_priorityFl = true; + if (!_vm->_objectsMan->_bob[idx]._bobMode) { + _vm->_objectsMan->resetBob(idx); + byte *bqeData = _vm->_animMan->_animBqe[idx]._data; int newMode = READ_LE_INT16(bqeData + 2); if (!newMode) newMode = 1; if (READ_LE_INT16(bqeData + 24)) { - _vm->_objectsManager->_bob[idx]._isSpriteFl = true; - _vm->_objectsManager->_bob[idx]._zoomFactor = 0; - _vm->_objectsManager->_bob[idx]._flipFl = false; - _vm->_objectsManager->_bob[idx]._animData = _vm->_animationManager->_animBqe[idx]._data; - _vm->_objectsManager->_bob[idx]._bobMode = 10; + _vm->_objectsMan->_bob[idx]._isSpriteFl = true; + _vm->_objectsMan->_bob[idx]._zoomFactor = 0; + _vm->_objectsMan->_bob[idx]._flipFl = false; + _vm->_objectsMan->_bob[idx]._animData = _vm->_animMan->_animBqe[idx]._data; + _vm->_objectsMan->_bob[idx]._bobMode = 10; bqeData = _characterSprite; - _vm->_objectsManager->_bob[idx]._spriteData = _characterSprite; - _vm->_objectsManager->_bob[idx]._bobModeChange = newMode; - _vm->_objectsManager->_bob[idx]._modeChangeCtr = -1; - _vm->_objectsManager->_bob[idx]._modeChangeUnused = 0; + _vm->_objectsMan->_bob[idx]._spriteData = _characterSprite; + _vm->_objectsMan->_bob[idx]._bobModeChange = newMode; + _vm->_objectsMan->_bob[idx]._modeChangeCtr = -1; + _vm->_objectsMan->_bob[idx]._modeChangeUnused = 0; } } } @@ -638,7 +638,7 @@ void TalkManager::startCharacterAnim0(int startIdx, bool readOnlyFl) { if (!READ_LE_INT16(&_characterAnim[2 * idx + 4])) break; if (_vm->_globals->_speed != 501) - _vm->_graphicsManager->fastDisplay(_characterSprite, _vm->_eventsManager->_startPos.x + READ_LE_INT16(&_characterAnim[2 * idx]), + _vm->_graphicsMan->fastDisplay(_characterSprite, _vm->_events->_startPos.x + READ_LE_INT16(&_characterAnim[2 * idx]), READ_LE_INT16(&_characterAnim[2 * idx + 2]), _characterAnim[2 * idx + 8]); idx += 5; } while (_vm->_globals->_speed != 501); @@ -694,8 +694,8 @@ void TalkManager::initCharacterAnim() { void TalkManager::clearCharacterAnim() { for (int idx = 21; idx <= 34; ++idx) { - _vm->_animationManager->_animBqe[idx]._data = _vm->_globals->freeMemory(_vm->_animationManager->_animBqe[idx]._data); - _vm->_animationManager->_animBqe[idx]._enabledFl = false; + _vm->_animMan->_animBqe[idx]._data = _vm->_globals->freeMemory(_vm->_animMan->_animBqe[idx]._data); + _vm->_animMan->_animBqe[idx]._enabledFl = false; } } @@ -712,25 +712,25 @@ bool TalkManager::searchCharacterAnim(int idx, const byte *bufPerso, int animId, if (READ_BE_UINT32(curPtr) == MKTAG('A', 'N', 'I', 'M') || READ_BE_UINT24(curPtr) == MKTAG24('F', 'I', 'N')) loopCond = true; if (bufIndx > bufferSize) { - _vm->_animationManager->_animBqe[idx]._enabledFl = false; - _vm->_animationManager->_animBqe[idx]._data = NULL; + _vm->_animMan->_animBqe[idx]._enabledFl = false; + _vm->_animMan->_animBqe[idx]._data = NULL; return false; } ++bufIndx; ++animLength; ++curPtr; } while (!loopCond); - _vm->_animationManager->_animBqe[idx]._data = _vm->_globals->allocMemory(animLength + 50); - _vm->_animationManager->_animBqe[idx]._enabledFl = true; - memcpy(_vm->_animationManager->_animBqe[idx]._data, (const byte *)(bufPerso + bufPos + 5), 20); + _vm->_animMan->_animBqe[idx]._data = _vm->_globals->allocMemory(animLength + 50); + _vm->_animMan->_animBqe[idx]._enabledFl = true; + memcpy(_vm->_animMan->_animBqe[idx]._data, (const byte *)(bufPerso + bufPos + 5), 20); int bqeVal = READ_LE_INT16(bufPos + bufPerso + 29); - WRITE_LE_UINT16(_vm->_animationManager->_animBqe[idx]._data + 20, READ_LE_INT16(bufPos + bufPerso + 25)); - WRITE_LE_UINT16(_vm->_animationManager->_animBqe[idx]._data + 22, READ_LE_INT16(bufPos + bufPerso + 27)); - WRITE_LE_UINT16(_vm->_animationManager->_animBqe[idx]._data + 24, bqeVal); - WRITE_LE_UINT16(_vm->_animationManager->_animBqe[idx]._data + 26, READ_LE_INT16(bufPos + bufPerso + 31)); - _vm->_animationManager->_animBqe[idx]._data[28] = bufPerso[bufPos + 33]; - _vm->_animationManager->_animBqe[idx]._data[29] = bufPerso[bufPos + 34]; - byte *bqeCurData = _vm->_animationManager->_animBqe[idx]._data + 20; + WRITE_LE_UINT16(_vm->_animMan->_animBqe[idx]._data + 20, READ_LE_INT16(bufPos + bufPerso + 25)); + WRITE_LE_UINT16(_vm->_animMan->_animBqe[idx]._data + 22, READ_LE_INT16(bufPos + bufPerso + 27)); + WRITE_LE_UINT16(_vm->_animMan->_animBqe[idx]._data + 24, bqeVal); + WRITE_LE_UINT16(_vm->_animMan->_animBqe[idx]._data + 26, READ_LE_INT16(bufPos + bufPerso + 31)); + _vm->_animMan->_animBqe[idx]._data[28] = bufPerso[bufPos + 33]; + _vm->_animMan->_animBqe[idx]._data[29] = bufPerso[bufPos + 34]; + byte *bqeCurData = _vm->_animMan->_animBqe[idx]._data + 20; const byte *curBufPerso = bufPos + bufPerso + 25; for (int i = 1; i < 5000; i++) { bqeCurData += 10; @@ -821,16 +821,16 @@ void TalkManager::handleAnswer(int zone, int verb) { innerLoopCond = false; int lastOpcodeResult = 1; do { - int opcodeType = _vm->_scriptManager->handleOpcode(ptr + 20 * lastOpcodeResult); + int opcodeType = _vm->_script->handleOpcode(ptr + 20 * lastOpcodeResult); if (_vm->shouldQuit()) return; if (opcodeType == 2) // GOTO - lastOpcodeResult = _vm->_scriptManager->handleGoto(ptr + 20 * lastOpcodeResult); + lastOpcodeResult = _vm->_script->handleGoto(ptr + 20 * lastOpcodeResult); else if (opcodeType == 3) // IF - lastOpcodeResult = _vm->_scriptManager->handleIf(ptr, lastOpcodeResult); + lastOpcodeResult = _vm->_script->handleIf(ptr, lastOpcodeResult); if (lastOpcodeResult == -1) error("Invalid IFF function"); @@ -844,8 +844,8 @@ void TalkManager::handleAnswer(int zone, int verb) { else if (opcodeType == 6) { // JUMP _vm->_globals->freeMemory(ptr); - zoneObj = _vm->_objectsManager->_jumpZone; - verbObj = _vm->_objectsManager->_jumpVerb; + zoneObj = _vm->_objectsMan->_jumpZone; + verbObj = _vm->_objectsMan->_jumpVerb; outerLoopFl = true; break; } @@ -862,26 +862,26 @@ void TalkManager::handleForestAnswser(int zone, int verb) { return; if (zone == 22 || zone == 23) { - _vm->_objectsManager->setFlipSprite(0, false); - _vm->_objectsManager->setSpriteIndex(0, 62); - _vm->_objectsManager->showSpecialActionAnimationWithFlip(_vm->_objectsManager->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, false); + _vm->_objectsMan->setFlipSprite(0, false); + _vm->_objectsMan->setSpriteIndex(0, 62); + _vm->_objectsMan->showSpecialActionAnimationWithFlip(_vm->_objectsMan->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, false); if (zone == 22) { - _vm->_objectsManager->lockAnimX(6, _vm->_objectsManager->getBobPosX(3)); - _vm->_objectsManager->lockAnimX(8, _vm->_objectsManager->getBobPosX(3)); + _vm->_objectsMan->lockAnimX(6, _vm->_objectsMan->getBobPosX(3)); + _vm->_objectsMan->lockAnimX(8, _vm->_objectsMan->getBobPosX(3)); } else { // zone == 23 - _vm->_objectsManager->lockAnimX(6, _vm->_objectsManager->getBobPosX(4)); - _vm->_objectsManager->lockAnimX(8, _vm->_objectsManager->getBobPosX(4)); + _vm->_objectsMan->lockAnimX(6, _vm->_objectsMan->getBobPosX(4)); + _vm->_objectsMan->lockAnimX(8, _vm->_objectsMan->getBobPosX(4)); } - _vm->_objectsManager->stopBobAnimation(3); - _vm->_objectsManager->stopBobAnimation(4); - _vm->_objectsManager->setBobAnimation(6); - _vm->_soundManager->playSample(1); - _vm->_objectsManager->showSpecialActionAnimation(_vm->_objectsManager->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); + _vm->_objectsMan->stopBobAnimation(3); + _vm->_objectsMan->stopBobAnimation(4); + _vm->_objectsMan->setBobAnimation(6); + _vm->_soundMan->playSample(1); + _vm->_objectsMan->showSpecialActionAnimation(_vm->_objectsMan->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); do - _vm->_eventsManager->refreshScreenAndEvents(); - while (_vm->_objectsManager->getBobAnimDataIdx(6) < 12); - _vm->_objectsManager->stopBobAnimation(6); - _vm->_objectsManager->setBobAnimation(8); + _vm->_events->refreshScreenAndEvents(); + while (_vm->_objectsMan->getBobAnimDataIdx(6) < 12); + _vm->_objectsMan->stopBobAnimation(6); + _vm->_objectsMan->setBobAnimation(8); switch (_vm->_globals->_screenId) { case 35: @@ -907,29 +907,29 @@ void TalkManager::handleForestAnswser(int zone, int verb) { break; } _vm->_globals->_saveData->_data[indx] = 2; - _vm->_linesManager->disableZone(22); - _vm->_linesManager->disableZone(23); + _vm->_linesMan->disableZone(22); + _vm->_linesMan->disableZone(23); } else if (zone == 20 || zone == 21) { - _vm->_objectsManager->setFlipSprite(0, true); - _vm->_objectsManager->setSpriteIndex(0, 62); - _vm->_objectsManager->showSpecialActionAnimationWithFlip(_vm->_objectsManager->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, true); + _vm->_objectsMan->setFlipSprite(0, true); + _vm->_objectsMan->setSpriteIndex(0, 62); + _vm->_objectsMan->showSpecialActionAnimationWithFlip(_vm->_objectsMan->_forestSprite, "2,3,4,5,6,7,8,9,10,11,12,-1,", 4, true); if (zone == 20) { - _vm->_objectsManager->lockAnimX(5, _vm->_objectsManager->getBobPosX(1)); - _vm->_objectsManager->lockAnimX(7, _vm->_objectsManager->getBobPosX(1)); + _vm->_objectsMan->lockAnimX(5, _vm->_objectsMan->getBobPosX(1)); + _vm->_objectsMan->lockAnimX(7, _vm->_objectsMan->getBobPosX(1)); } else { // zone == 21 - _vm->_objectsManager->lockAnimX(5, _vm->_objectsManager->getBobPosX(2)); - _vm->_objectsManager->lockAnimX(7, _vm->_objectsManager->getBobPosX(2)); + _vm->_objectsMan->lockAnimX(5, _vm->_objectsMan->getBobPosX(2)); + _vm->_objectsMan->lockAnimX(7, _vm->_objectsMan->getBobPosX(2)); } - _vm->_objectsManager->stopBobAnimation(1); - _vm->_objectsManager->stopBobAnimation(2); - _vm->_objectsManager->setBobAnimation(5); - _vm->_soundManager->playSample(1); - _vm->_objectsManager->showSpecialActionAnimation(_vm->_objectsManager->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); + _vm->_objectsMan->stopBobAnimation(1); + _vm->_objectsMan->stopBobAnimation(2); + _vm->_objectsMan->setBobAnimation(5); + _vm->_soundMan->playSample(1); + _vm->_objectsMan->showSpecialActionAnimation(_vm->_objectsMan->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4); do - _vm->_eventsManager->refreshScreenAndEvents(); - while (_vm->_objectsManager->getBobAnimDataIdx(5) < 12); - _vm->_objectsManager->stopBobAnimation(5); - _vm->_objectsManager->setBobAnimation(7); + _vm->_events->refreshScreenAndEvents(); + while (_vm->_objectsMan->getBobAnimDataIdx(5) < 12); + _vm->_objectsMan->stopBobAnimation(5); + _vm->_objectsMan->setBobAnimation(7); switch (_vm->_globals->_screenId) { case 35: indx = 200; @@ -954,32 +954,32 @@ void TalkManager::handleForestAnswser(int zone, int verb) { break; } _vm->_globals->_saveData->_data[indx] = 2; - _vm->_linesManager->disableZone(21); - _vm->_linesManager->disableZone(20); + _vm->_linesMan->disableZone(21); + _vm->_linesMan->disableZone(20); } } void TalkManager::animateObject(const Common::String &filename) { - _vm->_fontManager->hideText(5); - _vm->_fontManager->hideText(9); - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager->_scrollStatus = 1; - _vm->_linesManager->clearAllZones(); - _vm->_linesManager->resetLines(); - _vm->_objectsManager->resetHidingItems(); + _vm->_fontMan->hideText(5); + _vm->_fontMan->hideText(9); + _vm->_events->refreshScreenAndEvents(); + _vm->_graphicsMan->_scrollStatus = 1; + _vm->_linesMan->clearAllZones(); + _vm->_linesMan->resetLines(); + _vm->_objectsMan->resetHidingItems(); for (int i = 0; i <= 44; i++) - _vm->_linesManager->_bobZone[i] = 0; + _vm->_linesMan->_bobZone[i] = 0; - _vm->_objectsManager->_zoneNum = -1; - _vm->_eventsManager->_mouseCursorId = 4; - _vm->_eventsManager->changeMouseCursor(0); + _vm->_objectsMan->_zoneNum = -1; + _vm->_events->_mouseCursorId = 4; + _vm->_events->changeMouseCursor(0); bool fileFoundFl = false; - _characterBuffer = _vm->_fileManager->searchCat(filename, RES_PER, fileFoundFl); - _characterSize = _vm->_fileManager->_catalogSize; + _characterBuffer = _vm->_fileIO->searchCat(filename, RES_PER, fileFoundFl); + _characterSize = _vm->_fileIO->_catalogSize; if (!fileFoundFl) { - _characterBuffer = _vm->_fileManager->loadFile(filename); - _characterSize = _vm->_fileManager->fileSize(filename); + _characterBuffer = _vm->_fileIO->loadFile(filename); + _characterSize = _vm->_fileIO->fileSize(filename); } Common::String screenFilename; Common::String spriteFilename; @@ -992,47 +992,47 @@ void TalkManager::animateObject(const Common::String &filename) { curScreenFilename = Common::String::format("IM%d", _vm->_globals->_screenId); fileFoundFl = false; - _characterSprite = _vm->_fileManager->searchCat(spriteFilename, RES_SAN, fileFoundFl); + _characterSprite = _vm->_fileIO->searchCat(spriteFilename, RES_SAN, fileFoundFl); if (!fileFoundFl) - _characterSprite = _vm->_objectsManager->loadSprite(spriteFilename); + _characterSprite = _vm->_objectsMan->loadSprite(spriteFilename); else - _characterSprite = _vm->_objectsManager->loadSprite("RES_SAN.RES"); + _characterSprite = _vm->_objectsMan->loadSprite("RES_SAN.RES"); - _vm->_graphicsManager->backupScreen(); + _vm->_graphicsMan->backupScreen(); - if (!_vm->_graphicsManager->_lineNbr) - _vm->_graphicsManager->_scrollOffset = 0; - _vm->_graphicsManager->displayScreen(true); + if (!_vm->_graphicsMan->_lineNbr) + _vm->_graphicsMan->_scrollOffset = 0; + _vm->_graphicsMan->displayScreen(true); _paletteBufferIdx = 20 * READ_LE_INT16((uint16 *)_characterBuffer + 42) + 110; - _vm->_graphicsManager->displayScreen(true); - _vm->_objectsManager->_charactersEnabledFl = true; + _vm->_graphicsMan->displayScreen(true); + _vm->_objectsMan->_charactersEnabledFl = true; searchCharacterPalette(_paletteBufferIdx, true); startCharacterAnim0(_paletteBufferIdx, false); byte *oldAnswerBufferPtr = _vm->_globals->_answerBuffer; _vm->_globals->_answerBuffer = NULL; _vm->_globals->_freezeCharacterFl = true; - _vm->_objectsManager->loadLinkFile(screenFilename); - _vm->_objectsManager->_charactersEnabledFl = true; + _vm->_objectsMan->loadLinkFile(screenFilename); + _vm->_objectsMan->_charactersEnabledFl = true; _vm->_globals->_actionMoveTo = false; - _vm->_objectsManager->_zoneNum = -1; + _vm->_objectsMan->_zoneNum = -1; initCharacterAnim(); dialogAnim(); dialogWait(); - _vm->_graphicsManager->initScreen(screenFilename, 2, true); + _vm->_graphicsMan->initScreen(screenFilename, 2, true); _vm->_globals->_freezeCharacterFl = true; - _vm->_objectsManager->_forceZoneFl = true; - _vm->_objectsManager->_zoneNum = -1; + _vm->_objectsMan->_forceZoneFl = true; + _vm->_objectsMan->_zoneNum = -1; do { - int mouseButton = _vm->_eventsManager->getMouseButton(); + int mouseButton = _vm->_events->getMouseButton(); if (mouseButton == 1) - _vm->_objectsManager->handleLeftButton(); + _vm->_objectsMan->handleLeftButton(); else if (mouseButton == 2) - _vm->_objectsManager->handleRightButton(); + _vm->_objectsMan->handleRightButton(); - _vm->_linesManager->checkZone(); + _vm->_linesMan->checkZone(); if (_vm->_globals->_actionMoveTo) - _vm->_objectsManager->PARADISE(); - _vm->_eventsManager->refreshScreenAndEvents(); + _vm->_objectsMan->PARADISE(); + _vm->_events->refreshScreenAndEvents(); } while (!_vm->_globals->_exitId); dialogEndTalk(); dialogTalk(); @@ -1041,45 +1041,45 @@ void TalkManager::animateObject(const Common::String &filename) { _vm->_globals->_introSpeechOffFl = false; _characterBuffer = _vm->_globals->freeMemory(_characterBuffer); _characterSprite = _vm->_globals->freeMemory(_characterSprite); - _vm->_graphicsManager->displayScreen(false); - _vm->_linesManager->clearAllZones(); - _vm->_linesManager->resetLines(); - _vm->_objectsManager->resetHidingItems(); + _vm->_graphicsMan->displayScreen(false); + _vm->_linesMan->clearAllZones(); + _vm->_linesMan->resetLines(); + _vm->_objectsMan->resetHidingItems(); for (int i = 0; i <= 44; i++) - _vm->_linesManager->_bobZone[i] = 0; + _vm->_linesMan->_bobZone[i] = 0; _vm->_globals->freeMemory(_vm->_globals->_answerBuffer); _vm->_globals->_answerBuffer = oldAnswerBufferPtr; - _vm->_objectsManager->_disableFl = true; - _vm->_objectsManager->loadLinkFile(curScreenFilename); - _vm->_graphicsManager->initScreen(curScreenFilename, 2, true); - _vm->_objectsManager->_disableFl = false; + _vm->_objectsMan->_disableFl = true; + _vm->_objectsMan->loadLinkFile(curScreenFilename); + _vm->_graphicsMan->initScreen(curScreenFilename, 2, true); + _vm->_objectsMan->_disableFl = false; _vm->_globals->_freezeCharacterFl = false; if (_vm->_globals->_exitId == 101) _vm->_globals->_exitId = 0; - _vm->_graphicsManager->restoreScreen(); + _vm->_graphicsMan->restoreScreen(); - _vm->_objectsManager->_charactersEnabledFl = false; - _vm->_eventsManager->_mouseCursorId = 4; - _vm->_eventsManager->changeMouseCursor(4); - _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100); + _vm->_objectsMan->_charactersEnabledFl = false; + _vm->_events->_mouseCursorId = 4; + _vm->_events->changeMouseCursor(4); + _vm->_graphicsMan->setColorPercentage(253, 100, 100, 100); if (!_vm->getIsDemo()) - _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0); - - _vm->_graphicsManager->initColorTable(145, 150, _vm->_graphicsManager->_palette); - _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); - _vm->_graphicsManager->lockScreen(); - _vm->_graphicsManager->copy16BitRect(_vm->_graphicsManager->_backBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); - memcpy(_vm->_graphicsManager->_frontBuffer, _vm->_graphicsManager->_backBuffer, 614399); + _vm->_graphicsMan->setColorPercentage(254, 0, 0, 0); + + _vm->_graphicsMan->initColorTable(145, 150, _vm->_graphicsMan->_palette); + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); + _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_backBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsMan->unlockScreen(); + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); + memcpy(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_backBuffer, 614399); _vm->_globals->_disableInventFl = false; - _vm->_graphicsManager->updateScreen(); + _vm->_graphicsMan->updateScreen(); for (int i = 0; i <= 4; i++) - _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager->_scrollStatus = 0; + _vm->_events->refreshScreenAndEvents(); + _vm->_graphicsMan->_scrollStatus = 0; } } // End of namespace Hopkins |