diff options
author | Strangerke | 2013-03-20 07:36:06 +0100 |
---|---|---|
committer | Strangerke | 2013-03-20 07:36:06 +0100 |
commit | 6a446ff9d170640bf698f7ef19386050ee4bd9c2 (patch) | |
tree | 80e97559391c2a5dddaf5d9c1fc4c9acf9d3558b /engines/hopkins | |
parent | 852e65bd02bc1278386d79ca68f81e3d15e9fa43 (diff) | |
download | scummvm-rg350-6a446ff9d170640bf698f7ef19386050ee4bd9c2.tar.gz scummvm-rg350-6a446ff9d170640bf698f7ef19386050ee4bd9c2.tar.bz2 scummvm-rg350-6a446ff9d170640bf698f7ef19386050ee4bd9c2.zip |
HOPKINS: Remove setParent() from GraphicsManager
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/anim.cpp | 304 | ||||
-rw-r--r-- | engines/hopkins/computer.cpp | 146 | ||||
-rw-r--r-- | engines/hopkins/debugger.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/dialogs.cpp | 146 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 128 | ||||
-rw-r--r-- | engines/hopkins/font.cpp | 32 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 24 | ||||
-rw-r--r-- | engines/hopkins/graphics.h | 3 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 709 | ||||
-rw-r--r-- | engines/hopkins/hopkins.h | 2 | ||||
-rw-r--r-- | engines/hopkins/lines.cpp | 96 | ||||
-rw-r--r-- | engines/hopkins/menu.cpp | 24 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 474 | ||||
-rw-r--r-- | engines/hopkins/saveload.cpp | 10 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 216 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 102 |
16 files changed, 1208 insertions, 1210 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 8f0ce672c6..d98f8f790f 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -59,7 +59,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui _vm->_eventsManager->mouseOff(); bool hasScreenCopy = false; - byte *screenP = _vm->_graphicsManager._vesaScreen; + byte *screenP = _vm->_graphicsManager->_vesaScreen; Common::String tmpStr; // The Windows 95 demo only contains the interlaced version of the BOMBE1 and BOMBE2 videos @@ -73,37 +73,37 @@ 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->_graphicsManager->_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->_graphicsManager->lockScreen(); + _vm->_graphicsManager->clearScreen(); + _vm->_graphicsManager->unlockScreen(); } - if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) { + if (_vm->_graphicsManager->WinScan / 2 > SCREEN_WIDTH) { hasScreenCopy = true; screenCopy = _vm->_globals->allocMemory(307200); memcpy(screenCopy, screenP, 307200); } if (NO_SEQ) { if (hasScreenCopy) - memcpy(screenCopy, _vm->_graphicsManager._vesaBuffer, 307200); - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); + memcpy(screenCopy, _vm->_graphicsManager->_vesaBuffer, 307200); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); } else { - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); - _vm->_graphicsManager.lockScreen(); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); + _vm->_graphicsManager->lockScreen(); if (hasScreenCopy) - _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); else - _vm->_graphicsManager.m_scroll16(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager.unlockScreen(); + _vm->_graphicsManager->m_scroll16(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->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsManager->updateScreen(); } _vm->_eventsManager->_rateCounter = 0; _vm->_eventsManager->_escKeyFl = false; @@ -148,19 +148,19 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui if (!_vm->_eventsManager->_escKeyFl) { _vm->_eventsManager->_rateCounter = 0; - _vm->_graphicsManager.lockScreen(); + _vm->_graphicsManager->lockScreen(); if (hasScreenCopy) { if (*screenP != kByteStop) { - _vm->_graphicsManager.copyWinscanVbe3(screenP, screenCopy); - _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->copyWinscanVbe3(screenP, screenCopy); + _vm->_graphicsManager->m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } } else if (*screenP != kByteStop) { - _vm->_graphicsManager.copyVideoVbe16(screenP); + _vm->_graphicsManager->copyVideoVbe16(screenP); } - _vm->_graphicsManager.unlockScreen(); + _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager.addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsManager->updateScreen(); _vm->_soundManager.checkSoundEnd(); } } @@ -182,11 +182,11 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui _vm->_soundManager.checkSoundEnd(); } - if (_vm->_graphicsManager.FADE_LINUX == 2 && !hasScreenCopy) { + if (_vm->_graphicsManager->FADE_LINUX == 2 && !hasScreenCopy) { screenCopy = _vm->_globals->allocMemory(307200); f.seek(6); - f.read(_vm->_graphicsManager._palette, 800); + f.read(_vm->_graphicsManager->_palette, 800); f.skip(4); nbytes = f.readUint32LE(); f.skip(14); @@ -205,20 +205,20 @@ 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->_graphicsManager->copyWinscanVbe3(screenP, screenCopy); } - _vm->_graphicsManager.fadeOutDefaultLength(screenCopy); + _vm->_graphicsManager->fadeOutDefaultLength(screenCopy); screenCopy = _vm->_globals->freeMemory(screenCopy); } if (hasScreenCopy) { - if (_vm->_graphicsManager.FADE_LINUX == 2) - _vm->_graphicsManager.fadeOutDefaultLength(screenCopy); + if (_vm->_graphicsManager->FADE_LINUX == 2) + _vm->_graphicsManager->fadeOutDefaultLength(screenCopy); screenCopy = _vm->_globals->freeMemory(screenCopy); } - _vm->_graphicsManager.FADE_LINUX = 0; + _vm->_graphicsManager->FADE_LINUX = 0; f.close(); - _vm->_graphicsManager._skipVideoLockFl = false; + _vm->_graphicsManager->_skipVideoLockFl = false; _vm->_eventsManager->mouseOn(); } @@ -239,58 +239,58 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u bool hasScreenCopy = false; while (!_vm->shouldQuit()) { - memcpy(_vm->_graphicsManager._oldPalette, _vm->_graphicsManager._palette, 769); + memcpy(_vm->_graphicsManager->_oldPalette, _vm->_graphicsManager->_palette, 769); - if (_vm->_graphicsManager._lineNbr == SCREEN_WIDTH) - _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager._vesaScreen, 307200); - else if (_vm->_graphicsManager._lineNbr == (SCREEN_WIDTH * 2)) - _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager._vesaScreen, 614400); + if (_vm->_graphicsManager->_lineNbr == SCREEN_WIDTH) + _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 307200); + else if (_vm->_graphicsManager->_lineNbr == (SCREEN_WIDTH * 2)) + _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 614400); - if (!_vm->_graphicsManager._lineNbr) - _vm->_graphicsManager._scrollOffset = 0; + if (!_vm->_graphicsManager->_lineNbr) + _vm->_graphicsManager->_scrollOffset = 0; - screenP = _vm->_graphicsManager._vesaScreen; + screenP = _vm->_graphicsManager->_vesaScreen; if (!f.open(filename)) error("Error opening file - %s", filename.c_str()); f.skip(6); - f.read(_vm->_graphicsManager._palette, 800); + f.read(_vm->_graphicsManager->_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->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; - if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) { + _vm->_graphicsManager->_maxX = SCREEN_WIDTH; + if (_vm->_graphicsManager->WinScan / 2 > SCREEN_WIDTH) { hasScreenCopy = true; screenCopy = _vm->_globals->allocMemory(307200); memcpy(screenCopy, screenP, 307200); } if (NO_SEQ) { if (hasScreenCopy) - memcpy(screenCopy, _vm->_graphicsManager._vesaBuffer, 307200); - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); + memcpy(screenCopy, _vm->_graphicsManager->_vesaBuffer, 307200); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); } else { - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); - _vm->_graphicsManager.lockScreen(); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); + _vm->_graphicsManager->lockScreen(); if (hasScreenCopy) - _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); else - _vm->_graphicsManager.m_scroll16(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->m_scroll16(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager.unlockScreen(); + _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager.addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsManager->updateScreen(); } _vm->_eventsManager->_rateCounter = 0; _vm->_eventsManager->_escKeyFl = false; @@ -328,19 +328,19 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u } _vm->_eventsManager->_rateCounter = 0; - _vm->_graphicsManager.lockScreen(); + _vm->_graphicsManager->lockScreen(); if (*screenP != kByteStop) { if (hasScreenCopy) { - _vm->_graphicsManager.copyWinscanVbe3(screenP, screenCopy); - _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->copyWinscanVbe3(screenP, screenCopy); + _vm->_graphicsManager->m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } else { - _vm->_graphicsManager.copyVideoVbe16(screenP); + _vm->_graphicsManager->copyVideoVbe16(screenP); } } - _vm->_graphicsManager.unlockScreen(); + _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager.addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsManager->updateScreen(); _vm->_soundManager.checkSoundEnd(); } @@ -352,12 +352,12 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u } } - _vm->_graphicsManager._skipVideoLockFl = false; + _vm->_graphicsManager->_skipVideoLockFl = false; f.close(); - if (_vm->_graphicsManager.FADE_LINUX == 2 && !hasScreenCopy) { + if (_vm->_graphicsManager->FADE_LINUX == 2 && !hasScreenCopy) { f.seek(6); - f.read(_vm->_graphicsManager._palette, 800); + f.read(_vm->_graphicsManager->_palette, 800); f.skip(4); size_t nbytes = f.readUint32LE(); f.skip(14); @@ -376,46 +376,46 @@ 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->_graphicsManager->copyWinscanVbe3(screenP, ptra); } - _vm->_graphicsManager.fadeOutDefaultLength(ptra); + _vm->_graphicsManager->fadeOutDefaultLength(ptra); ptra = _vm->_globals->freeMemory(ptra); } if (hasScreenCopy) { - if (_vm->_graphicsManager.FADE_LINUX == 2) - _vm->_graphicsManager.fadeOutDefaultLength(screenCopy); + if (_vm->_graphicsManager->FADE_LINUX == 2) + _vm->_graphicsManager->fadeOutDefaultLength(screenCopy); _vm->_globals->freeMemory(screenCopy); } - _vm->_graphicsManager.FADE_LINUX = 0; + _vm->_graphicsManager->FADE_LINUX = 0; - _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen); + _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); - 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.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + 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->m_scroll16(_vm->_graphicsManager->_vesaBuffer, _vm->_eventsManager->_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.m_scroll16(_vm->_graphicsManager._vesaBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->setScreenWidth(SCREEN_WIDTH); + _vm->_graphicsManager->_maxX = SCREEN_WIDTH; + _vm->_graphicsManager->lockScreen(); + _vm->_graphicsManager->clearScreen(); + _vm->_graphicsManager->m_scroll16(_vm->_graphicsManager->_vesaBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } - _vm->_graphicsManager.unlockScreen(); - _vm->_graphicsManager.addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager.fadeInShort(); - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->fadeInShort(); + _vm->_graphicsManager->updateScreen(); _vm->_eventsManager->mouseOn(); } @@ -620,51 +620,51 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui if (!NO_COUL) { _vm->_eventsManager->refreshScreenAndEvents(); - if (_vm->_graphicsManager._lineNbr == SCREEN_WIDTH) - _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager._vesaScreen, 307200); - else if (_vm->_graphicsManager._lineNbr == (SCREEN_WIDTH * 2)) - _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager._vesaScreen, 614400); - if (!_vm->_graphicsManager._lineNbr) - _vm->_graphicsManager._scrollOffset = 0; + if (_vm->_graphicsManager->_lineNbr == SCREEN_WIDTH) + _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 307200); + else if (_vm->_graphicsManager->_lineNbr == (SCREEN_WIDTH * 2)) + _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 614400); + if (!_vm->_graphicsManager->_lineNbr) + _vm->_graphicsManager->_scrollOffset = 0; } - byte *screenP = _vm->_graphicsManager._vesaScreen; + byte *screenP = _vm->_graphicsManager->_vesaScreen; 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->_graphicsManager->_palette, 800); f.skip(4); size_t nbytes = f.readUint32LE(); f.skip(14); f.read(screenP, nbytes); byte *screenCopy = NULL; - if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) { + if (_vm->_graphicsManager->WinScan / 2 > SCREEN_WIDTH) { hasScreenCopy = true; screenCopy = _vm->_globals->allocMemory(307200); memcpy(screenCopy, screenP, 307200); } if (NO_SEQ) { if (hasScreenCopy) - memcpy(screenCopy, _vm->_graphicsManager._vesaBuffer, 307200); + memcpy(screenCopy, _vm->_graphicsManager->_vesaBuffer, 307200); if (!_vm->getIsDemo()) { - _vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); + _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0); } - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); } else { - _vm->_graphicsManager.lockScreen(); + _vm->_graphicsManager->lockScreen(); if (hasScreenCopy) - _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); else - _vm->_graphicsManager.m_scroll16(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager.unlockScreen(); + _vm->_graphicsManager->m_scroll16(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->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsManager->updateScreen(); } bool skipFl = false; if (_vm->getIsDemo()) { @@ -685,7 +685,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui } } else { if (NO_COUL) - _vm->_graphicsManager.fadeInDefaultLength(screenP); + _vm->_graphicsManager->fadeInDefaultLength(screenP); _vm->_eventsManager->_rateCounter = 0; _vm->_eventsManager->_escKeyFl = false; _vm->_soundManager.loadAnimSound(); @@ -734,19 +734,19 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui break; _vm->_eventsManager->_rateCounter = 0; - _vm->_graphicsManager.lockScreen(); + _vm->_graphicsManager->lockScreen(); if (hasScreenCopy) { if (*screenP != kByteStop) { - _vm->_graphicsManager.copyWinscanVbe(screenP, screenCopy); - _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->copyWinscanVbe(screenP, screenCopy); + _vm->_graphicsManager->m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } } else if (*screenP != kByteStop) { - _vm->_graphicsManager.copyVideoVbe16a(screenP); + _vm->_graphicsManager->copyVideoVbe16a(screenP); } - _vm->_graphicsManager.unlockScreen(); + _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager.addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsManager->updateScreen(); _vm->_soundManager.checkSoundEnd(); } } @@ -767,11 +767,11 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui if (!skipFl) _vm->_eventsManager->_rateCounter = 0; - _vm->_graphicsManager._skipVideoLockFl = false; + _vm->_graphicsManager->_skipVideoLockFl = false; f.close(); if (!NO_COUL) { - _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen); + _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); _vm->_eventsManager->_mouseFl = true; @@ -795,19 +795,19 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u return; _vm->_eventsManager->_mouseFl = false; - screenP = _vm->_graphicsManager._vesaScreen; + screenP = _vm->_graphicsManager->_vesaScreen; if (!f.open(file)) error("File not found - %s", file.c_str()); f.skip(6); - f.read(_vm->_graphicsManager._palette, 800); + f.read(_vm->_graphicsManager->_palette, 800); f.skip(4); size_t nbytes = f.readUint32LE(); f.skip(14); f.read(screenP, nbytes); - if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) { + if (_vm->_graphicsManager->WinScan / 2 > SCREEN_WIDTH) { multiScreenFl = true; screenCopy = _vm->_globals->allocMemory(307200); memcpy((void *)screenCopy, screenP, 307200); @@ -815,20 +815,20 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u if (NO_SEQ) { if (multiScreenFl) { assert(screenCopy != NULL); - memcpy((void *)screenCopy, _vm->_graphicsManager._vesaBuffer, 307200); + memcpy((void *)screenCopy, _vm->_graphicsManager->_vesaBuffer, 307200); } - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); } else { - _vm->_graphicsManager.lockScreen(); - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); + _vm->_graphicsManager->lockScreen(); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); if (multiScreenFl) - _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); else - _vm->_graphicsManager.m_scroll16(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager.unlockScreen(); + _vm->_graphicsManager->m_scroll16(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->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsManager->updateScreen(); } _vm->_eventsManager->_rateCounter = 0; _vm->_eventsManager->_escKeyFl = false; @@ -864,19 +864,19 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u } _vm->_eventsManager->_rateCounter = 0; - _vm->_graphicsManager.lockScreen(); + _vm->_graphicsManager->lockScreen(); if (multiScreenFl) { if (*screenP != kByteStop) { - _vm->_graphicsManager.copyWinscanVbe(screenP, screenCopy); - _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->copyWinscanVbe(screenP, screenCopy); + _vm->_graphicsManager->m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } } else if (*screenP != kByteStop) { - _vm->_graphicsManager.copyVideoVbe16a(screenP); + _vm->_graphicsManager->copyVideoVbe16a(screenP); } - _vm->_graphicsManager.unlockScreen(); + _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager.addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + _vm->_graphicsManager->updateScreen(); _vm->_soundManager.checkSoundEnd(); } } @@ -891,11 +891,11 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u _vm->_eventsManager->_rateCounter = 0; - if (_vm->_graphicsManager.FADE_LINUX == 2 && !multiScreenFl) { + if (_vm->_graphicsManager->FADE_LINUX == 2 && !multiScreenFl) { byte *ptra = _vm->_globals->allocMemory(307200); f.seek(6); - f.read(_vm->_graphicsManager._palette, 800); + f.read(_vm->_graphicsManager->_palette, 800); f.skip(4); size_t nbytes = f.readUint32LE(); f.skip(14); @@ -913,17 +913,17 @@ 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->_graphicsManager->copyWinscanVbe(screenP, ptra); } - _vm->_graphicsManager.fadeOutDefaultLength(ptra); + _vm->_graphicsManager->fadeOutDefaultLength(ptra); ptra = _vm->_globals->freeMemory(ptra); } if (multiScreenFl) { - if (_vm->_graphicsManager.FADE_LINUX == 2) - _vm->_graphicsManager.fadeOutDefaultLength(screenCopy); + if (_vm->_graphicsManager->FADE_LINUX == 2) + _vm->_graphicsManager->fadeOutDefaultLength(screenCopy); _vm->_globals->freeMemory(screenCopy); } - _vm->_graphicsManager.FADE_LINUX = 0; + _vm->_graphicsManager->FADE_LINUX = 0; f.close(); _vm->_eventsManager->_mouseFl = true; diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp index f9b33258e5..2359c8b2fa 100644 --- a/engines/hopkins/computer.cpp +++ b/engines/hopkins/computer.cpp @@ -71,12 +71,12 @@ void ComputerManager::setVideoMode() { * Sets up Textual entry mode */ void ComputerManager::setTextMode() { - _vm->_graphicsManager.clearPalette(); - _vm->_graphicsManager.lockScreen(); - _vm->_graphicsManager.clearScreen(); - _vm->_graphicsManager.unlockScreen(); + _vm->_graphicsManager->clearPalette(); + _vm->_graphicsManager->lockScreen(); + _vm->_graphicsManager->clearScreen(); + _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager._lineNbr = SCREEN_WIDTH; + _vm->_graphicsManager->_lineNbr = SCREEN_WIDTH; _vm->_fontManager->_font = _vm->_globals->freeMemory(_vm->_fontManager->_font); Common::String filename = "STFONT.SPR"; @@ -87,8 +87,8 @@ void ComputerManager::setTextMode() { _vm->_fontManager->_fontFixedWidth = 8; _vm->_fontManager->_fontFixedHeight = 8; - _vm->_graphicsManager.loadImage("WINTEXT"); - _vm->_graphicsManager.fadeInLong(); + _vm->_graphicsManager->loadImage("WINTEXT"); + _vm->_graphicsManager->fadeInLong(); loadMenu(); _vm->_eventsManager->_mouseFl = false; } @@ -97,8 +97,8 @@ void ComputerManager::setTextMode() { * Clear the screen */ void ComputerManager::clearScreen() { - _vm->_graphicsManager.loadImage("WINTEXT"); - _vm->_graphicsManager.fadeInLong(); + _vm->_graphicsManager->loadImage("WINTEXT"); + _vm->_graphicsManager->fadeInLong(); } /** @@ -125,7 +125,7 @@ void ComputerManager::setTextPosition(int yp, int xp) { */ void ComputerManager::showComputer(ComputerEnum mode) { _vm->_eventsManager->_escKeyFl = false; - _vm->_graphicsManager.resetDirtyRects(); + _vm->_graphicsManager->resetDirtyRects(); setVideoMode(); setTextColor(4); setTextPosition(2, 4); @@ -258,10 +258,10 @@ void ComputerManager::showComputer(ComputerEnum mode) { } } } - _vm->_graphicsManager.lockScreen(); - _vm->_graphicsManager.clearScreen(); - _vm->_graphicsManager.unlockScreen(); - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->lockScreen(); + _vm->_graphicsManager->clearScreen(); + _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsManager->updateScreen(); restoreFBIRoom(); } else { // Password doesn't match - Access Denied @@ -271,11 +271,11 @@ void ComputerManager::showComputer(ComputerEnum mode) { _vm->_eventsManager->refreshScreenAndEvents(); _vm->_eventsManager->delay(1000); - memset(_vm->_graphicsManager._vesaBuffer, 0, 307199); - _vm->_graphicsManager.lockScreen(); - _vm->_graphicsManager.clearScreen(); - _vm->_graphicsManager.unlockScreen(); - _vm->_graphicsManager.updateScreen(); + memset(_vm->_graphicsManager->_vesaBuffer, 0, 307199); + _vm->_graphicsManager->lockScreen(); + _vm->_graphicsManager->clearScreen(); + _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsManager->updateScreen(); restoreFBIRoom(); _vm->_eventsManager->mouseOff(); } @@ -285,7 +285,7 @@ void ComputerManager::showComputer(ComputerEnum mode) { else // Free access or Samantha _vm->_globals->_exitId = 14; - _vm->_graphicsManager.resetDirtyRects(); + _vm->_graphicsManager->resetDirtyRects(); } static const char _englishText[] = @@ -423,14 +423,14 @@ void ComputerManager::displayMessage(int xp, int yp, int textIdx) { _inputBuf[textIndex--] = 0; x1 -= _vm->_fontManager->_fontFixedWidth; x2 = x1 + 2 * _vm->_fontManager->_fontFixedWidth; - _vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, 3 * _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager._vesaBuffer, x1, yp); - _vm->_graphicsManager.addDirtyRect(x1, yp, x2, yp + 12); + _vm->_graphicsManager->Copy_Mem(_vm->_graphicsManager->_vesaScreen, x1, yp, 3 * _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager->_vesaBuffer, x1, yp); + _vm->_graphicsManager->addDirtyRect(x1, yp, x2, yp + 12); _vm->_fontManager->displayTextVesa(x1, yp, "_", 252); } if (mappedChar != '*') { char newChar = mappedChar; - _vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager._vesaBuffer, x1, yp); - _vm->_graphicsManager.addDirtyRect(x1, yp, _vm->_fontManager->_fontFixedWidth + x1, yp + 12); + _vm->_graphicsManager->Copy_Mem(_vm->_graphicsManager->_vesaScreen, x1, yp, _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager->_vesaBuffer, x1, yp); + _vm->_graphicsManager->addDirtyRect(x1, yp, _vm->_fontManager->_fontFixedWidth + x1, yp + 12); _inputBuf[textIndex] = newChar; Common::String charString = Common::String::format("%c_", newChar); @@ -441,8 +441,8 @@ void ComputerManager::displayMessage(int xp, int yp, int textIdx) { _vm->_eventsManager->refreshScreenAndEvents(); } while (textIndex != textIdx && curChar != 13); - _vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager._vesaBuffer, x1, yp); - _vm->_graphicsManager.addDirtyRect(x1, yp, _vm->_fontManager->_fontFixedWidth + x1, yp + 12); + _vm->_graphicsManager->Copy_Mem(_vm->_graphicsManager->_vesaScreen, x1, yp, _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager->_vesaBuffer, x1, yp); + _vm->_graphicsManager->addDirtyRect(x1, yp, _vm->_fontManager->_fontFixedWidth + x1, yp + 12); _vm->_eventsManager->refreshScreenAndEvents(); _inputBuf[textIndex] = 0; @@ -545,9 +545,9 @@ void ComputerManager::displayGamesSubMenu() { _ballRightFl = false; _ballUpFl = false; _breakoutLevelNbr = 0; - _vm->_graphicsManager._minY = 0; - _vm->_graphicsManager._maxX = 320; - _vm->_graphicsManager._maxY = 200; + _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"); @@ -556,10 +556,10 @@ void ComputerManager::displayGamesSubMenu() { setModeVGA256(); newLevel(); - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->updateScreen(); playBreakout(); - _vm->_graphicsManager.resetDirtyRects(); + _vm->_graphicsManager->resetDirtyRects(); _breakoutSpr = _vm->_globals->freeMemory(_breakoutSpr); _breakoutLevel = (int16 *)_vm->_globals->freeMemory((byte *)_breakoutLevel); _vm->_objectsManager._sprite[0]._spriteData = oldSpriteData; @@ -572,9 +572,9 @@ void ComputerManager::displayGamesSubMenu() { setVideoMode(); setTextColor(15); clearScreen(); - _vm->_graphicsManager._maxX = 680; - _vm->_graphicsManager._minY = 0; - _vm->_graphicsManager._maxY = 460; + _vm->_graphicsManager->_maxX = 680; + _vm->_graphicsManager->_minY = 0; + _vm->_graphicsManager->_maxY = 460; } /** @@ -608,11 +608,11 @@ 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->_graphicsManager->lockScreen(); + _vm->_graphicsManager->clearScreen(); + _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsManager->clearPalette(); + _vm->_graphicsManager->setScreenWidth(320); } /** @@ -624,7 +624,7 @@ void ComputerManager::newLevel() { ++_breakoutLives; if (_breakoutLives > 11) _breakoutLives = 11; - _vm->_graphicsManager.loadVgaImage("CASSEF.PCX"); + _vm->_graphicsManager->loadVgaImage("CASSEF.PCX"); displayLives(); _breakoutLevel = (int16 *)_vm->_globals->freeMemory((byte *)_breakoutLevel); @@ -678,25 +678,25 @@ void ComputerManager::displayBricks() { switch (cellType) { case 1: - _vm->_graphicsManager.AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 21); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 21); break; case 2: - _vm->_graphicsManager.AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 22); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 22); break; case 3: - _vm->_graphicsManager.AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 17); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 17); break; case 4: - _vm->_graphicsManager.AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 20); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 20); break; case 5: - _vm->_graphicsManager.AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 19); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 19); break; case 6: - _vm->_graphicsManager.AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 18); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 18); break; case 31: - _vm->_graphicsManager.AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 23); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 23); break; } } @@ -709,12 +709,12 @@ void ComputerManager::displayBricks() { */ void ComputerManager::displayLives() { for (int i = 0, xp = 10; i <= 11; i++, xp += 7) - _vm->_graphicsManager.AFFICHE_SPEEDVGA(_breakoutSpr, xp, 10, 15); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, xp, 10, 15); for (int i = 0, xp = 10; i < _breakoutLives - 1; i++, xp += 7) - _vm->_graphicsManager.AFFICHE_SPEEDVGA(_breakoutSpr, xp, 10, 14); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, xp, 10, 14); - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->updateScreen(); } /** @@ -730,9 +730,9 @@ void ComputerManager::playBreakout() { _vm->_objectsManager.setSpriteY(1, 187); _vm->_objectsManager.setSpriteX(1, _ballPosition.x); - _vm->_graphicsManager.resetDirtyRects(); + _vm->_graphicsManager->resetDirtyRects(); _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager.fadeInBreakout(); + _vm->_graphicsManager->fadeInBreakout(); // Wait for mouse press to start playing do { @@ -776,7 +776,7 @@ void ComputerManager::playBreakout() { continue; } - _vm->_graphicsManager.fadeOutBreakout(); + _vm->_graphicsManager->fadeOutBreakout(); _vm->_eventsManager->mouseOn(); _vm->_objectsManager.removeSprite(0); _vm->_objectsManager.removeSprite(1); @@ -797,7 +797,7 @@ void ComputerManager::playBreakout() { } if (lastBreakoutEvent != 2) return; - _vm->_graphicsManager.fadeOutBreakout(); + _vm->_graphicsManager->fadeOutBreakout(); newLevel(); } } @@ -807,14 +807,14 @@ void ComputerManager::playBreakout() { * @return The selected button index: 1 = Game, 2 = Quit */ int ComputerManager::displayHiscores() { - _vm->_graphicsManager.resetDirtyRects(); + _vm->_graphicsManager->resetDirtyRects(); loadHiscore(); - _vm->_graphicsManager.loadVgaImage("HISCORE.PCX"); + _vm->_graphicsManager->loadVgaImage("HISCORE.PCX"); byte *ptr = _vm->_fileManager->loadFile("ALPHA.SPR"); - _vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); + _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0); int yp; int xp; @@ -832,8 +832,8 @@ int ComputerManager::displayHiscores() { displayHiscoreLine(ptr, 9 * i + 199, yp, _score[scoreIndex]._score[i]); } - _vm->_graphicsManager.fadeInBreakout(); - _vm->_graphicsManager.resetDirtyRects(); + _vm->_graphicsManager->fadeInBreakout(); + _vm->_graphicsManager->resetDirtyRects(); int buttonIndex = 0; do { _vm->_eventsManager->refreshEvents(); @@ -849,7 +849,7 @@ int ComputerManager::displayHiscores() { } while (!buttonIndex && !_vm->shouldQuit()); _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager.fadeOutBreakout(); + _vm->_graphicsManager->fadeOutBreakout(); _vm->_globals->freeMemory(ptr); return buttonIndex; } @@ -858,13 +858,13 @@ 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.SETCOLOR3(252, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); + _vm->_graphicsManager->loadVgaImage("NAME.PCX"); + _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0); byte *ptr = _vm->_fileManager->loadFile("ALPHA.SPR"); - _vm->_graphicsManager.fadeInBreakout(); + _vm->_graphicsManager->fadeInBreakout(); for (int strPos = 0; strPos <= 4; strPos++) { displayHiscoreLine(ptr, 9 * strPos + 140, 78, 1); @@ -892,7 +892,7 @@ void ComputerManager::getScoreName() { for (int i = scoreLen, scorePos = 8; i >= 0; i--) { _score[5]._score.setChar(score[i], scorePos--); } - _vm->_graphicsManager.fadeOutBreakout(); + _vm->_graphicsManager->fadeOutBreakout(); _vm->_globals->freeMemory(ptr); saveScore(); } @@ -941,7 +941,7 @@ void ComputerManager::displayScoreChar(int charPos, int charDisp) { if (charDisp >= '0' && charDisp <= '9') idx = charDisp - 45; - _vm->_graphicsManager.AFFICHE_SPEEDVGA(_breakoutSpr, xp, 11, idx); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, xp, 11, idx); } /** @@ -1010,7 +1010,7 @@ void ComputerManager::displayHiscoreLine(byte *objectData, int x, int y, int cur idx = curChar - 'A' + 10; else if (curChar == 1) idx = 37; - _vm->_graphicsManager.AFFICHE_SPEEDVGA(objectData, x, y, idx); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(objectData, x, y, idx); } /** @@ -1183,7 +1183,7 @@ void ComputerManager::checkBallCollisions() { _vm->_soundManager.playSample(2, 6); } else { _vm->_soundManager.playSample(1, 5); - _vm->_graphicsManager.AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellUp, 16); + _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellUp, 16); switch (cellType) { case 1: _breakoutScore += 10; diff --git a/engines/hopkins/debugger.cpp b/engines/hopkins/debugger.cpp index 8e53b94eec..71162b02b1 100644 --- a/engines/hopkins/debugger.cpp +++ b/engines/hopkins/debugger.cpp @@ -40,7 +40,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->_graphicsManager->_showDirtyRects = !strcmp(argv[1], "on"); return false; } } diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp index 2474aace54..cc064dc201 100644 --- a/engines/hopkins/dialogs.cpp +++ b/engines/hopkins/dialogs.cpp @@ -72,7 +72,7 @@ void DialogsManager::showOptionsDialog() { _vm->_globals->_optionDialogSpr = _vm->_fileManager->loadFile(filename); _vm->_globals->_optionDialogFl = true; - int scrollOffset = _vm->_graphicsManager._scrollOffset; + int scrollOffset = _vm->_graphicsManager->_scrollOffset; bool doneFlag = false; do { if (_vm->_eventsManager->getMouseButton()) { @@ -196,45 +196,45 @@ 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->_graphicsManager->_scrollSpeed) { case 1: - _vm->_graphicsManager._scrollSpeed = 2; + _vm->_graphicsManager->_scrollSpeed = 2; break; case 2: - _vm->_graphicsManager._scrollSpeed = 4; + _vm->_graphicsManager->_scrollSpeed = 4; break; case 4: - _vm->_graphicsManager._scrollSpeed = 8; + _vm->_graphicsManager->_scrollSpeed = 8; break; case 8: - _vm->_graphicsManager._scrollSpeed = 16; + _vm->_graphicsManager->_scrollSpeed = 16; break; case 16: - _vm->_graphicsManager._scrollSpeed = 32; + _vm->_graphicsManager->_scrollSpeed = 32; break; case 32: - _vm->_graphicsManager._scrollSpeed = 48; + _vm->_graphicsManager->_scrollSpeed = 48; break; case 48: - _vm->_graphicsManager._scrollSpeed = 64; + _vm->_graphicsManager->_scrollSpeed = 64; break; case 64: - _vm->_graphicsManager._scrollSpeed = 128; + _vm->_graphicsManager->_scrollSpeed = 128; break; case 128: - _vm->_graphicsManager._scrollSpeed = 160; + _vm->_graphicsManager->_scrollSpeed = 160; break; case 160: - _vm->_graphicsManager._scrollSpeed = 320; + _vm->_graphicsManager->_scrollSpeed = 320; break; case 320: - _vm->_graphicsManager._scrollSpeed = 1; + _vm->_graphicsManager->_scrollSpeed = 1; break; } } // Values are blocked, thus handling the zone is useless - //if (mousePos.x >= _vm->_graphicsManager.ofscroll + 348 && mousePos.y > 248 && mousePos.x <= _vm->_graphicsManager.ofscroll + 394 && mousePos.y <= 273) + //if (mousePos.x >= _vm->_graphicsManager->ofscroll + 348 && mousePos.y > 248 && mousePos.x <= _vm->_graphicsManager->ofscroll + 394 && mousePos.y <= 273) // _vm->_globals->_speed = 2; if ( mousePos.x < scrollOffset + 165 || mousePos.x > scrollOffset + 496 @@ -256,7 +256,7 @@ void DialogsManager::showOptionsDialog() { _vm->_globals->_menuDisplayType = 9; - switch (_vm->_graphicsManager._scrollSpeed) { + switch (_vm->_graphicsManager->_scrollSpeed) { case 1: _vm->_globals->_menuScrollSpeed = 12; break; @@ -298,9 +298,9 @@ void DialogsManager::showOptionsDialog() { _vm->_eventsManager->refreshScreenAndEvents(); } while (!doneFlag); - _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, scrollOffset + 164, - 107, 335, 215, _vm->_graphicsManager._vesaBuffer, scrollOffset + 164, 107); - _vm->_graphicsManager.addDirtyRect(scrollOffset + 164, 107, scrollOffset + 498, 320); + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, scrollOffset + 164, + 107, 335, 215, _vm->_graphicsManager->_vesaBuffer, scrollOffset + 164, 107); + _vm->_graphicsManager->addDirtyRect(scrollOffset + 164, 107, scrollOffset + 498, 320); _vm->_globals->_optionDialogSpr = _vm->_globals->freeMemory(_vm->_globals->_optionDialogSpr); _vm->_globals->_optionDialogFl = false; @@ -310,7 +310,7 @@ void DialogsManager::showInventory() { if (_removeInventFl || _inventDisplayedFl || _vm->_globals->_disableInventFl) return; - _vm->_graphicsManager._scrollStatus = 1; + _vm->_graphicsManager->_scrollStatus = 1; _vm->_objectsManager._eraseVisibleCounter = 4; _vm->_objectsManager._visibleFl = false; for (int i = 0; i <= 1; i++) { @@ -327,7 +327,7 @@ void DialogsManager::showInventory() { _vm->_eventsManager->_curMouseButton = 0; _vm->_eventsManager->_mouseButton = 0; _vm->_globals->_disableInventFl = true; - _vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100); Common::String filename; if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) @@ -357,12 +357,12 @@ void DialogsManager::showInventory() { _inventBuf2 = _vm->_fileManager->loadFile("INVENT2.SPR"); - _inventX = _vm->_graphicsManager._scrollOffset + 152; + _inventX = _vm->_graphicsManager->_scrollOffset + 152; _inventY = 114; _inventWidth = _vm->_objectsManager.getWidth(_inventWin1, 0); _inventHeight = _vm->_objectsManager.getHeight(_inventWin1, 0); - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _inventWin1, _inventX + 300, 414, 0, 0, 0, false); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _inventWin1, _inventX + 300, 414, 0, 0, 0, false); int curPosY = 0; int inventCount = 0; for (int inventLine = 1; inventLine <= 5; inventLine++) { @@ -373,7 +373,7 @@ void DialogsManager::showInventory() { // 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._vesaBuffer, obj, _inventX + curPosX + 6, + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, obj, _inventX + curPosX + 6, curPosY + 120, _vm->_globals->_objectWidth, _vm->_globals->_objectHeight); _vm->_globals->freeMemory(obj); } @@ -381,7 +381,7 @@ void DialogsManager::showInventory() { }; curPosY += 38; } - _vm->_graphicsManager.copySurfaceRect(_vm->_graphicsManager._vesaBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight); + _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_vesaBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight); _vm->_eventsManager->_curMouseButton = 0; int newInventoryItem = 0; @@ -449,8 +449,8 @@ void DialogsManager::showInventory() { _vm->_fontManager->hideText(9); if (_inventDisplayedFl) { _inventDisplayedFl = false; - _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, _inventX, 114, _inventWidth, _inventHeight, _vm->_graphicsManager._vesaBuffer, _inventX, 114); - _vm->_graphicsManager.addDirtyRect(_inventX, 114, _inventX + _inventWidth, _inventWidth + 114); + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _inventX, 114, _inventWidth, _inventHeight, _vm->_graphicsManager->_vesaBuffer, _inventX, 114); + _vm->_graphicsManager->addDirtyRect(_inventX, 114, _inventX + _inventWidth, _inventWidth + 114); _vm->_objectsManager.BOBTOUS = true; } @@ -469,7 +469,7 @@ void DialogsManager::showInventory() { _vm->_objectsManager._oldBorderPos = Common::Point(0, 0); _vm->_objectsManager._borderPos = Common::Point(0, 0); _vm->_globals->_disableInventFl = false; - _vm->_graphicsManager._scrollStatus = 0; + _vm->_graphicsManager->_scrollStatus = 0; } /** @@ -480,41 +480,41 @@ void DialogsManager::inventAnim() { return; if (_vm->_objectsManager._eraseVisibleCounter && !_vm->_objectsManager._visibleFl) { - _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, _vm->_objectsManager._oldInventoryPosX, 27, 48, 38, - _vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._oldInventoryPosX, 27); - _vm->_graphicsManager.addDirtyRect(_vm->_objectsManager._oldInventoryPosX, 27, _vm->_objectsManager._oldInventoryPosX + 48, 65); + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_objectsManager._oldInventoryPosX, 27, 48, 38, + _vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._oldInventoryPosX, 27); + _vm->_graphicsManager->addDirtyRect(_vm->_objectsManager._oldInventoryPosX, 27, _vm->_objectsManager._oldInventoryPosX + 48, 65); --_vm->_objectsManager._eraseVisibleCounter; } if (_vm->_objectsManager._visibleFl) { if (_vm->_objectsManager._oldInventoryPosX <= 1) _vm->_objectsManager._oldInventoryPosX = 2; - _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, _vm->_objectsManager._oldInventoryPosX, 27, 48, 38, - _vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._oldInventoryPosX, 27); + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_objectsManager._oldInventoryPosX, 27, 48, 38, + _vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._oldInventoryPosX, 27); - _vm->_graphicsManager.addDirtyRect(_vm->_objectsManager._oldInventoryPosX, 27, _vm->_objectsManager._oldInventoryPosX + 48, 65); - int newOffset = _vm->_graphicsManager._scrollOffset + 2; - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _inventoryIcons, newOffset + 300, 327, 0); - _vm->_graphicsManager.addDirtyRect(newOffset, 27, newOffset + 45, 62); + _vm->_graphicsManager->addDirtyRect(_vm->_objectsManager._oldInventoryPosX, 27, _vm->_objectsManager._oldInventoryPosX + 48, 65); + int newOffset = _vm->_graphicsManager->_scrollOffset + 2; + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _inventoryIcons, newOffset + 300, 327, 0); + _vm->_graphicsManager->addDirtyRect(newOffset, 27, newOffset + 45, 62); _vm->_objectsManager._oldInventoryPosX = newOffset; } if (_vm->_globals->_saveData->_data[svField357] == 1) { if (_vm->_globals->_saveData->_data[svField353] == 1) - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._headSprites, 832, 325, 0, 0, 0, false); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._headSprites, 832, 325, 0, 0, 0, false); if (_vm->_globals->_saveData->_data[svField355] == 1) - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._headSprites, 866, 325, 1, 0, 0, false); - _vm->_graphicsManager.addDirtyRect(532, 25, 560, 60); - _vm->_graphicsManager.addDirtyRect(566, 25, 594, 60); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._headSprites, 866, 325, 1, 0, 0, false); + _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); + _vm->_graphicsManager->addDirtyRect(566, 25, 594, 60); } if (_vm->_globals->_saveData->_data[svField356] == 1) { - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._headSprites, 832, 325, 0, 0, 0, false); - _vm->_graphicsManager.addDirtyRect(532, 25, 560, 60); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._headSprites, 832, 325, 0, 0, 0, false); + _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); } if (_vm->_globals->_saveData->_data[svField354] == 1) { - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._headSprites, 832, 325, 0, 0, 0, false); - _vm->_graphicsManager.addDirtyRect(532, 25, 560, 60); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._headSprites, 832, 325, 0, 0, 0, false); + _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); } } @@ -537,19 +537,19 @@ void DialogsManager::testDialogOpening() { showInventory(); break; case KEY_OPTIONS: - _vm->_graphicsManager._scrollStatus = 1; + _vm->_graphicsManager->_scrollStatus = 1; showOptionsDialog(); - _vm->_graphicsManager._scrollStatus = 0; + _vm->_graphicsManager->_scrollStatus = 0; break; case KEY_LOAD: - _vm->_graphicsManager._scrollStatus = 1; + _vm->_graphicsManager->_scrollStatus = 1; showLoadGame(); - _vm->_graphicsManager._scrollStatus = 0; + _vm->_graphicsManager->_scrollStatus = 0; break; case KEY_SAVE: - _vm->_graphicsManager._scrollStatus = 1; + _vm->_graphicsManager->_scrollStatus = 1; showSaveGame(); - _vm->_graphicsManager._scrollStatus = 0; + _vm->_graphicsManager->_scrollStatus = 0; break; default: break; @@ -572,8 +572,8 @@ void DialogsManager::showLoadGame() { _vm->_eventsManager->refreshScreenAndEvents(); } while (!_vm->shouldQuit() && (!slotNumber || _vm->_eventsManager->getMouseButton() != 1)); _vm->_objectsManager._saveLoadFl = false; - _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager._vesaBuffer, _vm->_eventsManager->_startPos.x + 183, 60); - _vm->_graphicsManager.addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, 457, 413); + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager->_vesaBuffer, _vm->_eventsManager->_startPos.x + 183, 60); + _vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, 457, 413); _vm->_objectsManager.BOBTOUS = true; _vm->_objectsManager._saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager._saveLoadSprite); _vm->_objectsManager._saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsManager._saveLoadSprite2); @@ -601,8 +601,8 @@ void DialogsManager::showSaveGame() { } while (!_vm->shouldQuit() && (!slotNumber || _vm->_eventsManager->getMouseButton() != 1)); _vm->_objectsManager._saveLoadFl = false; - _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager._vesaBuffer, _vm->_eventsManager->_startPos.x + 183, 60); - _vm->_graphicsManager.addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, _vm->_eventsManager->_startPos.x + 457, 413); + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager->_vesaBuffer, _vm->_eventsManager->_startPos.x + 183, 60); + _vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, _vm->_eventsManager->_startPos.x + 457, 413); _vm->_objectsManager.BOBTOUS = true; _vm->_objectsManager._saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager._saveLoadSprite); _vm->_objectsManager._saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsManager._saveLoadSprite2); @@ -642,18 +642,18 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) { _vm->_objectsManager._saveLoadSprite = _vm->_objectsManager.loadSprite(filename); _vm->_objectsManager._saveLoadSprite2 = _vm->_objectsManager.loadSprite("SAVE2.SPR"); - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 483, 360, 0); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 483, 360, 0); if (_vm->_globals->_language == LANG_FR) { if (mode == MODE_SAVE) - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 525, 375, 1); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 525, 375, 1); else if (mode == MODE_LOAD) - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 515, 375, 2); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 515, 375, 2); } else { if (mode == MODE_SAVE) - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 535, 372, 1); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 535, 372, 1); else if (mode == MODE_LOAD) - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 539, 372, 2); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 539, 372, 2); } for (int slotNumber = 1; slotNumber <= 6; ++slotNumber) { @@ -666,22 +666,22 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) { switch (slotNumber) { case 1: - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 190, 112, 128, 87); + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 190, 112, 128, 87); break; case 2: - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 323, 112, 128, 87); + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 323, 112, 128, 87); break; case 3: - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 190, 203, 128, 87); + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 190, 203, 128, 87); break; case 4: - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 323, 203, 128, 87); + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 323, 203, 128, 87); break; case 5: - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 190, 294, 128, 87); + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 190, 294, 128, 87); break; case 6: - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 323, 294, 128, 87); + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 323, 294, 128, 87); break; } @@ -691,7 +691,7 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) { } } - _vm->_graphicsManager.copySurfaceRect(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353); + _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353); _vm->_objectsManager._saveLoadFl = true; _vm->_objectsManager._saveLoadX = 0; _vm->_objectsManager._saveLoadY = 0; @@ -704,7 +704,7 @@ int DialogsManager::searchSavegames() { int xp = _vm->_eventsManager->getMouseX(); int yp = _vm->_eventsManager->getMouseY(); - _vm->_graphicsManager._scrollOffset = _vm->_eventsManager->_startPos.x; + _vm->_graphicsManager->_scrollOffset = _vm->_eventsManager->_startPos.x; int slotNumber = 0; if (yp >= 112 && yp <= 198) { @@ -712,32 +712,32 @@ int DialogsManager::searchSavegames() { slotNumber = 1; _vm->_objectsManager._saveLoadX = 189; _vm->_objectsManager._saveLoadY = 111; - } else if (xp > _vm->_graphicsManager._scrollOffset + 322 && xp < _vm->_graphicsManager._scrollOffset + 452) { + } else if (xp > _vm->_graphicsManager->_scrollOffset + 322 && xp < _vm->_graphicsManager->_scrollOffset + 452) { slotNumber = 2; _vm->_objectsManager._saveLoadX = 322; _vm->_objectsManager._saveLoadY = 111; } } else if (yp >= 203 && yp <= 289) { - if (xp > _vm->_graphicsManager._scrollOffset + 189 && xp < _vm->_graphicsManager._scrollOffset + 318) { + if (xp > _vm->_graphicsManager->_scrollOffset + 189 && xp < _vm->_graphicsManager->_scrollOffset + 318) { slotNumber = 3; _vm->_objectsManager._saveLoadX = 189; _vm->_objectsManager._saveLoadY = 202; - } else if (xp > _vm->_graphicsManager._scrollOffset + 322 && xp < _vm->_graphicsManager._scrollOffset + 452) { + } else if (xp > _vm->_graphicsManager->_scrollOffset + 322 && xp < _vm->_graphicsManager->_scrollOffset + 452) { slotNumber = 4; _vm->_objectsManager._saveLoadX = 322; _vm->_objectsManager._saveLoadY = 202; } } else if (yp >= 294 && yp <= 380) { - if (xp > _vm->_graphicsManager._scrollOffset + 189 && xp < _vm->_graphicsManager._scrollOffset + 318) { + if (xp > _vm->_graphicsManager->_scrollOffset + 189 && xp < _vm->_graphicsManager->_scrollOffset + 318) { slotNumber = 5; _vm->_objectsManager._saveLoadX = 189; _vm->_objectsManager._saveLoadY = 293; - } else if (xp > _vm->_graphicsManager._scrollOffset + 322 && xp < _vm->_graphicsManager._scrollOffset + 452) { + } else if (xp > _vm->_graphicsManager->_scrollOffset + 322 && xp < _vm->_graphicsManager->_scrollOffset + 452) { slotNumber = 6; _vm->_objectsManager._saveLoadX = 322; _vm->_objectsManager._saveLoadY = 293; } - } else if (yp >= 388 && yp <= 404 && xp > _vm->_graphicsManager._scrollOffset + 273 && xp < _vm->_graphicsManager._scrollOffset + 355) { + } else if (yp >= 388 && yp <= 404 && xp > _vm->_graphicsManager->_scrollOffset + 273 && xp < _vm->_graphicsManager->_scrollOffset + 355) { slotNumber = 7; _vm->_objectsManager._saveLoadX = 0; _vm->_objectsManager._saveLoadY = 0; diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 1e1ebd58f9..b113b68443 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -219,7 +219,7 @@ void EventsManager::checkForNextFrameCounter() { if ((milli - _priorFrameTime) >= GAME_FRAME_TIME) { ++_gameCounter; _priorFrameTime = milli; - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->updateScreen(); // Signal the ScummVM debugger _vm->_debugger->onFrame(); @@ -368,24 +368,24 @@ void EventsManager::refreshScreenAndEvents() { height = _vm->_globals->_objectHeight; } 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->_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; } else { - if (xp < _vm->_graphicsManager._minX) - xp = _vm->_graphicsManager._minX - mouseWidth; + if (xp < _vm->_graphicsManager->_minX) + xp = _vm->_graphicsManager->_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->_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; } right = xp + width; bottom = yp + height; @@ -397,18 +397,18 @@ void EventsManager::refreshScreenAndEvents() { 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->_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 (width > 1 && height > 1) { updateCursor(); } } - } else if (yp < _vm->_graphicsManager._maxY && xp < _vm->_graphicsManager._maxX && width > 1 && height > 1) { + } else if (yp < _vm->_graphicsManager->_maxY && xp < _vm->_graphicsManager->_maxX && width > 1 && height > 1) { updateCursor(); - _vm->_graphicsManager.addDirtyRect(xp, yp, right, bottom); + _vm->_graphicsManager->addDirtyRect(xp, yp, right, bottom); } _vm->_globals->_speed = 2; @@ -442,39 +442,39 @@ void EventsManager::refreshScreenAndEvents() { } while (!_vm->shouldQuit() && _vm->_globals->iRegul == 3 && _rateCounter <= 15); _vm->_globals->_speed = 2; _rateCounter = 0; - if (!_vm->_graphicsManager._largeScreenFl || _vm->_graphicsManager._scrollStatus == 1) { - _vm->_graphicsManager.displayDirtyRects(); + if (!_vm->_graphicsManager->_largeScreenFl || _vm->_graphicsManager->_scrollStatus == 1) { + _vm->_graphicsManager->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->_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->_graphicsManager._scrollPosX < 0) - _vm->_graphicsManager._scrollPosX = 0; - if (_vm->_graphicsManager._scrollPosX > SCREEN_WIDTH) - _vm->_graphicsManager._scrollPosX = SCREEN_WIDTH; - if (_vm->_graphicsManager._oldScrollPosX == _vm->_graphicsManager._scrollPosX) { - _vm->_graphicsManager.displayDirtyRects(); + if (_vm->_graphicsManager->_scrollPosX < 0) + _vm->_graphicsManager->_scrollPosX = 0; + if (_vm->_graphicsManager->_scrollPosX > SCREEN_WIDTH) + _vm->_graphicsManager->_scrollPosX = SCREEN_WIDTH; + if (_vm->_graphicsManager->_oldScrollPosX == _vm->_graphicsManager->_scrollPosX) { + _vm->_graphicsManager->displayDirtyRects(); } else { _vm->_fontManager->hideText(9); - _vm->_graphicsManager.lockScreen(); - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager._scrollPosX, 20, SCREEN_WIDTH, 440, 0, 20); - _vm->_graphicsManager.unlockScreen(); + _vm->_graphicsManager->lockScreen(); + _vm->_graphicsManager->m_scroll16(_vm->_graphicsManager->_vesaBuffer, _vm->_graphicsManager->_scrollPosX, 20, SCREEN_WIDTH, 440, 0, 20); + _vm->_graphicsManager->unlockScreen(); - _vm->_graphicsManager.resetRefreshRects(); - _vm->_graphicsManager.addRefreshRect(0, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 20); + _vm->_graphicsManager->resetRefreshRects(); + _vm->_graphicsManager->addRefreshRect(0, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 20); - _vm->_graphicsManager.resetDirtyRects(); + _vm->_graphicsManager->resetDirtyRects(); - _startPos.x = _vm->_graphicsManager._scrollPosX; - _vm->_graphicsManager._scrollOffset = _vm->_graphicsManager._scrollPosX; - _vm->_graphicsManager._scrollPosX = _vm->_graphicsManager._scrollPosX; + _startPos.x = _vm->_graphicsManager->_scrollPosX; + _vm->_graphicsManager->_scrollOffset = _vm->_graphicsManager->_scrollPosX; + _vm->_graphicsManager->_scrollPosX = _vm->_graphicsManager->_scrollPosX; } - _vm->_graphicsManager._oldScrollPosX = _vm->_graphicsManager._scrollPosX; - _startPos.x = _vm->_graphicsManager._scrollPosX; - _vm->_graphicsManager._scrollOffset = _vm->_graphicsManager._scrollPosX; + _vm->_graphicsManager->_oldScrollPosX = _vm->_graphicsManager->_scrollPosX; + _startPos.x = _vm->_graphicsManager->_scrollPosX; + _vm->_graphicsManager->_scrollOffset = _vm->_graphicsManager->_scrollPosX; } _curMouseButton = _mouseButton; _mouseButton = 0; @@ -484,13 +484,13 @@ void EventsManager::refreshScreenAndEvents() { 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->_globals->_objectWidth; - _vm->_graphicsManager._maxY = _vm->_globals->_objectHeight; - int pitch = _vm->_graphicsManager._lineNbr2; - _vm->_graphicsManager._lineNbr2 = _vm->_globals->_objectWidth; + 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->_globals->_objectWidth; + _vm->_graphicsManager->_maxY = _vm->_globals->_objectHeight; + int pitch = _vm->_graphicsManager->_lineNbr2; + _vm->_graphicsManager->_lineNbr2 = _vm->_globals->_objectWidth; // Create the temporary cursor surface byte *cursorSurface = new byte[_vm->_globals->_objectHeight * _vm->_globals->_objectWidth]; @@ -498,24 +498,24 @@ void EventsManager::updateCursor() { if (_mouseCursorId != 23) { // Draw standard cursor - _vm->_graphicsManager.Sprite_Vesa(cursorSurface, _mouseCursor, 300, 300, _mouseSpriteId); + _vm->_graphicsManager->Sprite_Vesa(cursorSurface, _mouseCursor, 300, 300, _mouseSpriteId); } else { // Draw the active inventory object - _vm->_graphicsManager.Affiche_Perfect(cursorSurface, _objectBuf, 300, 300, 0, 0, 0, false); + _vm->_graphicsManager->Affiche_Perfect(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->_graphicsManager->_minX = clipBounds.left; + _vm->_graphicsManager->_minY = clipBounds.top; + _vm->_graphicsManager->_maxX = clipBounds.right; + _vm->_graphicsManager->_maxY = clipBounds.bottom; + _vm->_graphicsManager->_lineNbr2 = pitch; // Create a cursor palette Graphics::PixelFormat pixelFormat = g_system->getScreenFormat(); byte *cursorPalette = new byte[3 * PALETTE_SIZE]; - uint16 *paletteColors = (uint16 *)_vm->_graphicsManager.PAL_PIXELS; + uint16 *paletteColors = (uint16 *)_vm->_graphicsManager->PAL_PIXELS; for (int i = 0; i < PALETTE_SIZE; i++) { uint8 r, g, b; diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp index 4885ccd46e..b2335e70b4 100644 --- a/engines/hopkins/font.cpp +++ b/engines/hopkins/font.cpp @@ -172,14 +172,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._vesaBuffer, + _vm->_graphicsManager->restoreSurfaceRect( + _vm->_graphicsManager->_vesaBuffer, _text[idx]._textBlock, xp, yp, _text[idx]._width, _text[idx]._height); - _vm->_graphicsManager.addDirtyRect(xp, yp, xp + width, yp + height); + _vm->_graphicsManager->addDirtyRect(xp, yp, xp + width, yp + height); } } else { int lineCount = 0; @@ -359,15 +359,15 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in if (ptrd == g_PTRNUL) error("Cutting a block for text box (%d)", size); - _vm->_graphicsManager.copySurfaceRect(_vm->_graphicsManager._vesaBuffer, ptrd, posX, posY, saveWidth, saveHeight); - _vm->_graphicsManager.Trans_bloc2(ptrd, _vm->_graphicsManager._colorTable, size); - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, ptrd, posX, posY, saveWidth, saveHeight); + _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_vesaBuffer, ptrd, posX, posY, saveWidth, saveHeight); + _vm->_graphicsManager->Trans_bloc2(ptrd, _vm->_graphicsManager->_colorTable, size); + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, ptrd, posX, posY, saveWidth, saveHeight); _vm->_globals->freeMemory(ptrd); - _vm->_graphicsManager.drawHorizontalLine(_vm->_graphicsManager._vesaBuffer, posX, posY, saveWidth, (byte)-2); - _vm->_graphicsManager.drawHorizontalLine(_vm->_graphicsManager._vesaBuffer, posX, saveHeight + posY, saveWidth, (byte)-2); - _vm->_graphicsManager.drawVerticalLine(_vm->_graphicsManager._vesaBuffer, posX, posY, saveHeight, (byte)-2); - _vm->_graphicsManager.drawVerticalLine(_vm->_graphicsManager._vesaBuffer, saveWidth + posX, posY, saveHeight, (byte)-2); + _vm->_graphicsManager->drawHorizontalLine(_vm->_graphicsManager->_vesaBuffer, posX, posY, saveWidth, (byte)-2); + _vm->_graphicsManager->drawHorizontalLine(_vm->_graphicsManager->_vesaBuffer, posX, saveHeight + posY, saveWidth, (byte)-2); + _vm->_graphicsManager->drawVerticalLine(_vm->_graphicsManager->_vesaBuffer, posX, posY, saveHeight, (byte)-2); + _vm->_graphicsManager->drawVerticalLine(_vm->_graphicsManager->_vesaBuffer, saveWidth + posX, posY, saveHeight, (byte)-2); } _text[idx]._lineCount = lineCount; int textPosY = posY + 5; @@ -393,7 +393,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._vesaBuffer, _text[idx]._textBlock, posX, posY, _text[idx]._width, blockHeight); + _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_vesaBuffer, _text[idx]._textBlock, posX, posY, _text[idx]._width, blockHeight); } _tempText = _vm->_globals->freeMemory(_tempText); } @@ -413,12 +413,12 @@ void FontManager::displayTextVesa(int xp, int yp, const Common::String &message, break; if (currChar >= 32) { charIndex = currChar - 32; - _vm->_graphicsManager.displayFont(_vm->_graphicsManager._vesaBuffer, _font, currentX, yp, currChar - 32, col); + _vm->_graphicsManager->displayFont(_vm->_graphicsManager->_vesaBuffer, _font, currentX, yp, currChar - 32, col); currentX += _vm->_objectsManager.getWidth(_font, charIndex); } } - _vm->_graphicsManager.addDirtyRect(xp, yp, currentX, yp + 12); + _vm->_graphicsManager->addDirtyRect(xp, yp, currentX, yp + 12); } /** @@ -430,7 +430,7 @@ void FontManager::displayText(int xp, int yp, const Common::String &message, int if (currentChar > 31) { int characterIndex = currentChar - 32; - _vm->_graphicsManager.displayFont(_vm->_graphicsManager._vesaBuffer, _font, xp, yp, characterIndex, col); + _vm->_graphicsManager->displayFont(_vm->_graphicsManager->_vesaBuffer, _font, xp, yp, characterIndex, col); xp += _vm->_objectsManager.getWidth(_font, characterIndex); } } @@ -457,7 +457,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._vesaBuffer, _font, charEndPosX, yp, printChar, fontCol); + _vm->_graphicsManager->displayFont(_vm->_graphicsManager->_vesaBuffer, _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. @@ -476,7 +476,7 @@ void FontManager::renderTextDisplay(int xp, int yp, const Common::String &msg, i int charStartPosX = charEndPosX; charEndPosX += charWidth; - _vm->_graphicsManager.addDirtyRect(charStartPosX, yp, charEndPosX, yp + 12); + _vm->_graphicsManager->addDirtyRect(charStartPosX, yp, charEndPosX, yp + 12); if (_vm->_eventsManager->_escKeyFl) { _vm->_globals->iRegul = 1; _vm->_eventsManager->refreshScreenAndEvents(); diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 4ae251fd49..1f8ee4b044 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -35,7 +35,9 @@ namespace Hopkins { -GraphicsManager::GraphicsManager() { +GraphicsManager::GraphicsManager(HopkinsEngine *vm) { + _vm = vm; + _lockCounter = 0; _initGraphicsFl = false; _screenWidth = _screenHeight = 0; @@ -75,20 +77,10 @@ GraphicsManager::GraphicsManager() { Common::fill(&_colorTable[0], &_colorTable[PALETTE_EXT_BLOCK_SIZE], 0); Common::fill(&_palette[0], &_palette[PALETTE_EXT_BLOCK_SIZE], 0); Common::fill(&_oldPalette[0], &_oldPalette[PALETTE_EXT_BLOCK_SIZE], 0); -} - -GraphicsManager::~GraphicsManager() { - _vm->_globals->freeMemory(_vesaScreen); - _vm->_globals->freeMemory(_vesaBuffer); - _vm->_globals->freeMemory(_screenBuffer); -} - -void GraphicsManager::setParent(HopkinsEngine *vm) { - _vm = vm; - + if (_vm->getIsDemo()) { if (_vm->getPlatform() == Common::kPlatformLinux) - // CHECKME: Should be false? + // CHECKME: Should be false? MANU_SCROLL = true; else MANU_SCROLL = false; @@ -99,6 +91,12 @@ void GraphicsManager::setParent(HopkinsEngine *vm) { } } +GraphicsManager::~GraphicsManager() { + _vm->_globals->freeMemory(_vesaScreen); + _vm->_globals->freeMemory(_vesaBuffer); + _vm->_globals->freeMemory(_screenBuffer); +} + void GraphicsManager::setGraphicalMode(int width, int height) { if (!_initGraphicsFl) { Graphics::PixelFormat pixelFormat16(2, 5, 6, 5, 0, 11, 5, 0, 0); diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index 14e4223cb1..64ea4266fa 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -116,10 +116,9 @@ public: bool MANU_SCROLL; int FADE_LINUX; public: - GraphicsManager(); + GraphicsManager(HopkinsEngine *vm); ~GraphicsManager(); - void setParent(HopkinsEngine *vm); void lockScreen(); void unlockScreen(); void clearPalette(); diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 01c67f6430..a0eb41c6e9 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -48,8 +48,8 @@ HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDe _fileManager = new FileManager(this); _fontManager = new FontManager(this); _globals = new Globals(this); + _graphicsManager = new GraphicsManager(this); - _graphicsManager.setParent(this); _linesManager.setParent(this); _menuManager.setParent(this); _objectsManager.setParent(this); @@ -60,6 +60,7 @@ HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDe } HopkinsEngine::~HopkinsEngine() { + delete _graphicsManager; delete _globals; delete _fontManager; delete _fileManager; @@ -131,13 +132,13 @@ bool HopkinsEngine::runWin95Demo() { _globals->iRegul = 1; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); - _graphicsManager.loadImage("H2"); - _graphicsManager.fadeInLong(); + _graphicsManager->loadImage("H2"); + _graphicsManager->fadeInLong(); if (!_eventsManager->_escKeyFl) playIntro(); @@ -147,7 +148,7 @@ bool HopkinsEngine::runWin95Demo() { _globals->_speed = 1; for (int i = 1; i < 50; i++) { - _graphicsManager.copySurface(_graphicsManager._vesaScreen, 0, 0, 640, 440, _graphicsManager._vesaBuffer, 0, 0); + _graphicsManager->copySurface(_graphicsManager->_vesaScreen, 0, 0, 640, 440, _graphicsManager->_vesaBuffer, 0, 0); _eventsManager->refreshScreenAndEvents(); } @@ -156,7 +157,7 @@ bool HopkinsEngine::runWin95Demo() { _globals->_speed = 2; if (_eventsManager->_rateCounter > 700) _globals->_speed = 3; - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _globals->iRegul = 1; _globals->PERSO = _fileManager->loadFile("PERSO.SPR"); _globals->_characterType = 0; @@ -195,24 +196,24 @@ bool HopkinsEngine::runWin95Demo() { if (!_globals->_saveData->_data[svBankAttackAnimPlayedFl]) { _soundManager.playSound(3); if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS) - _graphicsManager.loadImage("fond"); + _graphicsManager->loadImage("fond"); else { if (_globals->_language == LANG_FR) - _graphicsManager.loadImage("fondfr"); + _graphicsManager->loadImage("fondfr"); else if (_globals->_language == LANG_EN) - _graphicsManager.loadImage("fondan"); + _graphicsManager->loadImage("fondan"); else if (_globals->_language == LANG_SP) - _graphicsManager.loadImage("fondes"); + _graphicsManager->loadImage("fondes"); } - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); _eventsManager->delay(500); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _globals->iRegul = 1; _soundManager._specialSoundNum = 2; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); if (!_globals->_censorshipFl) _animationManager->playAnim("BANQUE.ANM", 200, 28, 200); else @@ -222,7 +223,7 @@ bool HopkinsEngine::runWin95Demo() { _soundManager.removeSample(2); _soundManager.removeSample(3); _soundManager.removeSample(4); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1; } _linesManager.setMaxLineIdx(5); @@ -291,15 +292,15 @@ bool HopkinsEngine::runWin95Demo() { _linesManager.setMaxLineIdx(20); if (_globals->_saveData->_data[svBombDisarmedFl]) { if (_globals->_language == LANG_FR) - _graphicsManager.loadImage("ENDFR"); + _graphicsManager->loadImage("ENDFR"); else - _graphicsManager.loadImage("ENDUK"); - _graphicsManager.fadeInLong(); + _graphicsManager->loadImage("ENDUK"); + _graphicsManager->fadeInLong(); _eventsManager->mouseOn(); do _eventsManager->refreshScreenAndEvents(); while (_eventsManager->getMouseButton() != 1); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); restoreSystem(); } else bombExplosion(); @@ -345,14 +346,14 @@ bool HopkinsEngine::runWin95Demo() { _globals->_screenId = 113; _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; _computerManager->showComputer(COMPUTER_HOPKINS); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.updateScreen(); - memset(_graphicsManager._vesaBuffer, 0, 307200); - memset(_graphicsManager._vesaScreen, 0, 307200); - _graphicsManager.clearPalette(); - _graphicsManager.resetDirtyRects(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->updateScreen(); + memset(_graphicsManager->_vesaBuffer, 0, 307200); + memset(_graphicsManager->_vesaScreen, 0, 307200); + _graphicsManager->clearPalette(); + _graphicsManager->resetDirtyRects(); break; case 114: @@ -362,9 +363,9 @@ bool HopkinsEngine::runWin95Demo() { _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; _globals->_exitId = 0; _computerManager->showComputer(COMPUTER_SAMANTHA); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); break; case 115: @@ -374,18 +375,18 @@ bool HopkinsEngine::runWin95Demo() { _globals->_screenId = 115; _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; _computerManager->showComputer(COMPUTER_PUBLIC); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); break; case 150: _soundManager.playSound(28); _globals->iRegul = 4; // CHECKME! - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); _animationManager->playAnim("JOUR1A.anm", 12, 12, 2000); _globals->iRegul = 0; _globals->_exitId = 300; @@ -394,14 +395,14 @@ bool HopkinsEngine::runWin95Demo() { case 151: _soundManager.playSound(28); _globals->iRegul = 4; // CHECKME! - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); - _graphicsManager.loadImage("njour3a"); - _graphicsManager.fadeInLong(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); + _graphicsManager->loadImage("njour3a"); + _graphicsManager->fadeInLong(); _eventsManager->delay(5000); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _globals->_exitId = 300; _globals->iRegul = 0; break; @@ -409,10 +410,10 @@ bool HopkinsEngine::runWin95Demo() { case 152: _soundManager.playSound(28); _globals->iRegul = 4; // CHECKME! - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); _animationManager->playAnim("JOUR4A.anm", 12, 12, 2000); _globals->iRegul = 0; _globals->_exitId = 300; @@ -430,19 +431,19 @@ bool HopkinsEngine::runLinuxDemo() { _eventsManager->mouseOff(); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); - _graphicsManager.loadImage("LINUX"); - _graphicsManager.fadeInLong(); + _graphicsManager->loadImage("LINUX"); + _graphicsManager->fadeInLong(); _eventsManager->delay(1500); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); - _graphicsManager.loadImage("H2"); - _graphicsManager.fadeInLong(); + _graphicsManager->loadImage("H2"); + _graphicsManager->fadeInLong(); _eventsManager->delay(500); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); if (!_eventsManager->_escKeyFl) playIntro(); @@ -500,26 +501,26 @@ bool HopkinsEngine::runLinuxDemo() { if (!_globals->_saveData->_data[svBankAttackAnimPlayedFl]) { _soundManager.playSound(3); if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS) - _graphicsManager.loadImage("fond"); + _graphicsManager->loadImage("fond"); else { if (_globals->_language == LANG_FR) - _graphicsManager.loadImage("fondfr"); + _graphicsManager->loadImage("fondfr"); else if (_globals->_language == LANG_EN) - _graphicsManager.loadImage("fondan"); + _graphicsManager->loadImage("fondan"); else if (_globals->_language == LANG_SP) - _graphicsManager.loadImage("fondes"); + _graphicsManager->loadImage("fondes"); } - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); _eventsManager->delay(500); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _globals->iRegul = 1; _soundManager._specialSoundNum = 2; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); + _graphicsManager->FADE_LINUX = 2; if (!_globals->_censorshipFl) _animationManager->playAnim("BANQUE.ANM", 200, 28, 200); @@ -663,14 +664,14 @@ bool HopkinsEngine::runLinuxDemo() { _globals->_saveData->_data[svLastScreenId] = 113; _computerManager->showComputer(COMPUTER_HOPKINS); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.updateScreen(); - memset(_graphicsManager._vesaBuffer, 0, 307200); - memset(_graphicsManager._vesaScreen, 0, 307200); - _graphicsManager.clearPalette(); - _graphicsManager.resetDirtyRects(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->updateScreen(); + memset(_graphicsManager->_vesaBuffer, 0, 307200); + memset(_graphicsManager->_vesaScreen, 0, 307200); + _graphicsManager->clearPalette(); + _graphicsManager->resetDirtyRects(); break; case 114: @@ -680,9 +681,9 @@ bool HopkinsEngine::runLinuxDemo() { _globals->_screenId = 114; _globals->_saveData->_data[svLastScreenId] = 114; _computerManager->showComputer(COMPUTER_SAMANTHA); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); break; case 115: @@ -692,20 +693,20 @@ bool HopkinsEngine::runLinuxDemo() { _globals->_screenId = 115; _globals->_saveData->_data[svLastScreenId] = 115; _computerManager->showComputer(COMPUTER_PUBLIC); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); break; case 150: _soundManager.playSound(16); _globals->iRegul = 1; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("JOUR1A.anm", 12, 12, 2000); _globals->iRegul = 0; _globals->_exitId = 300; @@ -715,11 +716,11 @@ bool HopkinsEngine::runLinuxDemo() { _soundManager.playSound(16); _globals->iRegul = 1; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("JOUR3A.anm", 12, 12, 2000); _globals->iRegul = 0; _globals->_exitId = 300; @@ -729,11 +730,11 @@ bool HopkinsEngine::runLinuxDemo() { _soundManager.playSound(16); _globals->iRegul = 1; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("JOUR4A.anm", 12, 12, 2000); _globals->iRegul = 0; _globals->_exitId = 300; @@ -762,41 +763,41 @@ bool HopkinsEngine::runFull() { // 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 - _graphicsManager.loadImage("VERSW"); - _graphicsManager.fadeInLong(); + _graphicsManager->loadImage("VERSW"); + _graphicsManager->fadeInLong(); _eventsManager->delay(500); - _graphicsManager.fadeOutLong(); - _graphicsManager.clearVesaScreen(); + _graphicsManager->fadeOutLong(); + _graphicsManager->clearVesaScreen(); } else { // This piece of code, though named "display_version" in the original, // displays a "loading please wait" screen. - _graphicsManager.loadImage("VERSW"); - _graphicsManager.fadeInLong(); + _graphicsManager->loadImage("VERSW"); + _graphicsManager->fadeInLong(); _eventsManager->delay(500); - _graphicsManager.fadeOutLong(); - _graphicsManager.clearVesaScreen(); + _graphicsManager->fadeOutLong(); + _graphicsManager->clearVesaScreen(); _globals->iRegul = 1; } - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); if (getPlatform() == Common::kPlatformLinux) { - _graphicsManager.loadImage("H2"); - _graphicsManager.fadeInLong(); + _graphicsManager->loadImage("H2"); + _graphicsManager->fadeInLong(); _eventsManager->delay(500); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _globals->_speed = 2; _globals->iRegul = 1; - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("MP.ANM", 10, 16, 200); } else { _animationManager->playAnim("MP.ANM", 10, 16, 200); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); } if (!_eventsManager->_escKeyFl) { @@ -805,11 +806,11 @@ bool HopkinsEngine::runFull() { return false; } if (getPlatform() != Common::kPlatformLinux) { - _graphicsManager.fadeOutShort(); - _graphicsManager.loadImage("H2"); - _graphicsManager.fadeInLong(); + _graphicsManager->fadeOutShort(); + _graphicsManager->loadImage("H2"); + _graphicsManager->fadeInLong(); _eventsManager->delay(500); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); } _globals->iRegul = 0; _globals->PERSO = _fileManager->loadFile("PERSO.SPR"); @@ -846,27 +847,27 @@ bool HopkinsEngine::runFull() { // Play the bank attack animation _soundManager.playSound(3); if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS) - _graphicsManager.loadImage("fond"); + _graphicsManager->loadImage("fond"); else { if (_globals->_language == LANG_FR) - _graphicsManager.loadImage("fondfr"); + _graphicsManager->loadImage("fondfr"); else if (_globals->_language == LANG_EN) - _graphicsManager.loadImage("fondan"); + _graphicsManager->loadImage("fondan"); else if (_globals->_language == LANG_SP) - _graphicsManager.loadImage("fondes"); + _graphicsManager->loadImage("fondes"); } - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); _eventsManager->delay(500); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _globals->iRegul = 1; _soundManager._specialSoundNum = 2; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows) { if (getPlatform() == Common::kPlatformLinux) - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; if (!_globals->_censorshipFl) _animationManager->playAnim("BANQUE.ANM", 200, 28, 200); @@ -884,9 +885,9 @@ bool HopkinsEngine::runFull() { if (getPlatform() != Common::kPlatformLinux) { // Copy the end of the animation into the secondary buffer and fade out the screen - Common::fill(_graphicsManager._vesaBuffer, _graphicsManager._vesaBuffer + + Common::fill(_graphicsManager->_vesaBuffer, _graphicsManager->_vesaBuffer + SCREEN_WIDTH * 2 * SCREEN_HEIGHT, 0); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); } _globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1; @@ -995,23 +996,23 @@ bool HopkinsEngine::runFull() { _objectsManager.PERSONAGE2("IM17", "IM17", "ANIM17", "IM17", 11, true); if (_globals->_exitId == 18) { _globals->iRegul = 1; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); _soundManager.stopSound(); if (getPlatform() == Common::kPlatformLinux) { _soundManager.playSound(29); - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("PURG1A.ANM", 12, 18, 50); } else if (getPlatform() == Common::kPlatformWindows) { _soundManager.playSound(29); _animationManager->playAnim("PURG1A.ANM", 12, 18, 50); - _graphicsManager.fadeOutShort(); + _graphicsManager->fadeOutShort(); } else { _soundManager.playSound(6); _animationManager->playAnim("PURG1A.ANM", 12, 18, 50); - _graphicsManager.fadeOutShort(); + _graphicsManager->fadeOutShort(); } _globals->iRegul = 0; } @@ -1042,16 +1043,16 @@ bool HopkinsEngine::runFull() { if (_globals->_exitId == 17) { _globals->iRegul = 1; _soundManager.stopSound(); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); _soundManager.playSound(6); if (getPlatform() == Common::kPlatformLinux) - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("PURG2A.ANM", 12, 18, 50); if (getPlatform() != Common::kPlatformLinux) - _graphicsManager.fadeOutShort(); + _graphicsManager->fadeOutShort(); _globals->iRegul = 0; } break; @@ -1408,13 +1409,13 @@ bool HopkinsEngine::runFull() { if (_globals->_exitId == 18) { _globals->iRegul = 1; _soundManager.stopSound(); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); _soundManager.playSound(6); _animationManager->playAnim("PURG1A.ANM", 12, 18, 50); - _graphicsManager.fadeOutShort(); + _graphicsManager->fadeOutShort(); _globals->iRegul = 0; } break; @@ -1450,14 +1451,14 @@ bool HopkinsEngine::runFull() { _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; _globals->_exitId = 0; _computerManager->showComputer(COMPUTER_HOPKINS); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.updateScreen(); - memset(_graphicsManager._vesaBuffer, 0, 307200); - memset(_graphicsManager._vesaScreen, 0, 307200); - _graphicsManager.clearPalette(); - _graphicsManager.resetDirtyRects(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->updateScreen(); + memset(_graphicsManager->_vesaBuffer, 0, 307200); + memset(_graphicsManager->_vesaScreen, 0, 307200); + _graphicsManager->clearPalette(); + _graphicsManager->resetDirtyRects(); break; case 114: @@ -1467,9 +1468,9 @@ bool HopkinsEngine::runFull() { _globals->_saveData->_data[svLastPrevScreenId] = _globals->_prevScreenId; _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; _computerManager->showComputer(COMPUTER_SAMANTHA); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); break; case 115: @@ -1479,20 +1480,20 @@ bool HopkinsEngine::runFull() { _globals->_saveData->_data[svLastScreenId] = _globals->_screenId; _globals->_exitId = 0; _computerManager->showComputer(COMPUTER_PUBLIC); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); break; case 150: _soundManager.playSound(16); _globals->iRegul = 1; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); if (getPlatform() == Common::kPlatformLinux) - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("JOUR1A.ANM", 12, 12, 2000); _globals->iRegul = 0; _globals->_exitId = 300; @@ -1501,12 +1502,12 @@ bool HopkinsEngine::runFull() { case 151: _soundManager.playSound(16); _globals->iRegul = 1; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); if (getPlatform() == Common::kPlatformLinux) - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("JOUR3A.ANM", 12, 12, 2000); _globals->iRegul = 0; _globals->_exitId = 300; @@ -1515,12 +1516,12 @@ bool HopkinsEngine::runFull() { case 152: _soundManager.playSound(16); _globals->iRegul = 1; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); if (getPlatform() == Common::kPlatformLinux) - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("JOUR4A.ANM", 12, 12, 2000); _globals->iRegul = 0; _globals->_exitId = 300; @@ -1542,7 +1543,7 @@ bool HopkinsEngine::runFull() { _globals->PERSO = _fileManager->loadFile("PERSO.SPR"); _globals->_characterType = 0; _globals->iRegul = 0; - _graphicsManager._lineNbr = SCREEN_WIDTH; + _graphicsManager->_lineNbr = SCREEN_WIDTH; break; } } @@ -1561,7 +1562,7 @@ int HopkinsEngine::getRandomNumber(int maxNumber) { void HopkinsEngine::initializeSystem() { // Set graphics mode - _graphicsManager.setGraphicalMode(SCREEN_WIDTH, SCREEN_HEIGHT); + _graphicsManager->setGraphicalMode(SCREEN_WIDTH, SCREEN_HEIGHT); // Synchronize the sound settings from ScummVM _soundManager.syncSoundSettings(); @@ -1633,69 +1634,69 @@ void HopkinsEngine::playIntro() { return; _soundManager.mixVoice(3, 3); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); - _graphicsManager.updateScreen(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); + _graphicsManager->updateScreen(); _soundManager.playSound(11); - _graphicsManager.loadImage("intro1"); - _graphicsManager.scrollScreen(0); - _graphicsManager._scrollOffset = 0; - _graphicsManager.SETCOLOR3(252, 100, 100, 100); - _graphicsManager.SETCOLOR3(253, 100, 100, 100); - _graphicsManager.SETCOLOR3(251, 100, 100, 100); - _graphicsManager.SETCOLOR3(254, 0, 0, 0); + _graphicsManager->loadImage("intro1"); + _graphicsManager->scrollScreen(0); + _graphicsManager->_scrollOffset = 0; + _graphicsManager->SETCOLOR3(252, 100, 100, 100); + _graphicsManager->SETCOLOR3(253, 100, 100, 100); + _graphicsManager->SETCOLOR3(251, 100, 100, 100); + _graphicsManager->SETCOLOR3(254, 0, 0, 0); for (int i = 0; i <= 4; i++) _eventsManager->refreshScreenAndEvents(); _globals->iRegul = 1; - _graphicsManager.fadeInLong(); - if (_graphicsManager._largeScreenFl) { - _graphicsManager._scrollStatus = 2; - _graphicsManager._scrollPosX = 0; + _graphicsManager->fadeInLong(); + if (_graphicsManager->_largeScreenFl) { + _graphicsManager->_scrollStatus = 2; + _graphicsManager->_scrollPosX = 0; bool loopCond = false; do { - _graphicsManager._scrollPosX += 2; - if (_graphicsManager._scrollPosX > (SCREEN_WIDTH - 2)) { - _graphicsManager._scrollPosX = SCREEN_WIDTH; + _graphicsManager->_scrollPosX += 2; + if (_graphicsManager->_scrollPosX > (SCREEN_WIDTH - 2)) { + _graphicsManager->_scrollPosX = SCREEN_WIDTH; loopCond = true; } - if (_eventsManager->getMouseX() < _graphicsManager._scrollPosX + 10) + if (_eventsManager->getMouseX() < _graphicsManager->_scrollPosX + 10) _eventsManager->setMouseXY(_eventsManager->_mousePos.x + 4, _eventsManager->getMouseY()); _eventsManager->refreshScreenAndEvents(); - } while (!shouldQuit() && !loopCond && _graphicsManager._scrollPosX != SCREEN_WIDTH); + } while (!shouldQuit() && !loopCond && _graphicsManager->_scrollPosX != SCREEN_WIDTH); _eventsManager->refreshScreenAndEvents(); - _graphicsManager._scrollStatus = 0; + _graphicsManager->_scrollStatus = 0; if (shouldQuit()) return; } _soundManager.mixVoice(4, 3); - _graphicsManager.fadeOutLong(); - _graphicsManager._scrollStatus = 0; - _graphicsManager.loadImage("intro2"); - _graphicsManager.scrollScreen(0); + _graphicsManager->fadeOutLong(); + _graphicsManager->_scrollStatus = 0; + _graphicsManager->loadImage("intro2"); + _graphicsManager->scrollScreen(0); _animationManager->loadAnim("INTRO2"); - _graphicsManager.displayAllBob(); + _graphicsManager->displayAllBob(); _soundManager.playSound(23); _objectsManager.stopBobAnimation(3); _objectsManager.stopBobAnimation(5); - _graphicsManager._scrollOffset = 0; - _graphicsManager.SETCOLOR3(252, 100, 100, 100); - _graphicsManager.SETCOLOR3(253, 100, 100, 100); - _graphicsManager.SETCOLOR3(251, 100, 100, 100); - _graphicsManager.SETCOLOR3(254, 0, 0, 0); + _graphicsManager->_scrollOffset = 0; + _graphicsManager->SETCOLOR3(252, 100, 100, 100); + _graphicsManager->SETCOLOR3(253, 100, 100, 100); + _graphicsManager->SETCOLOR3(251, 100, 100, 100); + _graphicsManager->SETCOLOR3(254, 0, 0, 0); for (int i = 0; i <= 4; i++) _eventsManager->refreshScreenAndEvents(); _globals->iRegul = 1; - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); for (uint i = 0; i < 200 / _globals->_speed; ++i) _eventsManager->refreshScreenAndEvents(); @@ -1703,41 +1704,41 @@ void HopkinsEngine::playIntro() { _soundManager.mixVoice(5, 3); _objectsManager.stopBobAnimation(3); _eventsManager->refreshScreenAndEvents(); - memcpy(&paletteData2, _graphicsManager._palette, 796); + memcpy(&paletteData2, _graphicsManager->_palette, 796); - _graphicsManager.setPaletteVGA256WithRefresh(paletteData, _graphicsManager._vesaBuffer); - _graphicsManager.endDisplayBob(); + _graphicsManager->setPaletteVGA256WithRefresh(paletteData, _graphicsManager->_vesaBuffer); + _graphicsManager->endDisplayBob(); if (shouldQuit() || _eventsManager->_escKeyFl) return; _soundManager._specialSoundNum = 5; - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("ELEC.ANM", 10, 26, 200); _soundManager._specialSoundNum = 0; if (shouldQuit() || _eventsManager->_escKeyFl) return; - _graphicsManager.loadImage("intro2"); - _graphicsManager.scrollScreen(0); + _graphicsManager->loadImage("intro2"); + _graphicsManager->scrollScreen(0); _animationManager->loadAnim("INTRO2"); - _graphicsManager.displayAllBob(); + _graphicsManager->displayAllBob(); _soundManager.playSound(23); _objectsManager.stopBobAnimation(3); _objectsManager.stopBobAnimation(5); _objectsManager.stopBobAnimation(1); - _graphicsManager._scrollOffset = 0; - _graphicsManager.SETCOLOR3(252, 100, 100, 100); - _graphicsManager.SETCOLOR3(253, 100, 100, 100); - _graphicsManager.SETCOLOR3(251, 100, 100, 100); - _graphicsManager.SETCOLOR3(254, 0, 0, 0); + _graphicsManager->_scrollOffset = 0; + _graphicsManager->SETCOLOR3(252, 100, 100, 100); + _graphicsManager->SETCOLOR3(253, 100, 100, 100); + _graphicsManager->SETCOLOR3(251, 100, 100, 100); + _graphicsManager->SETCOLOR3(254, 0, 0, 0); for (int i = 0; i <= 3; i++) _eventsManager->refreshScreenAndEvents(); _globals->iRegul = 1; - _graphicsManager.setPaletteVGA256WithRefresh(paletteData2, _graphicsManager._vesaBuffer); + _graphicsManager->setPaletteVGA256WithRefresh(paletteData2, _graphicsManager->_vesaBuffer); int introIndex = 0; while (!shouldQuit() && !_eventsManager->_escKeyFl) { @@ -1749,26 +1750,26 @@ void HopkinsEngine::playIntro() { _objectsManager.stopBobAnimation(3); } - Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager._palette[0]); + Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager->_palette[0]); for (int i = 1, maxPalVal = 4 * introIndex; i <= PALETTE_BLOCK_SIZE; i++) { - if (_graphicsManager._palette[i] > maxPalVal) - _graphicsManager._palette[i] -= maxPalVal; + if (_graphicsManager->_palette[i] > maxPalVal) + _graphicsManager->_palette[i] -= maxPalVal; } - _graphicsManager.setPaletteVGA256WithRefresh(_graphicsManager._palette, _graphicsManager._vesaBuffer); + _graphicsManager->setPaletteVGA256WithRefresh(_graphicsManager->_palette, _graphicsManager->_vesaBuffer); for (int i = 1; i < 2 * introIndex; i++) _eventsManager->refreshScreenAndEvents(); - _graphicsManager.setPaletteVGA256WithRefresh(paletteData2, _graphicsManager._vesaBuffer); + _graphicsManager->setPaletteVGA256WithRefresh(paletteData2, _graphicsManager->_vesaBuffer); for (int i = 1; i < 20 - introIndex; i++) _eventsManager->refreshScreenAndEvents(); introIndex += 2; if (introIndex > 15) { - _graphicsManager.setPaletteVGA256WithRefresh(paletteData, _graphicsManager._vesaBuffer); + _graphicsManager->setPaletteVGA256WithRefresh(paletteData, _graphicsManager->_vesaBuffer); for (uint j = 1; j < 100 / _globals->_speed; ++j) _eventsManager->refreshScreenAndEvents(); @@ -1782,8 +1783,8 @@ void HopkinsEngine::playIntro() { for (uint l = 0; l < 20 / _globals->_speed; ++l) _eventsManager->refreshScreenAndEvents(); - Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager._palette[0]); - _graphicsManager.setPaletteVGA256WithRefresh(_graphicsManager._palette, _graphicsManager._vesaBuffer); + Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager->_palette[0]); + _graphicsManager->setPaletteVGA256WithRefresh(_graphicsManager->_palette, _graphicsManager->_vesaBuffer); for (uint m = 0; m < 50 / _globals->_speed; ++m) { if (m == 30 / _globals->_speed) { @@ -1795,8 +1796,8 @@ void HopkinsEngine::playIntro() { _eventsManager->refreshScreenAndEvents(); } - _graphicsManager.fadeOutLong(); - _graphicsManager.endDisplayBob(); + _graphicsManager->fadeOutLong(); + _graphicsManager->endDisplayBob(); _animationManager->_clearAnimationFl = true; _soundManager.playSound(3); _soundManager._specialSoundNum = 1; @@ -1814,7 +1815,7 @@ void HopkinsEngine::playIntro() { return; _animationManager->_clearAnimationFl = false; - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("J4.anm", 12, 12, 1000); break; } @@ -1831,17 +1832,17 @@ void HopkinsEngine::displayNotAvailable() { return; if (_globals->_language == LANG_FR) - _graphicsManager.loadImage("ndfr"); + _graphicsManager->loadImage("ndfr"); else - _graphicsManager.loadImage("nduk"); + _graphicsManager->loadImage("nduk"); - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); if (_soundManager._voiceOffFl) _eventsManager->delay(500); else _soundManager.mixVoice(628, 4); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _globals->_exitId = 4; } @@ -1855,39 +1856,39 @@ void HopkinsEngine::handleNotAvailable(int sortie) { void HopkinsEngine::displayEndDemo() { _soundManager.playSound(28); if (_globals->_language == LANG_FR) - _graphicsManager.loadImage("endfr"); + _graphicsManager->loadImage("endfr"); else - _graphicsManager.loadImage("enduk"); + _graphicsManager->loadImage("enduk"); - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); _eventsManager->delay(1500); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _globals->_exitId = 0; } void HopkinsEngine::bombExplosion() { - _graphicsManager._lineNbr = SCREEN_WIDTH; - _graphicsManager.setScreenWidth(SCREEN_WIDTH); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->_lineNbr = SCREEN_WIDTH; + _graphicsManager->setScreenWidth(SCREEN_WIDTH); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); _globals->iRegul = 1; _soundManager._specialSoundNum = 199; - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); _soundManager._specialSoundNum = 0; - _graphicsManager.loadImage("IM15"); + _graphicsManager->loadImage("IM15"); _animationManager->loadAnim("ANIM15"); - _graphicsManager.displayAllBob(); + _graphicsManager->displayAllBob(); _objectsManager.stopBobAnimation(7); for (int idx = 0; idx < 5; ++idx) { _eventsManager->refreshScreenAndEvents(); } - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); _eventsManager->mouseOff(); for (int idx = 0; idx < 20; ++idx) { @@ -1903,8 +1904,8 @@ void HopkinsEngine::bombExplosion() { _eventsManager->refreshScreenAndEvents(); } - _graphicsManager.fadeOutLong(); - _graphicsManager.endDisplayBob(); + _graphicsManager->fadeOutLong(); + _graphicsManager->endDisplayBob(); _globals->iRegul = 0; _globals->_exitId = 151; } @@ -1916,13 +1917,13 @@ void HopkinsEngine::restoreSystem() { void HopkinsEngine::endLinuxDemo() { _globals->_linuxEndDemoFl = true; - _graphicsManager.resetDirtyRects(); + _graphicsManager->resetDirtyRects(); _objectsManager._forestFl = false; _eventsManager->_breakoutFl = false; _globals->_disableInventFl = true; - _graphicsManager.loadImage("BOX"); + _graphicsManager->loadImage("BOX"); _soundManager.playSound(28); - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); _eventsManager->mouseOn(); _eventsManager->changeMouseCursor(0); _eventsManager->_mouseCursorId = 0; @@ -1940,24 +1941,24 @@ void HopkinsEngine::endLinuxDemo() { // 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(); + _graphicsManager->fadeOutLong(); } void HopkinsEngine::handleConflagration() { _globals->_disableInventFl = true; _globals->iRegul = 1; - _graphicsManager.loadImage("IM71"); + _graphicsManager->loadImage("IM71"); _animationManager->loadAnim("ANIM71"); - _graphicsManager.SETCOLOR3(252, 100, 100, 100); - _graphicsManager.SETCOLOR3(253, 100, 100, 100); - _graphicsManager.SETCOLOR3(251, 100, 100, 100); - _graphicsManager.SETCOLOR3(254, 0, 0, 0); - _graphicsManager.displayAllBob(); + _graphicsManager->SETCOLOR3(252, 100, 100, 100); + _graphicsManager->SETCOLOR3(253, 100, 100, 100); + _graphicsManager->SETCOLOR3(251, 100, 100, 100); + _graphicsManager->SETCOLOR3(254, 0, 0, 0); + _graphicsManager->displayAllBob(); for (int cpt = 0; cpt <= 4; cpt++) _eventsManager->refreshScreenAndEvents(); - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); _globals->iRegul = 1; for (int cpt = 0; cpt <= 249; cpt++) @@ -1970,19 +1971,19 @@ void HopkinsEngine::handleConflagration() { for (int cpt = 0; cpt <= 49; cpt++) _eventsManager->refreshScreenAndEvents(); - _graphicsManager.fadeOutLong(); - _graphicsManager.endDisplayBob(); + _graphicsManager->fadeOutLong(); + _graphicsManager->endDisplayBob(); _globals->_saveData->_data[svBaseFireFl] = 1; _globals->_disableInventFl = false; } void HopkinsEngine::playSubmarineCutscene() { _globals->iRegul = 1; - _graphicsManager._lineNbr = SCREEN_WIDTH; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->_lineNbr = SCREEN_WIDTH; + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); _animationManager->_clearAnimationFl = true; _soundManager.playSound(25); _animationManager->playAnim("base00a.anm", 10, 18, 18); @@ -2008,7 +2009,7 @@ void HopkinsEngine::playSubmarineCutscene() { if (!_eventsManager->_escKeyFl) _animationManager->playAnim("OC20a.anm", 10, 18, 18); if (!_eventsManager->_escKeyFl) { - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("OC30a.anm", 10, 18, 18); } @@ -2018,35 +2019,35 @@ void HopkinsEngine::playSubmarineCutscene() { } void HopkinsEngine::playUnderwaterBaseCutscene() { - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); _animationManager->NO_SEQ = false; _soundManager.playSound(26); _globals->iRegul = 1; _globals->_disableInventFl = true; _animationManager->NO_COUL = true; - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playSequence("abase.seq", 50, 15, 50); _animationManager->NO_COUL = false; - _graphicsManager.loadImage("IM92"); + _graphicsManager->loadImage("IM92"); _animationManager->loadAnim("ANIM92"); - _graphicsManager.displayAllBob(); + _graphicsManager->displayAllBob(); _objectsManager.loadLinkFile("IM92"); for (int cpt = 0; cpt <= 4; cpt++) _eventsManager->refreshScreenAndEvents(); - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); _globals->enableHiding(); do _eventsManager->refreshScreenAndEvents(); while (_objectsManager.getBobAnimDataIdx(8) != 22); - _graphicsManager.fadeOutLong(); - _graphicsManager.endDisplayBob(); + _graphicsManager->fadeOutLong(); + _graphicsManager->endDisplayBob(); _globals->resetHidingItems(); _globals->_disableInventFl = false; _globals->_exitId = 93; @@ -2057,7 +2058,7 @@ void HopkinsEngine::playEnding() { _globals->PERSO = _globals->freeMemory(_globals->PERSO); _dialogsManager->_removeInventFl = true; _globals->_disableInventFl = true; - _graphicsManager._scrollOffset = 0; + _graphicsManager->_scrollOffset = 0; _globals->_cityMapEnabledFl = false; _globals->iRegul = 1; _soundManager.playSound(26); @@ -2065,23 +2066,23 @@ void HopkinsEngine::playEnding() { _globals->_freezeCharacterFl = true; _globals->_exitId = 0; _soundManager.loadSample(1, "SOUND90.WAV"); - _graphicsManager.loadImage("IM100"); + _graphicsManager->loadImage("IM100"); _animationManager->loadAnim("ANIM100"); - _graphicsManager.displayAllBob(); + _graphicsManager->displayAllBob(); _eventsManager->mouseOn(); _objectsManager.stopBobAnimation(7); _objectsManager.stopBobAnimation(8); _objectsManager.stopBobAnimation(9); - _graphicsManager.SETCOLOR3(252, 100, 100, 100); - _graphicsManager.SETCOLOR3(253, 100, 100, 100); - _graphicsManager.SETCOLOR3(251, 100, 100, 100); - _graphicsManager.SETCOLOR3(254, 0, 0, 0); + _graphicsManager->SETCOLOR3(252, 100, 100, 100); + _graphicsManager->SETCOLOR3(253, 100, 100, 100); + _graphicsManager->SETCOLOR3(251, 100, 100, 100); + _graphicsManager->SETCOLOR3(254, 0, 0, 0); _eventsManager->changeMouseCursor(0); for (int cpt = 0; cpt <= 4; cpt++) _eventsManager->refreshScreenAndEvents(); - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); _globals->iRegul = 1; do @@ -2133,12 +2134,12 @@ void HopkinsEngine::playEnding() { if (_globals->_saveData->_data[svGameWonFl] == 1) { _soundManager._specialSoundNum = 200; _soundManager._skipRefreshFl = true; - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("BERM.ANM", 100, 24, 300); - _graphicsManager.endDisplayBob(); + _graphicsManager->endDisplayBob(); _soundManager.removeSample(1); - _graphicsManager.loadImage("PLAN3"); - _graphicsManager.fadeInLong(); + _graphicsManager->loadImage("PLAN3"); + _graphicsManager->fadeInLong(); _eventsManager->_rateCounter = 0; if (!_eventsManager->_escKeyFl) { @@ -2147,16 +2148,16 @@ void HopkinsEngine::playEnding() { while (_eventsManager->_rateCounter < 2000 / _globals->_speed && !_eventsManager->_escKeyFl); } _eventsManager->_escKeyFl = false; - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _globals->iRegul = 1; _soundManager._specialSoundNum = 0; - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("JOUR2A.anm", 12, 12, 1000); _soundManager.playSound(11); - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _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); @@ -2187,8 +2188,8 @@ void HopkinsEngine::playEnding() { _eventsManager->refreshScreenAndEvents(); while (_objectsManager.getBobAnimDataIdx(8) != 21); - _graphicsManager.fadeOutLong(); - _graphicsManager.endDisplayBob(); + _graphicsManager->fadeOutLong(); + _graphicsManager->endDisplayBob(); _soundManager.removeSample(1); _soundManager.playSound(16); _globals->iRegul = 1; @@ -2207,10 +2208,10 @@ void HopkinsEngine::playEnding() { void HopkinsEngine::playPlaneCutscene() { _soundManager.playSound(28); _globals->iRegul = 1; - _graphicsManager.lockScreen(); - _graphicsManager.clearScreen(); - _graphicsManager.unlockScreen(); - _graphicsManager.clearPalette(); + _graphicsManager->lockScreen(); + _graphicsManager->clearScreen(); + _graphicsManager->unlockScreen(); + _graphicsManager->clearPalette(); _animationManager->_clearAnimationFl = false; _animationManager->playAnim("aerop00a.anm", 10, 18, 18); @@ -2241,7 +2242,7 @@ void HopkinsEngine::playPlaneCutscene() { if (!_eventsManager->_escKeyFl) _animationManager->playAnim("trans40a.anm", 10, 18, 18); if (!_eventsManager->_escKeyFl) { - _graphicsManager.FADE_LINUX = 2; + _graphicsManager->FADE_LINUX = 2; _animationManager->playAnim("PARA00a.anm", 9, 9, 9); } @@ -2255,7 +2256,7 @@ void HopkinsEngine::loadBaseMap() { if (f.exists(filename)) { // PBASE file exists, so go ahead and load it - _graphicsManager.loadImage("PBASE"); + _graphicsManager->loadImage("PBASE"); } else { // PBASE file doesn't exist, so draw a substitute screen drawBaseMap(); @@ -2263,7 +2264,7 @@ void HopkinsEngine::loadBaseMap() { } void HopkinsEngine::drawBaseMap() { - memset(_graphicsManager._vesaScreen, 0, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); + memset(_graphicsManager->_vesaScreen, 0, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); // List of rectangle areas to draw for exit points const int rects[] = { @@ -2281,13 +2282,13 @@ 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._vesaScreen + yp * SCREEN_WIDTH + r.left; + byte *pDest = _graphicsManager->_vesaScreen + yp * SCREEN_WIDTH + r.left; Common::fill(pDest, pDest + r.width(), 0xff); } } // Copy the calculated screen - memcpy(_graphicsManager._vesaBuffer, _graphicsManager._vesaScreen, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); + memcpy(_graphicsManager->_vesaBuffer, _graphicsManager->_vesaScreen, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); // Write some explanatory text _fontManager->displayText(40, 200, "ScummVM base map - select a square for different rooms", 255); @@ -2300,12 +2301,12 @@ int HopkinsEngine::handleBaseMap() { loadBaseMap(); // Set needed colors - _graphicsManager.SETCOLOR3(252, 100, 100, 100); - _graphicsManager.SETCOLOR3(253, 100, 100, 100); - _graphicsManager.SETCOLOR3(251, 100, 100, 100); - _graphicsManager.SETCOLOR3(254, 0, 0, 0); + _graphicsManager->SETCOLOR3(252, 100, 100, 100); + _graphicsManager->SETCOLOR3(253, 100, 100, 100); + _graphicsManager->SETCOLOR3(251, 100, 100, 100); + _graphicsManager->SETCOLOR3(254, 0, 0, 0); _eventsManager->changeMouseCursor(0); - _graphicsManager.fadeInLong(); + _graphicsManager->fadeInLong(); bool loopCond = false; int zone; do { @@ -2339,10 +2340,10 @@ int HopkinsEngine::handleBaseMap() { _globals->_baseMapColor += 25; if (_globals->_baseMapColor > 100) _globals->_baseMapColor = 0; - _graphicsManager.SETCOLOR4(251, _globals->_baseMapColor, _globals->_baseMapColor, _globals->_baseMapColor); + _graphicsManager->SETCOLOR4(251, _globals->_baseMapColor, _globals->_baseMapColor, _globals->_baseMapColor); } else { _eventsManager->changeMouseCursor(0); - _graphicsManager.SETCOLOR4(251, 100, 100, 100); + _graphicsManager->SETCOLOR4(251, 100, 100, 100); } _eventsManager->refreshScreenAndEvents(); if ((mouseButton == 1) && zone) @@ -2350,7 +2351,7 @@ int HopkinsEngine::handleBaseMap() { } while (!loopCond); _globals->_disableInventFl = false; - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); int result; switch (zone) { @@ -2466,7 +2467,7 @@ void HopkinsEngine::displayCredits(int startPosY, byte *buffer, char color) { if (!curChar) break; if (curChar > 31) { - _graphicsManager.displayFont(_graphicsManager._vesaBuffer, _fontManager->_font, startPosX, startPosY, curChar - 32, color); + _graphicsManager->displayFont(_graphicsManager->_vesaBuffer, _fontManager->_font, startPosX, startPosY, curChar - 32, color); startPosX += _objectsManager.getWidth(_fontManager->_font, curChar - 32); } } @@ -2475,8 +2476,8 @@ void HopkinsEngine::displayCredits(int startPosY, byte *buffer, char color) { void HopkinsEngine::displayCredits() { loadCredits(); _globals->_creditsPosY = 436; - _graphicsManager.loadImage("GENERIC"); - _graphicsManager.fadeInLong(); + _graphicsManager->loadImage("GENERIC"); + _graphicsManager->fadeInLong(); _soundManager.playSound(28); _eventsManager->_mouseFl = false; _globals->iRegul = 3; @@ -2513,7 +2514,7 @@ void HopkinsEngine::displayCredits() { --_globals->_creditsPosY; if (_globals->_creditsStartX != -1 || _globals->_creditsEndX != -1 || _globals->_creditsStartY != -1 || _globals->_creditsEndY != -1) { _eventsManager->refreshScreenAndEvents(); - _graphicsManager.copySurface(_graphicsManager._vesaScreen, 60, 50, 520, 380, _graphicsManager._vesaBuffer, 60, 50); + _graphicsManager->copySurface(_graphicsManager->_vesaScreen, 60, 50, 520, 380, _graphicsManager->_vesaBuffer, 60, 50); } else { _eventsManager->refreshScreenAndEvents(); } @@ -2529,7 +2530,7 @@ void HopkinsEngine::displayCredits() { _globals->_creditsStartY = -1; _globals->_creditsEndY = -1; } while ((_eventsManager->getMouseButton() != 1) && (!shouldQuit())); - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _globals->iRegul = 1; _eventsManager->_mouseFl = true; } @@ -2748,14 +2749,14 @@ 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; + _graphicsManager->_noFadingFl = false; _globals->_freezeCharacterFl = false; _globals->_exitId = 0; _globals->_disableInventFl = true; _soundManager.playSound(soundId); _globals->PERSO = _fileManager->loadFile("VAISSEAU.SPR"); if (backgroundFilename.size()) - _graphicsManager.loadImage(backgroundFilename); + _graphicsManager->loadImage(backgroundFilename); if (curExitId == 77) _objectsManager.loadLinkFile("IM77"); @@ -2800,10 +2801,10 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi } _objectsManager.addStaticSprite(_globals->PERSO, Common::Point(_objectsManager._characterPos.x, 110), 0, _objectsManager._startSpriteIndex, 0, false, 0, 0); - _graphicsManager.SETCOLOR3(252, 100, 100, 100); - _graphicsManager.SETCOLOR3(253, 100, 100, 100); - _graphicsManager.SETCOLOR3(251, 100, 100, 100); - _graphicsManager.SETCOLOR3(254, 0, 0, 0); + _graphicsManager->SETCOLOR3(252, 100, 100, 100); + _graphicsManager->SETCOLOR3(253, 100, 100, 100); + _graphicsManager->SETCOLOR3(251, 100, 100, 100); + _graphicsManager->SETCOLOR3(254, 0, 0, 0); _objectsManager.animateSprite(0); _linesManager._route = (RouteItem *)g_PTRNUL; _eventsManager->mouseOn(); @@ -2812,9 +2813,9 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi for (int cpt = 0; cpt <= 4; cpt++) _eventsManager->refreshScreenAndEvents(); - if (!_graphicsManager._noFadingFl) - _graphicsManager.fadeInLong(); - _graphicsManager._noFadingFl = false; + if (!_graphicsManager->_noFadingFl) + _graphicsManager->fadeInLong(); + _graphicsManager->_noFadingFl = false; _globals->iRegul = 1; for (;;) { @@ -2837,7 +2838,7 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi _globals->_exitId = exit3; else if (_globals->_exitId == 4) _globals->_exitId = exit4; - _graphicsManager.fadeOutLong(); + _graphicsManager->fadeOutLong(); _objectsManager.removeSprite(0); _objectsManager.clearScreen(); _globals->PERSO = _fileManager->loadFile("PERSO.SPR"); @@ -2854,17 +2855,17 @@ bool HopkinsEngine::displayAdultDisclaimer() { int xp, yp; int buttonIndex; - _graphicsManager._minX = 0; - _graphicsManager._minY = 0; - _graphicsManager._maxX = SCREEN_WIDTH; - _graphicsManager._maxY = SCREEN_HEIGHT - 1; + _graphicsManager->_minX = 0; + _graphicsManager->_minY = 0; + _graphicsManager->_maxX = SCREEN_WIDTH; + _graphicsManager->_maxY = SCREEN_HEIGHT - 1; _eventsManager->_breakoutFl = false; _objectsManager._forestFl = false; _globals->_disableInventFl = true; _globals->_exitId = 0; - _graphicsManager.loadImage("ADULT"); - _graphicsManager.fadeInLong(); + _graphicsManager->loadImage("ADULT"); + _graphicsManager->fadeInLong(); _eventsManager->mouseOn(); _eventsManager->changeMouseCursor(0); _eventsManager->_mouseCursorId = 0; @@ -2884,17 +2885,17 @@ bool HopkinsEngine::displayAdultDisclaimer() { } while (!shouldQuit() && (buttonIndex == 0 || _eventsManager->getMouseButton() != 1)); _globals->_disableInventFl = false; - _graphicsManager.fadeOutLong(); + _graphicsManager->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; + _graphicsManager->_minX = 0; + _graphicsManager->_maxY = 20; + _graphicsManager->_maxX = SCREEN_WIDTH; + _graphicsManager->_maxY = SCREEN_HEIGHT - 20; return true; } } diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h index 5f8838594f..3349f5d5ce 100644 --- a/engines/hopkins/hopkins.h +++ b/engines/hopkins/hopkins.h @@ -150,8 +150,8 @@ public: FileManager *_fileManager; FontManager *_fontManager; Globals *_globals; + GraphicsManager *_graphicsManager; - GraphicsManager _graphicsManager; LinesManager _linesManager; MenuManager _menuManager; ObjectsManager _objectsManager; diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp index dac2a30ce1..816f4f855e 100644 --- a/engines/hopkins/lines.cpp +++ b/engines/hopkins/lines.cpp @@ -140,11 +140,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->_graphicsManager->_scrollOffset + 424 && posX <= _vm->_graphicsManager->_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->_graphicsManager->_scrollOffset + 424 && posX <= _vm->_graphicsManager->_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->_graphicsManager->_scrollOffset + 152 || posX > _vm->_graphicsManager->_scrollOffset + 484) hotspotId = 32; return hotspotId; @@ -157,30 +157,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->_graphicsManager->_scrollOffset + 158 && posX < _vm->_graphicsManager->_scrollOffset + 208) return result; - if (posX >= _vm->_graphicsManager._scrollOffset + 208 && posX < _vm->_graphicsManager._scrollOffset + 266) { + if (posX >= _vm->_graphicsManager->_scrollOffset + 208 && posX < _vm->_graphicsManager->_scrollOffset + 266) { result += 1; return result; } - if (posX >= _vm->_graphicsManager._scrollOffset + 266 && posX < _vm->_graphicsManager._scrollOffset + 320) { + if (posX >= _vm->_graphicsManager->_scrollOffset + 266 && posX < _vm->_graphicsManager->_scrollOffset + 320) { result += 2; return result; } - if (posX >= _vm->_graphicsManager._scrollOffset + 320 && posX < _vm->_graphicsManager._scrollOffset + 370) { + if (posX >= _vm->_graphicsManager->_scrollOffset + 320 && posX < _vm->_graphicsManager->_scrollOffset + 370) { result += 3; return result; } - if (posX >= _vm->_graphicsManager._scrollOffset + 370 && posX < _vm->_graphicsManager._scrollOffset + 424) { + if (posX >= _vm->_graphicsManager->_scrollOffset + 370 && posX < _vm->_graphicsManager->_scrollOffset + 424) { result += 4; return result; } - if (!lastRow && posX >= _vm->_graphicsManager._scrollOffset + 424 && posX <= _vm->_graphicsManager._scrollOffset + 478) { + if (!lastRow && posX >= _vm->_graphicsManager->_scrollOffset + 424 && posX <= _vm->_graphicsManager->_scrollOffset + 478) { result += 5; return result; } @@ -425,8 +425,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->_graphicsManager->_maxX == curLineX || _vm->_graphicsManager->_maxY == curLineY || + _vm->_graphicsManager->_minX == curLineX || _vm->_graphicsManager->_minY == curLineY || (lineX == curLineX && lineY == curLineY)) break; if (lineIdx == MAX_LINES) @@ -947,7 +947,7 @@ int LinesManager::GENIAL(int lineIdx, int dataIdx, int fromX, int fromY, int des lineIdxRight = foundLineIdx; - if (_vm->_graphicsManager._maxX <= curX || maxLineX <= curX) + if (_vm->_graphicsManager->_maxX <= curX || maxLineX <= curX) break; } curX = destX; @@ -1104,8 +1104,8 @@ RouteItem *LinesManager::PARCOURS2(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->_graphicsManager->_maxX - 10) + clipDestX = _vm->_graphicsManager->_maxX - 10; if (clipDestY > _vm->_globals->_characterMaxPosY) clipDestY = _vm->_globals->_characterMaxPosY; @@ -1123,7 +1123,7 @@ RouteItem *LinesManager::PARCOURS2(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->_graphicsManager->_maxY; tmpY++, tmpDelta++) { if (checkCollisionLine(clipDestX, tmpY, &collLineDataIdxArr[DIR_DOWN], &collLineIdxArr[DIR_DOWN], 0, _lastLine) && collLineIdxArr[DIR_DOWN] <= _lastLine) break; collLineDataIdxArr[DIR_DOWN] = 0; @@ -1132,7 +1132,7 @@ RouteItem *LinesManager::PARCOURS2(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->_graphicsManager->_minY; tmpY--, tmpDelta++) { if (checkCollisionLine(clipDestX, tmpY, &collLineDataIdxArr[DIR_UP], &collLineIdxArr[DIR_UP], 0, _lastLine) && collLineIdxArr[DIR_UP] <= _lastLine) break; collLineDataIdxArr[DIR_UP] = 0; @@ -1143,7 +1143,7 @@ RouteItem *LinesManager::PARCOURS2(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->_graphicsManager->_maxX; tmpX++) { if (checkCollisionLine(tmpX, clipDestY, &collLineDataIdxArr[DIR_RIGHT], &collLineIdxArr[DIR_RIGHT], 0, _lastLine) && collLineIdxArr[DIR_RIGHT] <= _lastLine) break; collLineDataIdxArr[DIR_RIGHT] = 0; @@ -1157,7 +1157,7 @@ RouteItem *LinesManager::PARCOURS2(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->_graphicsManager->_minX; tmpX--) { if (checkCollisionLine(tmpX, clipDestY, &collLineDataIdxArr[DIR_LEFT], &collLineIdxArr[DIR_LEFT], 0, _lastLine) && collLineIdxArr[DIR_LEFT] <= _lastLine) break; collLineDataIdxArr[DIR_LEFT] = 0; @@ -1213,7 +1213,7 @@ RouteItem *LinesManager::PARCOURS2(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->_graphicsManager->_maxY; tmpY++, tmpDelta++) { if (checkCollisionLine(fromX, tmpY, &collLineDataIdxArr[DIR_DOWN], &collLineIdxArr[DIR_DOWN], 0, _lastLine) && collLineIdxArr[DIR_DOWN] <= _lastLine) break; collLineDataIdxArr[DIR_DOWN] = 0; @@ -1222,7 +1222,7 @@ RouteItem *LinesManager::PARCOURS2(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->_graphicsManager->_minY; tmpY--) { if (checkCollisionLine(fromX, tmpY, &collLineDataIdxArr[DIR_UP], &collLineIdxArr[DIR_UP], 0, _lastLine) && collLineIdxArr[DIR_UP] <= _lastLine) break; collLineDataIdxArr[DIR_UP] = 0; @@ -1234,7 +1234,7 @@ RouteItem *LinesManager::PARCOURS2(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->_graphicsManager->_maxX; tmpX++) { if (checkCollisionLine(tmpX, fromY, &collLineDataIdxArr[DIR_RIGHT], &collLineIdxArr[DIR_RIGHT], 0, _lastLine) && collLineIdxArr[DIR_RIGHT] <= _lastLine) break; collLineDataIdxArr[DIR_RIGHT] = 0; @@ -1246,7 +1246,7 @@ RouteItem *LinesManager::PARCOURS2(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->_graphicsManager->_minX; tmpX--) { if (checkCollisionLine(tmpX, fromY, &collLineDataIdxArr[DIR_LEFT], &collLineIdxArr[DIR_LEFT], 0, _lastLine) && collLineIdxArr[DIR_LEFT] <= _lastLine) break; collLineDataIdxArr[DIR_LEFT] = 0; @@ -1985,13 +1985,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->_graphicsManager->_maxX - 10) + clipX2 = _vm->_graphicsManager->_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->_graphicsManager->_maxY; delta++) { if (checkCollisionLine(clipX2, clipY2 + delta, &arrDataIdx[DIR_DOWN], &arrLineIdx[DIR_DOWN], 0, _lastLine) && arrLineIdx[DIR_DOWN] <= _lastLine) break; arrDataIdx[DIR_DOWN] = 0; @@ -1999,7 +1999,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->_graphicsManager->_minY; delta++) { if (checkCollisionLine(clipX2, clipY2 - delta , &arrDataIdx[DIR_UP], &arrLineIdx[DIR_UP], 0, _lastLine) && arrLineIdx[DIR_UP] <= _lastLine) break; arrDataIdx[DIR_UP] = 0; @@ -2009,7 +2009,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->_graphicsManager->_maxX; delta++) { if (checkCollisionLine(clipX2 + delta, clipY2, &arrDataIdx[DIR_UP], &arrLineIdx[DIR_UP], 0, _lastLine) && arrLineIdx[DIR_UP] <= _lastLine) break; arrDataIdx[DIR_UP] = 0; @@ -2019,7 +2019,7 @@ RouteItem *LinesManager::cityMapCarRoute(int x1, int y1, int x2, int y2) { } arrDelta[DIR_UP] = delta; - for (delta = 0; clipX2 - delta > _vm->_graphicsManager._minX; delta++) { + for (delta = 0; clipX2 - delta > _vm->_graphicsManager->_minX; delta++) { if (checkCollisionLine(clipX2 - delta, clipY2, &arrDataIdx[DIR_LEFT], &arrLineIdx[DIR_LEFT], 0, _lastLine) && arrLineIdx[DIR_LEFT] <= _lastLine) break; arrDataIdx[DIR_LEFT] = 0; @@ -2200,11 +2200,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->_graphicsManager->zoomOut(realSpeedX, -spriteSize); + realSpeedY = _vm->_graphicsManager->zoomOut(realSpeedY, -spriteSize); } else if (spriteSize > 0) { - realSpeedX = _vm->_graphicsManager.zoomIn(realSpeedX, spriteSize); - realSpeedY = _vm->_graphicsManager.zoomIn(realSpeedY, spriteSize); + realSpeedX = _vm->_graphicsManager->zoomIn(realSpeedX, spriteSize); + realSpeedY = _vm->_graphicsManager->zoomIn(realSpeedY, spriteSize); } for (int i = 0; i < realSpeedX; i++) { --curX; @@ -2234,11 +2234,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->_graphicsManager->zoomOut(realSpeedX, -spriteSize); + realSpeedY = _vm->_graphicsManager->zoomOut(realSpeedY, -spriteSize); } else if (spriteSize > 0) { - realSpeedX = _vm->_graphicsManager.zoomIn(realSpeedX, spriteSize); - realSpeedY = _vm->_graphicsManager.zoomIn(realSpeedY, spriteSize); + realSpeedX = _vm->_graphicsManager->zoomIn(realSpeedX, spriteSize); + realSpeedY = _vm->_graphicsManager->zoomIn(realSpeedY, spriteSize); } for (int i = 0; i < realSpeedX; i++) { ++curX; @@ -2264,8 +2264,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->_graphicsManager->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedX, 25); + int realSpeedY = _vm->_graphicsManager->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedY, 25); int oldY = curY; for (int i = 0; i < realSpeedX; i++) { --curX; @@ -2292,8 +2292,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->_graphicsManager->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedX, 25); + int realSpeedY = _vm->_graphicsManager->zoomOut(_vm->_globals->_hopkinsItem[hopkinsIdx]._speedY, 25); for (int i = 0; i < realSpeedX; i++) { ++curX; _smoothRoute[smoothIdx]._posX = curX; @@ -2473,9 +2473,9 @@ int LinesManager::CALC_PROPRE(int idx) { int retVal = 25; if (size < 0) - retVal = _vm->_graphicsManager.zoomOut(25, -size); + retVal = _vm->_graphicsManager->zoomOut(25, -size); else if (size > 0) - retVal = _vm->_graphicsManager.zoomIn(25, size); + retVal = _vm->_graphicsManager->zoomIn(25, size); return retVal; } @@ -2578,7 +2578,7 @@ int LinesManager::getMouseZone() { return -1; int colRes2 = 0; - for (int j = yp; j < _vm->_graphicsManager._maxY; ++j) { + for (int j = yp; j < _vm->_graphicsManager->_maxY; ++j) { colRes2 = checkCollision(xp, j); if (colRes2 != -1 && ZONEP[colRes1]._enabledFl) break; @@ -2597,7 +2597,7 @@ int LinesManager::getMouseZone() { return -1; int colRes4 = 0; - for (int xCurrent = xp; _vm->_graphicsManager._maxX > xCurrent; ++xCurrent) { + for (int xCurrent = xp; _vm->_graphicsManager->_maxX > xCurrent; ++xCurrent) { colRes4 = checkCollision(xCurrent, yp); if (colRes4 != -1 && ZONEP[colRes1]._enabledFl) break; @@ -2817,7 +2817,7 @@ void LinesManager::checkZone() { int oldMouseY = mouseY; if (_vm->_globals->_cityMapEnabledFl || _vm->_eventsManager->_startPos.x >= mouseX - || (mouseY = _vm->_graphicsManager._scrollOffset + 54, mouseX >= mouseY) + || (mouseY = _vm->_graphicsManager->_scrollOffset + 54, mouseX >= mouseY) || (mouseY = oldMouseY - 1, mouseY < 0 || mouseY > 59)) { if (_vm->_objectsManager._visibleFl) _vm->_objectsManager._eraseVisibleCounter = 4; @@ -2846,7 +2846,7 @@ void LinesManager::checkZone() { zoneId = _vm->_globals->_oldMouseZoneId; } if (_vm->_globals->_oldMouseZoneId != zoneId) { - _vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100); _vm->_eventsManager->_mouseCursorId = 4; _vm->_eventsManager->changeMouseCursor(4); if (_vm->_globals->_forceHideText) { @@ -2869,7 +2869,7 @@ void LinesManager::checkZone() { _vm->_globals->_hotspotTextColor += 25; if (_vm->_globals->_hotspotTextColor > 100) _vm->_globals->_hotspotTextColor = 0; - _vm->_graphicsManager.SETCOLOR4(251, _vm->_globals->_hotspotTextColor, _vm->_globals->_hotspotTextColor, + _vm->_graphicsManager->SETCOLOR4(251, _vm->_globals->_hotspotTextColor, _vm->_globals->_hotspotTextColor, _vm->_globals->_hotspotTextColor); if (_vm->_eventsManager->_mouseCursorId == 4) { if (ZONEP[zoneId]._verbFl1 == 2) { @@ -2879,7 +2879,7 @@ void LinesManager::checkZone() { } } } else { - _vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100); _vm->_eventsManager->_mouseCursorId = 4; _vm->_eventsManager->changeMouseCursor(4); } diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp index eca853f799..1157a032a8 100644 --- a/engines/hopkins/menu.cpp +++ b/engines/hopkins/menu.cpp @@ -68,15 +68,15 @@ int MenuManager::menu() { memset(frameIndex, 0, sizeof(int) * ARRAYSIZE(frameIndex)); if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) - _vm->_graphicsManager.loadImage("MENU"); + _vm->_graphicsManager->loadImage("MENU"); else if (_vm->_globals->_language == LANG_EN) - _vm->_graphicsManager.loadImage("MENUAN"); + _vm->_graphicsManager->loadImage("MENUAN"); else if (_vm->_globals->_language == LANG_FR) - _vm->_graphicsManager.loadImage("MENUFR"); + _vm->_graphicsManager->loadImage("MENUFR"); else if (_vm->_globals->_language == LANG_SP) - _vm->_graphicsManager.loadImage("MENUES"); + _vm->_graphicsManager->loadImage("MENUES"); - _vm->_graphicsManager.fadeInLong(); + _vm->_graphicsManager->fadeInLong(); if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) spriteData = _vm->_objectsManager.loadSprite("MENU.SPR"); @@ -120,11 +120,11 @@ 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->_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(); if (_vm->_eventsManager->getMouseButton() == 1 && menuIndex != MENU_NONE) @@ -132,7 +132,7 @@ int MenuManager::menu() { } while (!selectionMade); if (menuIndex > MENU_NONE) { - _vm->_graphicsManager.fastDisplay(spriteData, 230, 259 + 32 * (menuIndex - 1), 10 + (menuIndex - 1)); + _vm->_graphicsManager->fastDisplay(spriteData, 230, 259 + 32 * (menuIndex - 1), 10 + (menuIndex - 1)); _vm->_eventsManager->refreshScreenAndEvents(); _vm->_eventsManager->delay(200); } @@ -161,7 +161,7 @@ int MenuManager::menu() { _vm->_globals->freeMemory(spriteData); _vm->_globals->_disableInventFl = false; - _vm->_graphicsManager.fadeOutLong(); + _vm->_graphicsManager->fadeOutLong(); return result; } diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index ce4f06e490..c9f04e0eb5 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -301,16 +301,16 @@ void ObjectsManager::displaySprite() { if (_vm->_fontManager->_textList[idx]._enabledFl && _vm->_fontManager->_text[idx]._textType != 2) { clipX = _vm->_fontManager->_textList[idx]._pos.x - 2; - if (clipX < _vm->_graphicsManager._minX) - clipX = _vm->_graphicsManager._minX; + if (clipX < _vm->_graphicsManager->_minX) + clipX = _vm->_graphicsManager->_minX; clipY = _vm->_fontManager->_textList[idx]._pos.y - 2; - if (clipY < _vm->_graphicsManager._minY) - clipY = _vm->_graphicsManager._minY; + if (clipY < _vm->_graphicsManager->_minY) + clipY = _vm->_graphicsManager->_minY; - _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, clipX, clipY, + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, clipX, clipY, _vm->_fontManager->_textList[idx]._width + 4, _vm->_fontManager->_textList[idx]._height + 4, - _vm->_graphicsManager._vesaBuffer, clipX, clipY); + _vm->_graphicsManager->_vesaBuffer, clipX, clipY); _vm->_fontManager->_textList[idx]._enabledFl = false; } } @@ -319,16 +319,16 @@ void ObjectsManager::displaySprite() { for (int idx = 0; idx < MAX_SPRITE; ++idx) { if (_vm->_globals->Liste[idx]._visibleFl) { clipX = _vm->_globals->Liste[idx]._posX - 2; - if (clipX < _vm->_graphicsManager._minX) - clipX = _vm->_graphicsManager._minX; + if (clipX < _vm->_graphicsManager->_minX) + clipX = _vm->_graphicsManager->_minX; clipY = _vm->_globals->Liste[idx]._posY - 2; - if (clipY < _vm->_graphicsManager._minY) - clipY = _vm->_graphicsManager._minY; + if (clipY < _vm->_graphicsManager->_minY) + clipY = _vm->_graphicsManager->_minY; - _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, clipX, clipY, + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, clipX, clipY, _vm->_globals->Liste[idx]._width + 4, _vm->_globals->Liste[idx]._height + 4, - _vm->_graphicsManager._vesaBuffer, clipX, clipY); + _vm->_graphicsManager->_vesaBuffer, clipX, clipY); _vm->_globals->Liste[idx]._visibleFl = false; } } @@ -411,41 +411,41 @@ void ObjectsManager::displaySprite() { _vm->_globals->_sortedDisplayCount = 0; if (_vm->_dialogsManager->_inventDisplayedFl) { - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, _vm->_dialogsManager->_inventWin1, _vm->_dialogsManager->_inventX, _vm->_dialogsManager->_inventY, _vm->_dialogsManager->_inventWidth, _vm->_dialogsManager->_inventHeight); + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, _vm->_dialogsManager->_inventWin1, _vm->_dialogsManager->_inventX, _vm->_dialogsManager->_inventY, _vm->_dialogsManager->_inventWidth, _vm->_dialogsManager->_inventHeight); if (_oldBorderPos.x && _oldBorderPos.y) - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_dialogsManager->_inventBuf2, _oldBorderPos.x + 300, _oldBorderPos.y + 300, _oldBorderSpriteIndex + 1); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_dialogsManager->_inventBuf2, _oldBorderPos.x + 300, _oldBorderPos.y + 300, _oldBorderSpriteIndex + 1); if (_borderPos.x && _borderPos.y) - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_dialogsManager->_inventBuf2, _borderPos.x + 300, _borderPos.y + 300, _borderSpriteIndex); - _vm->_graphicsManager.addDirtyRect(_vm->_dialogsManager->_inventX, _vm->_dialogsManager->_inventY, _vm->_dialogsManager->_inventX + _vm->_dialogsManager->_inventWidth, _vm->_dialogsManager->_inventY + _vm->_dialogsManager->_inventHeight); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_dialogsManager->_inventBuf2, _borderPos.x + 300, _borderPos.y + 300, _borderSpriteIndex); + _vm->_graphicsManager->addDirtyRect(_vm->_dialogsManager->_inventX, _vm->_dialogsManager->_inventY, _vm->_dialogsManager->_inventX + _vm->_dialogsManager->_inventWidth, _vm->_dialogsManager->_inventY + _vm->_dialogsManager->_inventHeight); } if (_saveLoadFl) { - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, _saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353); + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, _saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353); if (_saveLoadX && _saveLoadY) - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _saveLoadSprite2, _saveLoadX + _vm->_eventsManager->_startPos.x + 300, _saveLoadY + 300, 0); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _saveLoadSprite2, _saveLoadX + _vm->_eventsManager->_startPos.x + 300, _saveLoadY + 300, 0); - _vm->_graphicsManager.addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, _vm->_eventsManager->_startPos.x + 457, 413); + _vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, _vm->_eventsManager->_startPos.x + 457, 413); } // If the Options dialog is activated, draw the elements if (_vm->_globals->_optionDialogFl) { - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals->_optionDialogSpr, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_globals->_optionDialogSpr, _vm->_eventsManager->_startPos.x + 464, 407, 0); - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals->_optionDialogSpr, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_globals->_optionDialogSpr, _vm->_eventsManager->_startPos.x + 657, 556, _vm->_globals->_menuSpeed); - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals->_optionDialogSpr, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_globals->_optionDialogSpr, _vm->_eventsManager->_startPos.x + 731, 495, _vm->_globals->_menuTextOff); - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals->_optionDialogSpr, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_globals->_optionDialogSpr, _vm->_eventsManager->_startPos.x + 731, 468, _vm->_globals->_menuVoiceOff); - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals->_optionDialogSpr, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_globals->_optionDialogSpr, _vm->_eventsManager->_startPos.x + 731, 441, _vm->_globals->_menuSoundOff); - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals->_optionDialogSpr, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_globals->_optionDialogSpr, _vm->_eventsManager->_startPos.x + 731, 414, _vm->_globals->_menuMusicOff); - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals->_optionDialogSpr, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_globals->_optionDialogSpr, _vm->_eventsManager->_startPos.x + 600, 522, _vm->_globals->_menuDisplayType); - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals->_optionDialogSpr, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _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->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 164, 107, _vm->_eventsManager->_startPos.x + 498, 320); } // Loop to draw any on-screen text @@ -470,17 +470,17 @@ void ObjectsManager::displaySprite() { _vm->_fontManager->_textList[idx]._width = _vm->_fontManager->_text[idx]._width; _vm->_fontManager->_textList[idx]._height = _vm->_fontManager->_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->_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; 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; + 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]._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; } @@ -532,10 +532,10 @@ void ObjectsManager::setBobInfo(int idx) { int yp = _bob[idx]._oldY; if (_bob[idx]._isSpriteFl) - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _bob[idx]._spriteData, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _bob[idx]._spriteData, xp + 300, yp + 300, _bob[idx]._frameIndex); else - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _bob[idx]._spriteData, xp + 300, yp + 300, _bob[idx]._frameIndex, _bob[idx]._zoomOutFactor, _bob[idx]._zooInmFactor, _bob[idx]._flipFl); @@ -547,27 +547,27 @@ void ObjectsManager::setBobInfo(int idx) { _vm->_globals->Liste2[idx]._width = _bob[idx]._oldWidth; _vm->_globals->Liste2[idx]._height = _bob[idx]._oldHeight; - if (_vm->_globals->Liste2[idx]._posX < _vm->_graphicsManager._minX) { - _vm->_globals->Liste2[idx]._width -= _vm->_graphicsManager._minX - _vm->_globals->Liste2[idx]._posX; - _vm->_globals->Liste2[idx]._posX = _vm->_graphicsManager._minX; + if (_vm->_globals->Liste2[idx]._posX < _vm->_graphicsManager->_minX) { + _vm->_globals->Liste2[idx]._width -= _vm->_graphicsManager->_minX - _vm->_globals->Liste2[idx]._posX; + _vm->_globals->Liste2[idx]._posX = _vm->_graphicsManager->_minX; } - if (_vm->_globals->Liste2[idx]._posY < _vm->_graphicsManager._minY) { - _vm->_globals->Liste2[idx]._height -= _vm->_graphicsManager._minY - _vm->_globals->Liste2[idx]._posY; - _vm->_globals->Liste2[idx]._posY = _vm->_graphicsManager._minY; + if (_vm->_globals->Liste2[idx]._posY < _vm->_graphicsManager->_minY) { + _vm->_globals->Liste2[idx]._height -= _vm->_graphicsManager->_minY - _vm->_globals->Liste2[idx]._posY; + _vm->_globals->Liste2[idx]._posY = _vm->_graphicsManager->_minY; } - if (_vm->_globals->Liste2[idx]._width + _vm->_globals->Liste2[idx]._posX > _vm->_graphicsManager._maxX) - _vm->_globals->Liste2[idx]._width = _vm->_graphicsManager._maxX - _vm->_globals->Liste2[idx]._posX; + if (_vm->_globals->Liste2[idx]._width + _vm->_globals->Liste2[idx]._posX > _vm->_graphicsManager->_maxX) + _vm->_globals->Liste2[idx]._width = _vm->_graphicsManager->_maxX - _vm->_globals->Liste2[idx]._posX; - if (_vm->_globals->Liste2[idx]._height + _vm->_globals->Liste2[idx]._posY > _vm->_graphicsManager._maxY) - _vm->_globals->Liste2[idx]._height = _vm->_graphicsManager._maxY - _vm->_globals->Liste2[idx]._posY; + if (_vm->_globals->Liste2[idx]._height + _vm->_globals->Liste2[idx]._posY > _vm->_graphicsManager->_maxY) + _vm->_globals->Liste2[idx]._height = _vm->_graphicsManager->_maxY - _vm->_globals->Liste2[idx]._posY; if (_vm->_globals->Liste2[idx]._width <= 0 || _vm->_globals->Liste2[idx]._height <= 0) _vm->_globals->Liste2[idx]._visibleFl = false; if (_vm->_globals->Liste2[idx]._visibleFl) - _vm->_graphicsManager.addDirtyRect( + _vm->_graphicsManager->addDirtyRect( _vm->_globals->Liste2[idx]._posX, _vm->_globals->Liste2[idx]._posY, _vm->_globals->Liste2[idx]._posX + _vm->_globals->Liste2[idx]._width, @@ -680,26 +680,26 @@ void ObjectsManager::CALCUL_BOB(int idx) { if (posZoom) { if (deltaX >= 0) - deltaX = _vm->_graphicsManager.zoomIn(deltaX, posZoom); + deltaX = _vm->_graphicsManager->zoomIn(deltaX, posZoom); else - deltaX = -_vm->_graphicsManager.zoomIn(-deltaX, posZoom); + deltaX = -_vm->_graphicsManager->zoomIn(-deltaX, posZoom); if (deltaY >= 0) - deltaY = _vm->_graphicsManager.zoomIn(deltaY, posZoom); + deltaY = _vm->_graphicsManager->zoomIn(deltaY, posZoom); else - deltaY = -_vm->_graphicsManager.zoomIn(abs(deltaX), posZoom); + deltaY = -_vm->_graphicsManager->zoomIn(abs(deltaX), posZoom); } if (negZoom) { if (deltaX >= 0) - deltaX = _vm->_graphicsManager.zoomOut(deltaX, negZoom); + deltaX = _vm->_graphicsManager->zoomOut(deltaX, negZoom); else - deltaX = -_vm->_graphicsManager.zoomOut(-deltaX, negZoom); + deltaX = -_vm->_graphicsManager->zoomOut(-deltaX, negZoom); if (deltaY >= 0) - deltaY = _vm->_graphicsManager.zoomOut(deltaY, negZoom); + deltaY = _vm->_graphicsManager->zoomOut(deltaY, negZoom); else - deltaY = -_vm->_graphicsManager.zoomOut(abs(deltaX), negZoom); + deltaY = -_vm->_graphicsManager->zoomOut(abs(deltaX), negZoom); } int newX = _bob[idx]._xp - deltaX; @@ -718,12 +718,12 @@ void ObjectsManager::CALCUL_BOB(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->_graphicsManager->zoomIn(width, posZoom); + height = _vm->_graphicsManager->zoomIn(height, posZoom); } if (negZoom) { - height = _vm->_graphicsManager.zoomOut(height, negZoom); - width = _vm->_graphicsManager.zoomOut(width, negZoom); + height = _vm->_graphicsManager->zoomOut(height, negZoom); + width = _vm->_graphicsManager->zoomOut(width, negZoom); } _vm->_globals->Liste2[idx]._width = width; @@ -780,45 +780,45 @@ void ObjectsManager::DEF_SPRITE(int idx) { return; if (spr->_rleFl) - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, spr->_spriteData, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, spr->_spriteData, spr->_destX + 300, spr->_destY + 300, spr->_spriteIndex); else - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, spr->_spriteData, + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, spr->_spriteData, spr->_destX + 300, spr->_destY + 300, spr->_spriteIndex, spr->_reducePct, spr->_zoomPct, spr->_flipFl); ListeItem *list = &_vm->_globals->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->_graphicsManager->_minX) { + list->_width -= _vm->_graphicsManager->_minX - list->_posX; + list->_posX = _vm->_graphicsManager->_minX; } - if (list->_posY < _vm->_graphicsManager._minY) { - list->_height -= _vm->_graphicsManager._minY - list->_posY; - list->_posY = _vm->_graphicsManager._minY; + if (list->_posY < _vm->_graphicsManager->_minY) { + list->_height -= _vm->_graphicsManager->_minY - list->_posY; + list->_posY = _vm->_graphicsManager->_minY; } - if (list->_width + list->_posX > _vm->_graphicsManager._maxX) - list->_width = _vm->_graphicsManager._maxX - list->_posX; + if (list->_width + list->_posX > _vm->_graphicsManager->_maxX) + list->_width = _vm->_graphicsManager->_maxX - list->_posX; - if (list->_height + list->_posY > _vm->_graphicsManager._maxY) - list->_height = _vm->_graphicsManager._maxY - list->_posY; + if (list->_height + list->_posY > _vm->_graphicsManager->_maxY) + list->_height = _vm->_graphicsManager->_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->_graphicsManager->addDirtyRect( list->_posX, list->_posY, list->_posX + list->_width, list->_posY + list->_height); } void ObjectsManager::displayHiding(int idx) { HidingItem *hid = &_vm->_globals->_hidingItem[idx]; - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals->_hidingItemData[1], + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_globals->_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->_graphicsManager->addDirtyRect(hid->_x, hid->_y, hid->_x + hid->_width, hid->_y + hid->_height); } // Compute Sprite @@ -856,27 +856,27 @@ void ObjectsManager::computeSprite(int idx) { if (zoomPercent) { if (tmpX >= 0) - deltaX = _vm->_graphicsManager.zoomIn(tmpX, zoomPercent); + deltaX = _vm->_graphicsManager->zoomIn(tmpX, zoomPercent); else - deltaX = -_vm->_graphicsManager.zoomIn(-tmpX, zoomPercent); + deltaX = -_vm->_graphicsManager->zoomIn(-tmpX, zoomPercent); if (tmpY >= 0) { - deltaY = _vm->_graphicsManager.zoomIn(tmpY, zoomPercent); + deltaY = _vm->_graphicsManager->zoomIn(tmpY, zoomPercent); } else { tmpY = abs(tmpX); - deltaY = -_vm->_graphicsManager.zoomIn(tmpY, zoomPercent); + deltaY = -_vm->_graphicsManager->zoomIn(tmpY, zoomPercent); } } else if (reducePercent) { if (tmpX >= 0) - deltaX = _vm->_graphicsManager.zoomOut(tmpX, reducePercent); + deltaX = _vm->_graphicsManager->zoomOut(tmpX, reducePercent); else - deltaX = -_vm->_graphicsManager.zoomOut(-tmpX, reducePercent); + deltaX = -_vm->_graphicsManager->zoomOut(-tmpX, reducePercent); if (tmpY >= 0) { - deltaY = _vm->_graphicsManager.zoomOut(tmpY, reducePercent); + deltaY = _vm->_graphicsManager->zoomOut(tmpY, reducePercent); } else { tmpY = abs(tmpX); - deltaY = -_vm->_graphicsManager.zoomOut(tmpY, reducePercent); + deltaY = -_vm->_graphicsManager->zoomOut(tmpY, reducePercent); } } @@ -896,11 +896,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->_graphicsManager->zoomIn(width, zoomPercent); + height = _vm->_graphicsManager->zoomIn(height, zoomPercent); } else if (reducePercent) { - height = _vm->_graphicsManager.zoomOut(height, reducePercent); - width = _vm->_graphicsManager.zoomOut(width, reducePercent); + height = _vm->_graphicsManager->zoomOut(height, reducePercent); + width = _vm->_graphicsManager->zoomOut(width, reducePercent); } spr->_width = width; @@ -1024,10 +1024,10 @@ void ObjectsManager::displayBobAnim() { if ((_bob[i]._bobMode == 10) && (_bob[i]._bobMode10)) { if ((_bob[i]._bobModeChange != 2) && (_bob[i]._bobModeChange != 4)) { if (_vm->_globals->Liste2[i]._visibleFl) { - _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_globals->Liste2[i]._posX, _vm->_globals->Liste2[i]._posY, _vm->_globals->Liste2[i]._width, _vm->_globals->Liste2[i]._height, - _vm->_graphicsManager._vesaBuffer, _vm->_globals->Liste2[i]._posX, + _vm->_graphicsManager->_vesaBuffer, _vm->_globals->Liste2[i]._posX, _vm->_globals->Liste2[i]._posY); _vm->_globals->Liste2[i]._visibleFl = false; } @@ -1036,10 +1036,10 @@ void ObjectsManager::displayBobAnim() { if (_bob[i]._bobMode == 11) { if (_vm->_globals->Liste2[i]._visibleFl) { - _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_globals->Liste2[i]._posX, _vm->_globals->Liste2[i]._posY, _vm->_globals->Liste2[i]._width, _vm->_globals->Liste2[i]._height, - _vm->_graphicsManager._vesaBuffer, + _vm->_graphicsManager->_vesaBuffer, _vm->_globals->Liste2[i]._posX, _vm->_globals->Liste2[i]._posY); _vm->_globals->Liste2[i]._visibleFl = false; } @@ -1074,13 +1074,13 @@ void ObjectsManager::displayVBob() { width = getWidth(vbob->_spriteData, vbob->_frameIndex); height = getHeight(vbob->_spriteData, vbob->_frameIndex); - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaScreen, vbob->_surface, + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaScreen, vbob->_surface, vbob->_xp, vbob->_yp, width, height); - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, vbob->_surface, + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, vbob->_surface, vbob->_xp, vbob->_yp, width, height); - _vm->_graphicsManager.addDirtyRect(vbob->_xp, vbob->_yp, vbob->_xp + width, height + vbob->_yp); + _vm->_graphicsManager->addDirtyRect(vbob->_xp, vbob->_yp, vbob->_xp + width, height + vbob->_yp); vbob->_surface = _vm->_globals->freeMemory(vbob->_surface); vbob->_displayMode = 0; @@ -1098,13 +1098,13 @@ void ObjectsManager::displayVBob() { width = getWidth(vbob->_oldSpriteData, vbob->_oldFrameIndex); height = getHeight(vbob->_oldSpriteData, vbob->_oldFrameIndex); - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaScreen, vbob->_surface, + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaScreen, vbob->_surface, vbob->_oldX, vbob->_oldY, width, height); - _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, vbob->_surface, + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, vbob->_surface, vbob->_oldX, vbob->_oldY, width, height); - _vm->_graphicsManager.addDirtyRect(vbob->_oldX, vbob->_oldY, vbob->_oldX + width, vbob->_oldY + height); + _vm->_graphicsManager->addDirtyRect(vbob->_oldX, vbob->_oldY, vbob->_oldX + width, vbob->_oldY + height); vbob->_displayMode = 1; vbob->_oldSpriteData = vbob->_spriteData; @@ -1125,24 +1125,24 @@ void ObjectsManager::displayVBob() { byte *surface = _vm->_globals->allocMemory(height * width); vbob->_surface = surface; - _vm->_graphicsManager.copySurfaceRect(_vm->_graphicsManager._vesaScreen, surface, + _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_vesaScreen, surface, vbob->_xp, vbob->_yp, width, height); if (*vbob->_spriteData == 78) { - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaScreen, vbob->_spriteData, + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaScreen, vbob->_spriteData, vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex, 0, 0, false); - _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, vbob->_spriteData, + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, vbob->_spriteData, vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex, 0, 0, false); } else { - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, vbob->_spriteData, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, vbob->_spriteData, vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex); - _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaScreen, vbob->_spriteData, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaScreen, vbob->_spriteData, vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex); } - _vm->_graphicsManager.addDirtyRect(vbob->_xp, vbob->_yp , vbob->_xp + width, vbob->_yp + height); + _vm->_graphicsManager->addDirtyRect(vbob->_xp, vbob->_yp , vbob->_xp + width, vbob->_yp + height); vbob->_displayMode = 2; } } @@ -1325,11 +1325,11 @@ void ObjectsManager::GOHOME() { int deltaY = _vm->_globals->_hopkinsItem[_vm->_globals->_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->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->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->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX + deltaX; oldPosY = _oldCharacterPosY + deltaY; @@ -1348,11 +1348,11 @@ void ObjectsManager::GOHOME() { int deltaX = _vm->_globals->_hopkinsItem[_vm->_globals->_oldFrameIndex]._speedX; int deltaY = _vm->_globals->_hopkinsItem[_vm->_globals->_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->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->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->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX - deltaX; oldPosY = _oldCharacterPosY - deltaY; @@ -1370,9 +1370,9 @@ void ObjectsManager::GOHOME() { } else { int deltaY = abs(_vm->_globals->_hopkinsItem[_vm->_globals->_oldFrameIndex]._speedY); if (_sprite[0]._zoomFactor < 0) { - deltaY = _vm->_graphicsManager.zoomOut(deltaY, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->zoomOut(deltaY, -_sprite[0]._zoomFactor); } else if (_sprite[0]._zoomFactor > 0) { - deltaY = _vm->_graphicsManager.zoomIn(deltaY, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX; oldPosY = _oldCharacterPosY - deltaY; @@ -1391,9 +1391,9 @@ void ObjectsManager::GOHOME() { } else { int deltaY = abs(_vm->_globals->_hopkinsItem[_vm->_globals->_oldFrameIndex]._speedY); if (_sprite[0]._zoomFactor < 0) { - deltaY = _vm->_graphicsManager.zoomOut(deltaY, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->zoomOut(deltaY, -_sprite[0]._zoomFactor); } else if (_sprite[0]._zoomFactor > 0) { - deltaY = _vm->_graphicsManager.zoomIn(deltaY, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX; oldPosY = deltaY + _oldCharacterPosY; @@ -1412,12 +1412,12 @@ void ObjectsManager::GOHOME() { int deltaX = _vm->_globals->_hopkinsItem[_vm->_globals->_oldFrameIndex]._speedX; int deltaY = _vm->_globals->_hopkinsItem[_vm->_globals->_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->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->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->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = deltaX + _oldCharacterPosX; oldPosY = _oldCharacterPosY + deltaY; @@ -1436,11 +1436,11 @@ void ObjectsManager::GOHOME() { int deltaX = _vm->_globals->_hopkinsItem[_vm->_globals->_oldFrameIndex]._speedX; int deltaY = _vm->_globals->_hopkinsItem[_vm->_globals->_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->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->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->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX - deltaX; oldPosY = _oldCharacterPosY + deltaY; @@ -1459,12 +1459,12 @@ void ObjectsManager::GOHOME() { int deltaX = _vm->_globals->_hopkinsItem[_vm->_globals->_oldFrameIndex]._speedX; int deltaY = _vm->_globals->_hopkinsItem[_vm->_globals->_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->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->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->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = deltaX + _oldCharacterPosX; oldPosY = _oldCharacterPosY + deltaY; @@ -1483,12 +1483,12 @@ void ObjectsManager::GOHOME() { int deltaX = _vm->_globals->_hopkinsItem[_vm->_globals->_oldFrameIndex]._speedX; int deltaY = _vm->_globals->_hopkinsItem[_vm->_globals->_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->_graphicsManager->zoomOut(deltaX, -_sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->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->_graphicsManager->zoomIn(deltaX, _sprite[0]._zoomFactor); + deltaY = _vm->_graphicsManager->zoomIn(deltaY, _sprite[0]._zoomFactor); } oldPosX = _oldCharacterPosX - deltaX; oldPosY = _oldCharacterPosY + deltaY; @@ -1722,21 +1722,21 @@ void ObjectsManager::handleCityMap() { _vm->_linesManager.setMaxLineIdx(1); _vm->_globals->_characterMaxPosY = 440; _vm->_globals->_cityMapEnabledFl = true; - _vm->_graphicsManager._noFadingFl = false; + _vm->_graphicsManager->_noFadingFl = false; _vm->_globals->_freezeCharacterFl = false; _spritePtr = g_PTRNUL; _vm->_globals->_exitId = 0; _vm->_globals->_checkDistanceFl = true; _vm->_soundManager.playSound(31); _vm->_globals->iRegul = 1; - _vm->_graphicsManager.loadImage("PLAN"); + _vm->_graphicsManager->loadImage("PLAN"); _vm->_linesManager.loadLines("PLAN.OB2"); _vm->_globals->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); + _vm->_graphicsManager->displayAllBob(); + _vm->_graphicsManager->initScreen("PLAN", 2, false); for (int i = 0; i <= 15; i++) _vm->_globals->B_CACHE_OFF(i); _vm->_globals->B_CACHE_OFF(19); @@ -1750,22 +1750,22 @@ void ObjectsManager::handleCityMap() { 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->_graphicsManager->scrollScreen(getSpriteX(0) - 320); + _vm->_graphicsManager->_scrollOffset = getSpriteX(0) - 320; animateSprite(0); _vm->_linesManager._route = (RouteItem *)g_PTRNUL; - _vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); + _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0); for (int i = 0; i <= 4; i++) _vm->_eventsManager->refreshScreenAndEvents(); _vm->_globals->iRegul = 1; - _vm->_graphicsManager.fadeInLong(); + _vm->_graphicsManager->fadeInLong(); _vm->_eventsManager->changeMouseCursor(4); - _vm->_graphicsManager._noFadingFl = false; + _vm->_graphicsManager->_noFadingFl = false; bool loopCond = false; do { @@ -1803,10 +1803,10 @@ void ObjectsManager::handleCityMap() { loopCond = true; } while (!_vm->shouldQuit() && !loopCond); - if (!_vm->_graphicsManager._noFadingFl) - _vm->_graphicsManager.fadeOutLong(); + if (!_vm->_graphicsManager->_noFadingFl) + _vm->_graphicsManager->fadeOutLong(); _vm->_globals->iRegul = 0; - _vm->_graphicsManager._noFadingFl = false; + _vm->_graphicsManager->_noFadingFl = false; _mapCarPosX = getSpriteX(0); _mapCarPosY = getSpriteY(0); removeSprite(0); @@ -1824,7 +1824,7 @@ void ObjectsManager::handleLeftButton() { int destY = _vm->_eventsManager->getMouseY(); if (!_vm->_dialogsManager->_inventFl && !_vm->_globals->_cityMapEnabledFl && - destX > _vm->_graphicsManager._scrollOffset - 30 && destX < _vm->_graphicsManager._scrollOffset + 50 && + destX > _vm->_graphicsManager->_scrollOffset - 30 && destX < _vm->_graphicsManager->_scrollOffset + 50 && destY > -30 && destY < 50) { int oldMouseCursor = _vm->_eventsManager->_mouseCursorId; _vm->_dialogsManager->_inventFl = true; @@ -1944,7 +1944,7 @@ void ObjectsManager::handleLeftButton() { _vm->_globals->_actionMoveTo = true; } _vm->_fontManager->hideText(5); - _vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100); if (_vm->_globals->_screenId == 20 && _vm->_globals->_saveData->_data[svField132] == 1 && _curObjectIndex == 20 && _zoneNum == 12 && _vm->_eventsManager->_mouseCursorId == 23) { @@ -1960,21 +1960,21 @@ void ObjectsManager::PARADISE() { if (result && _vm->_globals->_saveData->_data[svLastZoneNum] && result != 4 && result > 3) { _vm->_fontManager->hideText(5); if (!_forestFl || _zoneNum < 20 || _zoneNum > 23) { - if (_vm->_graphicsManager._largeScreenFl) { - _vm->_graphicsManager._scrollStatus = 2; + if (_vm->_graphicsManager->_largeScreenFl) { + _vm->_graphicsManager->_scrollStatus = 2; if (_vm->_eventsManager->_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->_graphicsManager->_scrollPosX -= _vm->_graphicsManager->_scrollSpeed; + if (_vm->_graphicsManager->_scrollPosX < 0) { + _vm->_graphicsManager->_scrollPosX = 0; loopCond = true; } - if (_vm->_graphicsManager._scrollPosX > SCREEN_WIDTH) { - _vm->_graphicsManager._scrollPosX = SCREEN_WIDTH; + if (_vm->_graphicsManager->_scrollPosX > SCREEN_WIDTH) { + _vm->_graphicsManager->_scrollPosX = SCREEN_WIDTH; loopCond = true; } - if (_vm->_eventsManager->getMouseX() > _vm->_graphicsManager._scrollPosX + 620) + if (_vm->_eventsManager->getMouseX() > _vm->_graphicsManager->_scrollPosX + 620) _vm->_eventsManager->setMouseXY(_vm->_eventsManager->_mousePos.x - 4, _vm->_eventsManager->getMouseY()); _vm->_eventsManager->refreshScreenAndEvents(); @@ -1982,27 +1982,27 @@ void ObjectsManager::PARADISE() { } else if (_vm->_eventsManager->_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->_graphicsManager->_scrollPosX += _vm->_graphicsManager->_scrollSpeed; + if (_vm->_graphicsManager->_scrollPosX < 0) { + _vm->_graphicsManager->_scrollPosX = 0; loopCond = true; } - if (_vm->_graphicsManager._scrollPosX > SCREEN_WIDTH) { - _vm->_graphicsManager._scrollPosX = SCREEN_WIDTH; + if (_vm->_graphicsManager->_scrollPosX > SCREEN_WIDTH) { + _vm->_graphicsManager->_scrollPosX = SCREEN_WIDTH; loopCond = true; } - if (_vm->_eventsManager->getMouseX() < _vm->_graphicsManager._scrollPosX + 10) + if (_vm->_eventsManager->getMouseX() < _vm->_graphicsManager->_scrollPosX + 10) _vm->_eventsManager->setMouseXY(_vm->_eventsManager->_mousePos.x + 4, _vm->_eventsManager->getMouseY()); _vm->_eventsManager->refreshScreenAndEvents(); } while (!loopCond && _vm->_eventsManager->_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); + 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; + _vm->_graphicsManager->_scrollStatus = 0; } _vm->_talkManager.REPONSE(_vm->_globals->_saveData->_data[svLastZoneNum], _vm->_globals->_saveData->_data[svLastMouseCursor]); } else { @@ -2047,7 +2047,7 @@ void ObjectsManager::PARADISE() { */ void ObjectsManager::clearScreen() { clearSprite(); - _vm->_graphicsManager.endDisplayBob(); + _vm->_graphicsManager->endDisplayBob(); _vm->_fontManager->hideText(5); _vm->_fontManager->hideText(9); _vm->_globals->clearVBob(); @@ -2078,7 +2078,7 @@ void ObjectsManager::clearScreen() { _changeVerbFl = false; _vm->_linesManager._route = (RouteItem *)g_PTRNUL; _vm->_globals->_oldDirection = DIR_NONE; - _vm->_graphicsManager.resetDirtyRects(); + _vm->_graphicsManager->resetDirtyRects(); } /** @@ -2090,8 +2090,8 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha CharacterLocation *loc; _changeHeadFl = true; - _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, 532, 25, 65, 40, _vm->_graphicsManager._vesaBuffer, 532, 25); - _vm->_graphicsManager.addDirtyRect(532, 25, 597, 65); + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, 532, 25, 65, 40, _vm->_graphicsManager->_vesaBuffer, 532, 25); + _vm->_graphicsManager->addDirtyRect(532, 25, 597, 65); _vm->_globals->_checkDistanceFl = true; _vm->_linesManager._route = (RouteItem *)g_PTRNUL; @@ -2402,17 +2402,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->_graphicsManager->_scrollOffset + 158; else if (zoneIdx == 2 || zoneIdx == 8 || zoneIdx == 14 || zoneIdx == 20 || zoneIdx == 26) - _borderPos.x = _vm->_graphicsManager._scrollOffset + 212; + _borderPos.x = _vm->_graphicsManager->_scrollOffset + 212; else if (zoneIdx == 3 || zoneIdx == 9 || zoneIdx == 15 || zoneIdx == 21 || zoneIdx == 27) - _borderPos.x = _vm->_graphicsManager._scrollOffset + 266; + _borderPos.x = _vm->_graphicsManager->_scrollOffset + 266; else if (zoneIdx == 4 || zoneIdx == 10 || zoneIdx == 16 || zoneIdx == 22 || zoneIdx == 28) - _borderPos.x = _vm->_graphicsManager._scrollOffset + 320; + _borderPos.x = _vm->_graphicsManager->_scrollOffset + 320; else if (zoneIdx == 5 || zoneIdx == 11 || zoneIdx == 17 || zoneIdx == 23 || zoneIdx == 29) - _borderPos.x = _vm->_graphicsManager._scrollOffset + 374; + _borderPos.x = _vm->_graphicsManager->_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->_graphicsManager->_scrollOffset + 428; if (zoneIdx >= 1 && zoneIdx <= 29) _borderSpriteIndex = 0; @@ -2580,13 +2580,13 @@ void ObjectsManager::handleSpecialGames() { break; oldPalette = _vm->_globals->allocMemory(1000); - memcpy(oldPalette, _vm->_graphicsManager._palette, 769); + memcpy(oldPalette, _vm->_graphicsManager->_palette, 769); - _vm->_saveLoadManager.saveFile("TEMP1.SCR", _vm->_graphicsManager._vesaScreen, 307200); + _vm->_saveLoadManager.saveFile("TEMP1.SCR", _vm->_graphicsManager->_vesaScreen, 307200); - if (!_vm->_graphicsManager._lineNbr) - _vm->_graphicsManager._scrollOffset = 0; - _vm->_graphicsManager.NB_SCREEN(true); + if (!_vm->_graphicsManager->_lineNbr) + _vm->_graphicsManager->_scrollOffset = 0; + _vm->_graphicsManager->NB_SCREEN(true); _vm->_soundManager._specialSoundNum = 198; PERSO_ON = true; _vm->_animationManager->NO_SEQ = true; @@ -2594,22 +2594,22 @@ void ObjectsManager::handleSpecialGames() { _vm->_animationManager->playAnim("otage.ANM", 1, 24, 500); _vm->_animationManager->NO_SEQ = false; _vm->_soundManager._specialSoundNum = 0; - _vm->_graphicsManager.NB_SCREEN(false); + _vm->_graphicsManager->NB_SCREEN(false); - _vm->_saveLoadManager.load("TEMP1.SCR", _vm->_graphicsManager._vesaScreen); + _vm->_saveLoadManager.load("TEMP1.SCR", _vm->_graphicsManager->_vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP1.SCR"); PERSO_ON = false; - memcpy(_vm->_graphicsManager._palette, oldPalette, 769); - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); + memcpy(_vm->_graphicsManager->_palette, oldPalette, 769); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); _vm->_globals->freeMemory(oldPalette); - _vm->_graphicsManager.lockScreen(); - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager.unlockScreen(); - memcpy(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager._vesaScreen, 614399); + _vm->_graphicsManager->lockScreen(); + _vm->_graphicsManager->m_scroll16(_vm->_graphicsManager->_vesaScreen, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->unlockScreen(); + memcpy(_vm->_graphicsManager->_vesaBuffer, _vm->_graphicsManager->_vesaScreen, 614399); - _vm->_graphicsManager._scrollStatus = 0; - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->_scrollStatus = 0; + _vm->_graphicsManager->updateScreen(); break; case 20: _vm->_globals->_saveData->_data[svField132] = (getSpriteX(0) > 65 && getSpriteX(0) <= 124 && getSpriteY(0) > 372 && getSpriteY(0) <= 398) ? 1 : 0; @@ -2701,7 +2701,7 @@ void ObjectsManager::BOB_VIVANT(int idx) { int yp = READ_LE_INT16(_vm->_talkManager._characterAnim + startPos + 2); int spriteIndex = _vm->_talkManager._characterAnim[startPos + 8]; - _vm->_graphicsManager.fastDisplay(_vm->_talkManager._characterSprite, xp, yp, spriteIndex); + _vm->_graphicsManager->fastDisplay(_vm->_talkManager._characterSprite, xp, yp, spriteIndex); } void ObjectsManager::VBOB(byte *src, int idx, int xp, int yp, int frameIndex) { @@ -2987,7 +2987,7 @@ void ObjectsManager::OPTI_ONE(int idx, int animIdx, int destPosi, int animAction if (!animAction) stopBobAnimation(idx); else if (animAction == 4) { - _vm->_graphicsManager.fastDisplay(_bob[idx]._spriteData, + _vm->_graphicsManager->fastDisplay(_bob[idx]._spriteData, _bob[idx]._oldX, _bob[idx]._oldY, _bob[idx]._frameIndex); stopBobAnimation(idx); _vm->_eventsManager->refreshScreenAndEvents(); @@ -3203,13 +3203,13 @@ void ObjectsManager::sceneSpecialIni() { case 17: if (_vm->_globals->_prevScreenId == 20) { _vm->_globals->_disableInventFl = true; - _vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); + _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0); for (int i = 0; i <= 4; i++) _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager.fadeInLong(); + _vm->_graphicsManager->fadeInLong(); animateSprite(0); for (int i = 0; i <= 4; i++) _vm->_eventsManager->refreshScreenAndEvents(); @@ -3234,7 +3234,7 @@ void ObjectsManager::sceneSpecialIni() { VBOB_OFF(5); for (int i = 0; i <= 3; i++) _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager._noFadingFl = true; + _vm->_graphicsManager->_noFadingFl = true; _vm->_globals->_disableInventFl = false; } break; @@ -3244,13 +3244,13 @@ void ObjectsManager::sceneSpecialIni() { _vm->_eventsManager->_mouseSpriteId = 4; for (int i = 0; i <= 4; i++) _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager.fadeInLong(); + _vm->_graphicsManager->fadeInLong(); _vm->_globals->iRegul = 1; _vm->_globals->_disableInventFl = false; - _vm->_graphicsManager._noFadingFl = true; + _vm->_graphicsManager->_noFadingFl = true; _vm->_globals->_introSpeechOffFl = true; _vm->_talkManager.startAnimatedCharacterDialogue("MAGE1.pe2"); - _vm->_graphicsManager._noFadingFl = true; + _vm->_graphicsManager->_noFadingFl = true; _vm->_globals->_disableInventFl = false; } break; @@ -3632,10 +3632,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.FADE_LINUX = 2; + _vm->_graphicsManager->FADE_LINUX = 2; _vm->_animationManager->playAnim("CREVE2.ANM", 100, 24, 500); _vm->_globals->_exitId = 150; - _vm->_graphicsManager._noFadingFl = true; + _vm->_graphicsManager->_noFadingFl = true; hideBob(1); hideBob(2); hideBob(3); @@ -3664,7 +3664,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo _vm->_dialogsManager->_inventFl = false; _vm->_eventsManager->_gameKey = KEY_NONE; _vm->_dialogsManager->_removeInventFl = false; - _vm->_graphicsManager._scrollOffset = 0; + _vm->_graphicsManager->_scrollOffset = 0; _vm->_globals->_cityMapEnabledFl = false; _vm->_globals->iRegul = 1; _vm->_soundManager.playSound(soundNum); @@ -3672,17 +3672,17 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo _vm->_globals->_freezeCharacterFl = true; _vm->_globals->_exitId = 0; if (!backgroundFile.empty()) - _vm->_graphicsManager.loadImage(backgroundFile); + _vm->_graphicsManager->loadImage(backgroundFile); if (!linkFile.empty()) loadLinkFile(linkFile); if (!animFile.empty()) _vm->_animationManager->loadAnim(animFile); - _vm->_graphicsManager.displayAllBob(); + _vm->_graphicsManager->displayAllBob(); if (!s4.empty()) { if (initializeScreen) - _vm->_graphicsManager.initScreen(s4, 0, initializeScreen); + _vm->_graphicsManager->initScreen(s4, 0, initializeScreen); else - _vm->_graphicsManager.initScreen(s4, 2, initializeScreen); + _vm->_graphicsManager->initScreen(s4, 2, initializeScreen); } _vm->_eventsManager->mouseOn(); if (_vm->_globals->_screenId == 61) { @@ -3691,14 +3691,14 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo _vm->_linesManager._route = (RouteItem *)g_PTRNUL; computeAndSetSpriteSize(); } - _vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); + _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0); _vm->_eventsManager->changeMouseCursor(4); for (int i = 0; i <= 4; i++) _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager.fadeInLong(); + _vm->_graphicsManager->fadeInLong(); if (_vm->_globals->_screenId == 61) { _vm->_animationManager->playSequence("OUVRE.SEQ", 10, 4, 10); stopBobAnimation(3); @@ -3735,9 +3735,9 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo if (_vm->shouldQuit()) return; - _vm->_graphicsManager.fadeOutLong(); + _vm->_graphicsManager->fadeOutLong(); if (!animFile.empty()) - _vm->_graphicsManager.endDisplayBob(); + _vm->_graphicsManager->endDisplayBob(); if (_vm->_globals->_screenId == 61) removeSprite(0); clearScreen(); @@ -3752,35 +3752,35 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm _vm->_dialogsManager->_inventFl = false; _vm->_eventsManager->_gameKey = KEY_NONE; _verb = 4; - _vm->_graphicsManager._scrollOffset = 0; + _vm->_graphicsManager->_scrollOffset = 0; _vm->_dialogsManager->_removeInventFl = false; _vm->_globals->_cityMapEnabledFl = false; - _vm->_graphicsManager._noFadingFl = false; + _vm->_graphicsManager->_noFadingFl = false; _vm->_globals->_freezeCharacterFl = false; _vm->_globals->_exitId = 0; _vm->_globals->_checkDistanceFl = true; _vm->_soundManager.playSound(soundNum); _vm->_globals->iRegul = 1; if (!backgroundFile.empty()) - _vm->_graphicsManager.loadImage(backgroundFile); + _vm->_graphicsManager->loadImage(backgroundFile); if (!linkFile.empty()) loadLinkFile(linkFile); if (!animFile.empty()) { _vm->_animationManager->loadAnim(animFile); - _vm->_graphicsManager.displayAllBob(); + _vm->_graphicsManager->displayAllBob(); } if (!s4.empty()) { if (initializeScreen) - _vm->_graphicsManager.initScreen(s4, 0, initializeScreen); + _vm->_graphicsManager->initScreen(s4, 0, initializeScreen); else - _vm->_graphicsManager.initScreen(s4, 2, initializeScreen); + _vm->_graphicsManager->initScreen(s4, 2, initializeScreen); } _vm->_eventsManager->mouseOn(); _vm->_eventsManager->_mouseCursorId = 4; - _vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); + _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0); if (_vm->_globals->_characterType) { if (!_vm->_globals->_saveData->_data[svAlternateSpriteFl] && !_vm->_globals->_saveData->_data[svField356]) { _vm->_globals->PERSO = _vm->_fileManager->loadFile("PERSO.SPR"); @@ -3809,8 +3809,8 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm break; } _vm->_eventsManager->setMouseXY(_characterPos); - if (_vm->_graphicsManager._largeScreenFl) - _vm->_graphicsManager._scrollPosX = (int16)getSpriteX(0) - 320; + if (_vm->_graphicsManager->_largeScreenFl) + _vm->_graphicsManager->_scrollPosX = (int16)getSpriteX(0) - 320; computeAndSetSpriteSize(); animateSprite(0); _vm->_globals->enableHiding(); @@ -3827,9 +3827,9 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm _vm->_eventsManager->refreshScreenAndEvents(); _vm->_globals->iRegul = 1; - if (!_vm->_graphicsManager._noFadingFl) - _vm->_graphicsManager.fadeInLong(); - _vm->_graphicsManager._noFadingFl = false; + if (!_vm->_graphicsManager->_noFadingFl) + _vm->_graphicsManager->fadeInLong(); + _vm->_graphicsManager->_noFadingFl = false; _vm->_eventsManager->changeMouseCursor(4); int xCheck = 0; @@ -3875,16 +3875,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->_graphicsManager->_noFadingFl) + _vm->_graphicsManager->fadeOutLong(); + _vm->_graphicsManager->_noFadingFl = false; removeSprite(0); if (_twoCharactersFl) { removeSprite(1); _twoCharactersFl = false; } if (!animFile.empty()) - _vm->_graphicsManager.endDisplayBob(); + _vm->_graphicsManager->endDisplayBob(); clearScreen(); } else { _helicopterFl = false; diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp index 35b41c7716..8563c53085 100644 --- a/engines/hopkins/saveload.cpp +++ b/engines/hopkins/saveload.cpp @@ -228,13 +228,13 @@ 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->_graphicsManager->zoomOut(SCREEN_WIDTH, REDUCE_AMOUNT); + int h = _vm->_graphicsManager->zoomOut(SCREEN_HEIGHT - 40, REDUCE_AMOUNT); Graphics::Surface thumb8; thumb8.create(w, h, Graphics::PixelFormat::createFormatCLUT8()); - _vm->_graphicsManager.reduceScreenPart(_vm->_graphicsManager._vesaBuffer, (byte *)thumb8.pixels, + _vm->_graphicsManager->reduceScreenPart(_vm->_graphicsManager->_vesaBuffer, (byte *)thumb8.pixels, _vm->_eventsManager->_startPos.x, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 40, 80); // Convert the 8-bit pixel to 16 bit surface @@ -249,7 +249,7 @@ void SaveLoadManager::createThumbnail(Graphics::Surface *s) { uint16 *lineDestP = destP; for (int xp = 0; xp < w; ++xp) - *lineDestP++ = *(uint16 *)&_vm->_graphicsManager.PAL_PIXELS[*lineSrcP++ * 2]; + *lineDestP++ = *(uint16 *)&_vm->_graphicsManager->PAL_PIXELS[*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.PAL_PIXELS[palIndex * 2]); + uint16 p = READ_LE_UINT16(&_vm->_graphicsManager->PAL_PIXELS[palIndex * 2]); pixelFormat16.colorToRGB(p, paletteR[palIndex], paletteG[palIndex], paletteB[palIndex]); } diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index 6de67dfbda..343b0fde6c 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -183,7 +183,7 @@ int ScriptManager::handleOpcode(byte *dataP) { int vbobPosX = READ_LE_INT16(dataP + 8); int vbobPosY = READ_LE_INT16(dataP + 10); if (vbobIdx == 52) { - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, vbobPosX, READ_LE_INT16(dataP + 10), vbobFrameIndex); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, vbobPosX, READ_LE_INT16(dataP + 10), vbobFrameIndex); } else if (vbobIdx == 51) { _vm->_objectsManager.BOB_VIVANT(vbobFrameIndex); } else if (vbobIdx != 50) { @@ -546,25 +546,25 @@ int ScriptManager::handleOpcode(byte *dataP) { case 13: _vm->_eventsManager->_mouseButton = _vm->_eventsManager->_curMouseButton; _vm->_globals->_disableInventFl = true; - _vm->_graphicsManager.fadeOutLong(); + _vm->_graphicsManager->fadeOutLong(); _vm->_globals->disableHiding(); _vm->_objectsManager.removeSprite(0); _vm->_fontManager->hideText(5); _vm->_fontManager->hideText(9); - _vm->_graphicsManager.endDisplayBob(); + _vm->_graphicsManager->endDisplayBob(); _vm->_objectsManager.clearScreen(); if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo()) { - _vm->_graphicsManager.fadeOutLong(); + _vm->_graphicsManager->fadeOutLong(); } else { _vm->_soundManager.playSoundFile("SOUND17.WAV"); - _vm->_graphicsManager.FADE_LINUX = 2; + _vm->_graphicsManager->FADE_LINUX = 2; _vm->_animationManager->playSequence2("HELICO.SEQ", 10, 4, 10); } _vm->_animationManager->loadAnim("otage"); - _vm->_graphicsManager.loadImage("IM05"); - _vm->_graphicsManager.displayAllBob(); + _vm->_graphicsManager->loadImage("IM05"); + _vm->_graphicsManager->displayAllBob(); for (int i = 0; i <= 4; i++) { if (_vm->shouldQuit()) @@ -574,27 +574,27 @@ int ScriptManager::handleOpcode(byte *dataP) { } _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager.fadeInDefaultLength(_vm->_graphicsManager._vesaBuffer); + _vm->_graphicsManager->fadeInDefaultLength(_vm->_graphicsManager->_vesaBuffer); do { if (_vm->shouldQuit()) return -1; // Exiting game _vm->_eventsManager->refreshScreenAndEvents(); } while (_vm->_objectsManager.getBobAnimDataIdx(3) != 100); - _vm->_graphicsManager.fadeOutDefaultLength(_vm->_graphicsManager._vesaBuffer); - _vm->_graphicsManager.endDisplayBob(); + _vm->_graphicsManager->fadeOutDefaultLength(_vm->_graphicsManager->_vesaBuffer); + _vm->_graphicsManager->endDisplayBob(); // If uncensored, rip the throat of the hostage if (!_vm->_globals->_censorshipFl) { _vm->_soundManager._specialSoundNum = 16; - _vm->_graphicsManager.FADE_LINUX = 2; + _vm->_graphicsManager->FADE_LINUX = 2; _vm->_animationManager->playAnim("EGORGE.ANM", 50, 28, 500); _vm->_soundManager._specialSoundNum = 0; } _vm->_animationManager->loadAnim("ASCEN"); _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager.loadImage("ASCEN"); - _vm->_graphicsManager.displayAllBob(); + _vm->_graphicsManager->loadImage("ASCEN"); + _vm->_graphicsManager->displayAllBob(); for (int i = 0; i <= 4; i++) { if (_vm->shouldQuit()) @@ -604,21 +604,21 @@ int ScriptManager::handleOpcode(byte *dataP) { } _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager.fadeInDefaultLength(_vm->_graphicsManager._vesaBuffer); + _vm->_graphicsManager->fadeInDefaultLength(_vm->_graphicsManager->_vesaBuffer); _vm->_objectsManager.SCI_OPTI_ONE(1, 0, 17, 3); - _vm->_graphicsManager.fadeOutDefaultLength(_vm->_graphicsManager._vesaBuffer); - _vm->_graphicsManager.endDisplayBob(); + _vm->_graphicsManager->fadeOutDefaultLength(_vm->_graphicsManager->_vesaBuffer); + _vm->_graphicsManager->endDisplayBob(); if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo()) _vm->_soundManager.playSoundFile("SOUND17.WAV"); _vm->_soundManager._specialSoundNum = 14; - _vm->_graphicsManager.FADE_LINUX = 2; + _vm->_graphicsManager->FADE_LINUX = 2; _vm->_animationManager->playSequence2("ASSOM.SEQ", 10, 4, 500); _vm->_soundManager._specialSoundNum = 0; if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo()) - _vm->_graphicsManager.fadeOutLong(); + _vm->_graphicsManager->fadeOutLong(); _vm->_globals->_disableInventFl = false; _vm->_objectsManager._helicopterFl = true; @@ -707,9 +707,9 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 37: - _vm->_graphicsManager.FADE_LINUX = 2; + _vm->_graphicsManager->FADE_LINUX = 2; _vm->_animationManager->playSequence2("corde.SEQ", 32, 32, 100); - _vm->_graphicsManager._noFadingFl = true; + _vm->_graphicsManager->_noFadingFl = true; break; case 38: @@ -719,12 +719,12 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_soundManager._specialSoundNum = 17; _vm->_animationManager->playSequence("grenade.SEQ", 1, 32, 100); _vm->_soundManager._specialSoundNum = 0; - _vm->_graphicsManager.FADE_LINUX = 2; + _vm->_graphicsManager->FADE_LINUX = 2; _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->_graphicsManager->_noFadingFl = true; break; case 40: @@ -802,14 +802,14 @@ int ScriptManager::handleOpcode(byte *dataP) { playFl = false; break; case 12: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 249, 1); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 249, 1); break; case 23: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 249, 2); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 249, 2); playFl = false; break; case 34: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 249, 3); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 249, 3); playFl = false; break; } @@ -892,17 +892,17 @@ int ScriptManager::handleOpcode(byte *dataP) { break; case 51: { - _vm->_graphicsManager.fadeOutLong(); + _vm->_graphicsManager->fadeOutLong(); _vm->_globals->disableHiding(); _vm->_objectsManager.removeSprite(0); _vm->_fontManager->hideText(5); _vm->_fontManager->hideText(9); - _vm->_graphicsManager.endDisplayBob(); - _vm->_graphicsManager.loadImage("IM20f"); + _vm->_graphicsManager->endDisplayBob(); + _vm->_graphicsManager->loadImage("IM20f"); _vm->_animationManager->loadAnim("ANIM20f"); - _vm->_graphicsManager.displayAllBob(); + _vm->_graphicsManager->displayAllBob(); _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager.fadeInLong(); + _vm->_graphicsManager->fadeInLong(); _vm->_soundManager.loadWav("SOUND46.WAV", 1); bool playFl = false; for (;;) { @@ -918,8 +918,8 @@ int ScriptManager::handleOpcode(byte *dataP) { break; } _vm->_objectsManager.stopBobAnimation(2); - _vm->_graphicsManager.fadeOutLong(); - _vm->_graphicsManager._noFadingFl = true; + _vm->_graphicsManager->fadeOutLong(); + _vm->_graphicsManager->_noFadingFl = true; _vm->_globals->_exitId = 20; break; } @@ -1149,7 +1149,7 @@ int ScriptManager::handleOpcode(byte *dataP) { if (_vm->_objectsManager.getBobAnimDataIdx(8) == 32) break; } - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 201, 14, 1); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 201, 14, 1); _vm->_objectsManager.animateSprite(0); _vm->_objectsManager.stopBobAnimation(11); _vm->_objectsManager.stopBobAnimation(8); @@ -1250,7 +1250,7 @@ int ScriptManager::handleOpcode(byte *dataP) { } _vm->_objectsManager.stopBobAnimation(1); _vm->_objectsManager.stopBobAnimation(2); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 160, 6); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 160, 6); _vm->_soundManager.removeSample(1); } if (_vm->_globals->_saveData->_data[svField183] == 2) { @@ -1287,7 +1287,7 @@ int ScriptManager::handleOpcode(byte *dataP) { } _vm->_objectsManager.stopBobAnimation(1); _vm->_objectsManager.stopBobAnimation(3); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 161, 8); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 161, 8); _vm->_soundManager.removeSample(1); } break; @@ -1296,12 +1296,12 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_soundManager.playSoundFile("SOUND52.WAV"); if (!_vm->_globals->_saveData->_data[svField186]) { _vm->_animationManager->playSequence("CIB5A.SEQ", 1, 12, 1); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0); } if (_vm->_globals->_saveData->_data[svField186] == 1) { _vm->_animationManager->playSequence("CIB5C.SEQ", 1, 12, 1); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 329, 87, 2); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 329, 87, 2); } break; @@ -1309,12 +1309,12 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_soundManager.playSoundFile("SOUND52.WAV"); if (!_vm->_globals->_saveData->_data[svField186]) { _vm->_animationManager->playSequence("CIB5B.SEQ", 1, 12, 1); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5); } if (_vm->_globals->_saveData->_data[svField186] == 1) { _vm->_animationManager->playSequence("CIB5D.SEQ", 1, 12, 1); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 160, 6); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 160, 6); } break; @@ -1322,12 +1322,12 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_soundManager.playSoundFile("SOUND52.WAV"); if (!_vm->_globals->_saveData->_data[svField184]) { _vm->_animationManager->playSequence("CIB6A.SEQ", 1, 12, 1); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0); } if (_vm->_globals->_saveData->_data[svField184] == 1) { _vm->_animationManager->playSequence("CIB6C.SEQ", 1, 12, 1); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 293, 139, 3); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 0); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 293, 139, 3); } break; @@ -1335,12 +1335,12 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_soundManager.playSoundFile("SOUND52.WAV"); if (!_vm->_globals->_saveData->_data[svField184]) { _vm->_animationManager->playSequence("CIB6B.SEQ", 1, 12, 1); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5); } if (_vm->_globals->_saveData->_data[svField184] == 1) { _vm->_animationManager->playSequence("CIB6D.SEQ", 1, 12, 1); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 161, 8); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 155, 29, 5); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 283, 161, 8); } break; @@ -1374,7 +1374,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_eventsManager->refreshScreenAndEvents(); } while (_vm->_objectsManager.getBobAnimDataIdx(12) != 117); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 830, 122, 0); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 830, 122, 0); _vm->_objectsManager.stopBobAnimation(12); _vm->_objectsManager.stopBobAnimation(10); _vm->_objectsManager.setBobAnimation(11); @@ -1803,7 +1803,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_eventsManager->refreshScreenAndEvents(); if (_vm->_objectsManager.getBobAnimDataIdx(4) == 18) - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 18, 334, 0, false); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 18, 334, 0, false); } while (_vm->_objectsManager.getBobAnimDataIdx(4) != 26); _vm->_objectsManager.stopBobAnimation(4); _vm->_objectsManager.animateSprite(0); @@ -1940,7 +1940,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_soundManager._specialSoundNum = 210; _vm->_animationManager->playSequence2("SECRET1.SEQ", 1, 12, 1); _vm->_soundManager._specialSoundNum = 0; - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 192, 152, 0); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 192, 152, 0); _vm->_objectsManager.setBobAnimation(9); _vm->_objectsManager.OBSSEUL = true; _vm->_objectsManager.loadLinkFile("IM73a"); @@ -1949,10 +1949,10 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_animationManager->NO_SEQ = false; _vm->_globals->setHidingUseCount(0); _vm->_globals->setHidingUseCount(1); - _vm->_graphicsManager.SETCOLOR4(252, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR4(253, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR4(254, 0, 0, 0); + _vm->_graphicsManager->SETCOLOR4(252, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR4(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR4(254, 0, 0, 0); break; case 211: @@ -1963,8 +1963,8 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_animationManager->playSequence("SECRET2.SEQ", 1, 12, 100); _vm->_soundManager._specialSoundNum = 0; _vm->_animationManager->NO_SEQ = false; - _vm->_graphicsManager._noFadingFl = true; - _vm->_graphicsManager.fadeOutLong(); + _vm->_graphicsManager->_noFadingFl = true; + _vm->_graphicsManager->fadeOutLong(); for (int i = 1; i <= 39; i++) { if (_vm->shouldQuit()) @@ -1973,10 +1973,10 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_eventsManager->refreshScreenAndEvents(); } - _vm->_graphicsManager.SETCOLOR4(252, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR4(253, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR4(254, 0, 0, 0); + _vm->_graphicsManager->SETCOLOR4(252, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR4(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR4(254, 0, 0, 0); break; case 215: @@ -1995,7 +1995,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_soundManager._specialSoundNum = 229; _vm->_animationManager->playSequence("MUR.SEQ", 1, 12, 1); _vm->_soundManager._specialSoundNum = 0; - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 340, 157, 2); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 340, 157, 2); break; case 230: { @@ -2035,7 +2035,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager.setSpriteX(0, 476); _vm->_objectsManager.setSpriteY(0, 278); _vm->_objectsManager.animateSprite(0); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 337, 154, 3); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 337, 154, 3); _vm->_objectsManager.OBSSEUL = true; _vm->_objectsManager.loadLinkFile("IM93c"); _vm->_objectsManager.OBSSEUL = false; @@ -2092,9 +2092,9 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals->_introSpeechOffFl = true; _vm->_talkManager.startAnimatedCharacterDialogue("HRADIO.PE2"); _vm->_globals->_introSpeechOffFl = false; - _vm->_graphicsManager.fadeOutLong(); + _vm->_graphicsManager->fadeOutLong(); _vm->_objectsManager.stopBobAnimation(13); - _vm->_graphicsManager._noFadingFl = true; + _vm->_graphicsManager->_noFadingFl = true; _vm->_globals->_exitId = 94; break; } @@ -2111,11 +2111,11 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_soundManager.playSoundFile("SOUND83.WAV"); _vm->_objectsManager.OPTI_ONE(vbobFrameIndex, 26, 50, 0); if (_vm->_globals->_saveData->_data[svField341] == 1) - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 27, 117, 0); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 27, 117, 0); if (_vm->_globals->_saveData->_data[svField341] == 2) - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 145, 166, 2); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 145, 166, 2); if (_vm->_globals->_saveData->_data[svField341] == 3) - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 296, 212, 4); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 296, 212, 4); if (_vm->_globals->_saveData->_data[svField341] == 1) _vm->_globals->_saveData->_data[svField338] = 0; if (_vm->_globals->_saveData->_data[svField341] == 2) @@ -2125,7 +2125,7 @@ int ScriptManager::handleOpcode(byte *dataP) { } _vm->_soundManager.playSoundFile("SOUND83.WAV"); _vm->_objectsManager.OPTI_ONE(6, 0, 23, 0); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 27, 117, 1); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 27, 117, 1); break; } @@ -2148,15 +2148,15 @@ int ScriptManager::handleOpcode(byte *dataP) { switch (_vm->_globals->_saveData->_data[svField341]) { case 1: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 27, 117, 0); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 27, 117, 0); _vm->_globals->_saveData->_data[svField338] = 0; break; case 2: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 145, 166, 2); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 145, 166, 2); _vm->_globals->_saveData->_data[svField339] = 0; break; case 3: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 296, 212, 4); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 296, 212, 4); _vm->_globals->_saveData->_data[svField340] = 0; break; } @@ -2164,7 +2164,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_soundManager.playSoundFile("SOUND83.WAV"); _vm->_objectsManager.OPTI_ONE(5, 0, 23, 0); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 145, 166, 3); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 145, 166, 3); break; } @@ -2186,22 +2186,22 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager.OPTI_ONE(vbobFrameIndex, 26, 50, 0); switch (_vm->_globals->_saveData->_data[svField341]) { case 1: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 27, 117, 0); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 27, 117, 0); _vm->_globals->_saveData->_data[svField338] = 0; break; case 2: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 145, 166, 2); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 145, 166, 2); _vm->_globals->_saveData->_data[svField339] = 0; break; case 3: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 296, 212, 4); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 296, 212, 4); _vm->_globals->_saveData->_data[svField340] = 0; break; } } _vm->_soundManager.playSoundFile("SOUND83.WAV"); _vm->_objectsManager.OPTI_ONE(4, 0, 23, 0); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 296, 212, 5); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 296, 212, 5); break; } @@ -2284,7 +2284,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_globals->_saveData->_data[svField356] = 0; _vm->_globals->_saveData->_data[svField355] = 1; _vm->_objectsManager._twoCharactersFl = true; - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 373, 191, 3); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 373, 191, 3); _vm->_objectsManager.addStaticSprite(_vm->_objectsManager._headSprites, samantha->_pos, 1, 3, samantha->_zoomFactor, false, 20, 127); _vm->_objectsManager.animateSprite(1); break; @@ -2306,7 +2306,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager.OPTI_ONE(5, 0, 6, 0); _vm->_linesManager.ZONEP[4]._destX = 276; _vm->_objectsManager.enableVerb(4, 19); - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 285, 379, 0); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 285, 379, 0); _vm->_globals->_saveData->_data[svField399] = 1; break; @@ -2314,83 +2314,83 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_objectsManager.removeSprite(0); _vm->_objectsManager.OPTI_ONE(6, 0, 15, 0); _vm->_objectsManager.PERSO_ON = true; - _vm->_graphicsManager.NB_SCREEN(true); + _vm->_graphicsManager->NB_SCREEN(true); _vm->_animationManager->NO_SEQ = true; _vm->_animationManager->playSequence2("TUNNEL.SEQ", 1, 18, 20); _vm->_animationManager->NO_SEQ = false; - _vm->_graphicsManager._noFadingFl = true; - _vm->_graphicsManager.fadeOutLong(); + _vm->_graphicsManager->_noFadingFl = true; + _vm->_graphicsManager->fadeOutLong(); _vm->_objectsManager.PERSO_ON = false; _vm->_globals->_exitId = 100; break; case 600: if (!_vm->getIsDemo()) { - _vm->_graphicsManager.FADE_LINUX = 2; - _vm->_graphicsManager._fadeDefaultSpeed = 1; + _vm->_graphicsManager->FADE_LINUX = 2; + _vm->_graphicsManager->_fadeDefaultSpeed = 1; _vm->_animationManager->playAnim("BOMBE1A.ANM", 100, 18, 100); } - _vm->_graphicsManager.loadImage("BOMBEB"); - _vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100); - _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); - _vm->_graphicsManager.initScreen("BOMBE", 2, true); - _vm->_graphicsManager.fadeInShort(); + _vm->_graphicsManager->loadImage("BOMBEB"); + _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0); + _vm->_graphicsManager->initScreen("BOMBE", 2, true); + _vm->_graphicsManager->fadeInShort(); break; case 601: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(2, 0, 16, 4); break; case 602: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(4, 0, 16, 4); break; case 603: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(3, 0, 16, 4); _vm->_soundManager._specialSoundNum = 199; - _vm->_graphicsManager.FADE_LINUX = 2; + _vm->_graphicsManager->FADE_LINUX = 2; _vm->_animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); _vm->_soundManager._specialSoundNum = 0; - memset(_vm->_graphicsManager._vesaBuffer, 0, 614400); - _vm->_graphicsManager._noFadingFl = true; + memset(_vm->_graphicsManager->_vesaBuffer, 0, 614400); + _vm->_graphicsManager->_noFadingFl = true; _vm->_globals->_exitId = 151; break; case 604: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(1, 0, 16, 4); _vm->_soundManager._specialSoundNum = 199; _vm->_animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); _vm->_soundManager._specialSoundNum = 0; - _vm->_graphicsManager._noFadingFl = true; - memset(_vm->_graphicsManager._vesaBuffer, 0, 614400); + _vm->_graphicsManager->_noFadingFl = true; + memset(_vm->_graphicsManager->_vesaBuffer, 0, 614400); _vm->_globals->_exitId = 151; break; case 605: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(5, 0, 16, 4); - _vm->_graphicsManager.fadeOutShort(); + _vm->_graphicsManager->fadeOutShort(); _vm->_soundManager._specialSoundNum = 199; - _vm->_graphicsManager.FADE_LINUX = 2; + _vm->_graphicsManager->FADE_LINUX = 2; _vm->_animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); _vm->_soundManager._specialSoundNum = 0; - _vm->_graphicsManager._noFadingFl = true; - memset(_vm->_graphicsManager._vesaBuffer, 0, 614400); + _vm->_graphicsManager->_noFadingFl = true; + memset(_vm->_graphicsManager->_vesaBuffer, 0, 614400); _vm->_globals->_exitId = 151; break; case 606: - _vm->_graphicsManager.fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); + _vm->_graphicsManager->fastDisplay(_vm->_globals->SPRITE_ECRAN, 513, 163, 7, false); _vm->_objectsManager.OPTI_ONE(6, 0, 16, 4); if ((_vm->getPlatform() != Common::kPlatformWindows) || !_vm->getIsDemo()) { _vm->_animationManager->playAnim("BOMBE3A.ANM", 50, 14, 500); - memset(_vm->_graphicsManager._vesaBuffer, 0, 614400); + memset(_vm->_graphicsManager->_vesaBuffer, 0, 614400); } _vm->_globals->_exitId = 6; break; @@ -2398,10 +2398,10 @@ int ScriptManager::handleOpcode(byte *dataP) { case 607: // Display bomb plan if (!_vm->getIsDemo()) { - memcpy(_vm->_graphicsManager._oldPalette, _vm->_graphicsManager._palette, 769); + memcpy(_vm->_graphicsManager->_oldPalette, _vm->_graphicsManager->_palette, 769); _vm->_animationManager->playAnim2("PLAN.ANM", 50, 10, 800); } - _vm->_graphicsManager.resetDirtyRects(); + _vm->_graphicsManager->resetDirtyRects(); break; case 608: diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 1256261350..a5353527e6 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -55,7 +55,7 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) _vm->_fontManager->hideText(5); _vm->_fontManager->hideText(9); _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager._scrollStatus = 1; + _vm->_graphicsManager->_scrollStatus = 1; bool oldDisableInventFl = _vm->_globals->_disableInventFl; _vm->_globals->_disableInventFl = true; _characterBuffer = _vm->_fileManager->searchCat(filename, RES_PER); @@ -86,14 +86,14 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) _characterSprite = _vm->_objectsManager.loadSprite("RES_SAN.RES"); } - if (_vm->_graphicsManager._lineNbr == SCREEN_WIDTH) - _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager._vesaScreen, 307200); - else if (_vm->_graphicsManager._lineNbr == (SCREEN_WIDTH * 2)) - _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager._vesaScreen, 614400); + if (_vm->_graphicsManager->_lineNbr == SCREEN_WIDTH) + _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 307200); + else if (_vm->_graphicsManager->_lineNbr == (SCREEN_WIDTH * 2)) + _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 614400); - if (!_vm->_graphicsManager._lineNbr) - _vm->_graphicsManager._scrollOffset = 0; - _vm->_graphicsManager.NB_SCREEN(true); + if (!_vm->_graphicsManager->_lineNbr) + _vm->_graphicsManager->_scrollOffset = 0; + _vm->_graphicsManager->NB_SCREEN(true); _vm->_objectsManager.PERSO_ON = true; searchCharacterPalette(_paletteBufferIdx, false); startCharacterAnim0(_paletteBufferIdx, false); @@ -127,31 +127,31 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) _vm->_globals->_introSpeechOffFl = false; _characterBuffer = _vm->_globals->freeMemory(_characterBuffer); _characterSprite = _vm->_globals->freeMemory(_characterSprite); - _vm->_graphicsManager.NB_SCREEN(false); + _vm->_graphicsManager->NB_SCREEN(false); - _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen); + _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); _vm->_objectsManager.PERSO_ON = false; _vm->_eventsManager->_mouseCursorId = oldMouseCursorId; _vm->_eventsManager->changeMouseCursor(oldMouseCursorId); - _vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); if (_vm->getIsDemo() == false) - _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); - - _vm->_graphicsManager.initColorTable(145, 150, _vm->_graphicsManager._palette); - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); - _vm->_graphicsManager.lockScreen(); - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager.unlockScreen(); - memcpy(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager._vesaScreen, 614399); + _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0); + + _vm->_graphicsManager->initColorTable(145, 150, _vm->_graphicsManager->_palette); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); + _vm->_graphicsManager->lockScreen(); + _vm->_graphicsManager->m_scroll16(_vm->_graphicsManager->_vesaScreen, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->unlockScreen(); + memcpy(_vm->_graphicsManager->_vesaBuffer, _vm->_graphicsManager->_vesaScreen, 614399); _vm->_globals->_disableInventFl = oldDisableInventFl; - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->updateScreen(); for (int i = 0; i <= 4; i++) _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager._scrollStatus = 0; + _vm->_graphicsManager->_scrollStatus = 0; } void TalkManager::startStaticCharacterDialogue(const Common::String &filename) { @@ -218,8 +218,8 @@ void TalkManager::startStaticCharacterDialogue(const Common::String &filename) { _vm->_eventsManager->_mouseCursorId = oldMouseCursorId; _vm->_eventsManager->changeMouseCursor(oldMouseCursorId); - _vm->_graphicsManager.initColorTable(145, 150, _vm->_graphicsManager._palette); - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); + _vm->_graphicsManager->initColorTable(145, 150, _vm->_graphicsManager->_palette); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); // TODO: The original re-enables the mouse cursor here _vm->_globals->_disableInventFl = oldDisableInventFl; } @@ -467,8 +467,8 @@ void TalkManager::searchCharacterPalette(int startIdx, bool dark) { else _characterPalette[761] = 255; - _vm->_graphicsManager.setPaletteVGA256(_characterPalette); - _vm->_graphicsManager.initColorTable(145, 150, _characterPalette); + _vm->_graphicsManager->setPaletteVGA256(_characterPalette); + _vm->_graphicsManager->initColorTable(145, 150, _characterPalette); } void TalkManager::dialogWait() { @@ -642,7 +642,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->_graphicsManager->fastDisplay(_characterSprite, _vm->_eventsManager->_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); @@ -967,7 +967,7 @@ void TalkManager::animateObject(const Common::String &filename) { _vm->_fontManager->hideText(5); _vm->_fontManager->hideText(9); _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager._scrollStatus = 1; + _vm->_graphicsManager->_scrollStatus = 1; _vm->_linesManager.clearAllZones(); _vm->_linesManager.resetLines(); _vm->_globals->resetHidingItems(); @@ -1000,16 +1000,16 @@ void TalkManager::animateObject(const Common::String &filename) { else _characterSprite = _vm->_objectsManager.loadSprite("RES_SAN.RES"); - if (_vm->_graphicsManager._lineNbr == SCREEN_WIDTH) - _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager._vesaScreen, 307200); - else if (_vm->_graphicsManager._lineNbr == (SCREEN_WIDTH * 2)) - _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager._vesaScreen, 614400); + if (_vm->_graphicsManager->_lineNbr == SCREEN_WIDTH) + _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 307200); + else if (_vm->_graphicsManager->_lineNbr == (SCREEN_WIDTH * 2)) + _vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 614400); - if (!_vm->_graphicsManager._lineNbr) - _vm->_graphicsManager._scrollOffset = 0; - _vm->_graphicsManager.NB_SCREEN(true); + if (!_vm->_graphicsManager->_lineNbr) + _vm->_graphicsManager->_scrollOffset = 0; + _vm->_graphicsManager->NB_SCREEN(true); _paletteBufferIdx = 20 * READ_LE_INT16((uint16 *)_characterBuffer + 42) + 110; - _vm->_graphicsManager.NB_SCREEN(true); + _vm->_graphicsManager->NB_SCREEN(true); _vm->_objectsManager.PERSO_ON = true; searchCharacterPalette(_paletteBufferIdx, true); startCharacterAnim0(_paletteBufferIdx, false); @@ -1023,7 +1023,7 @@ void TalkManager::animateObject(const Common::String &filename) { initCharacterAnim(); VISU_PARLE(); dialogWait(); - _vm->_graphicsManager.initScreen(screenFilename, 2, true); + _vm->_graphicsManager->initScreen(screenFilename, 2, true); _vm->_globals->_freezeCharacterFl = true; _vm->_objectsManager._forceZoneFl = true; _vm->_objectsManager._zoneNum = -1; @@ -1046,7 +1046,7 @@ void TalkManager::animateObject(const Common::String &filename) { _vm->_globals->_introSpeechOffFl = false; _characterBuffer = _vm->_globals->freeMemory(_characterBuffer); _characterSprite = _vm->_globals->freeMemory(_characterSprite); - _vm->_graphicsManager.NB_SCREEN(false); + _vm->_graphicsManager->NB_SCREEN(false); _vm->_linesManager.clearAllZones(); _vm->_linesManager.resetLines(); _vm->_globals->resetHidingItems(); @@ -1057,35 +1057,35 @@ void TalkManager::animateObject(const Common::String &filename) { _vm->_globals->_answerBuffer = oldAnswerBufferPtr; _vm->_objectsManager._disableFl = true; _vm->_objectsManager.loadLinkFile(curScreenFilename); - _vm->_graphicsManager.initScreen(curScreenFilename, 2, true); + _vm->_graphicsManager->initScreen(curScreenFilename, 2, true); _vm->_objectsManager._disableFl = false; _vm->_globals->_freezeCharacterFl = false; if (_vm->_globals->_exitId == 101) _vm->_globals->_exitId = 0; - _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen); + _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); _vm->_objectsManager.PERSO_ON = false; _vm->_eventsManager->_mouseCursorId = 4; _vm->_eventsManager->changeMouseCursor(4); - _vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100); + _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); if (!_vm->getIsDemo()) - _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); - - _vm->_graphicsManager.initColorTable(145, 150, _vm->_graphicsManager._palette); - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); - _vm->_graphicsManager.lockScreen(); - _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsManager.unlockScreen(); - _vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette); - memcpy(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager._vesaScreen, 614399); + _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0); + + _vm->_graphicsManager->initColorTable(145, 150, _vm->_graphicsManager->_palette); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); + _vm->_graphicsManager->lockScreen(); + _vm->_graphicsManager->m_scroll16(_vm->_graphicsManager->_vesaScreen, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + _vm->_graphicsManager->unlockScreen(); + _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); + memcpy(_vm->_graphicsManager->_vesaBuffer, _vm->_graphicsManager->_vesaScreen, 614399); _vm->_globals->_disableInventFl = false; - _vm->_graphicsManager.updateScreen(); + _vm->_graphicsManager->updateScreen(); for (int i = 0; i <= 4; i++) _vm->_eventsManager->refreshScreenAndEvents(); - _vm->_graphicsManager._scrollStatus = 0; + _vm->_graphicsManager->_scrollStatus = 0; } } // End of namespace Hopkins |