diff options
author | Strangerke | 2013-03-30 14:20:18 +0100 |
---|---|---|
committer | Strangerke | 2013-03-30 14:20:18 +0100 |
commit | e848ed7bace4af925b399dca0b3ea3cf4b09a0a4 (patch) | |
tree | 174891bd9a12305b37c0217aa7788da71866cdc5 /engines | |
parent | 04259f7be4113f28c8b541d3100dbd81488c02fa (diff) | |
download | scummvm-rg350-e848ed7bace4af925b399dca0b3ea3cf4b09a0a4.tar.gz scummvm-rg350-e848ed7bace4af925b399dca0b3ea3cf4b09a0a4.tar.bz2 scummvm-rg350-e848ed7bace4af925b399dca0b3ea3cf4b09a0a4.zip |
HOPKINS: Rename display buffers
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/anim.cpp | 24 | ||||
-rw-r--r-- | engines/hopkins/computer.cpp | 8 | ||||
-rw-r--r-- | engines/hopkins/dialogs.cpp | 64 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/font.cpp | 22 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 70 | ||||
-rw-r--r-- | engines/hopkins/graphics.h | 4 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 36 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 74 | ||||
-rw-r--r-- | engines/hopkins/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 16 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 20 |
12 files changed, 171 insertions, 171 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index e907b30231..75f6c26215 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -63,7 +63,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui _vm->_eventsManager->mouseOff(); - byte *screenP = _vm->_graphicsManager->_vesaScreen; + byte *screenP = _vm->_graphicsManager->_backBuffer; Common::String tmpStr; // The Windows 95 demo only contains the interlaced version of the BOMBE1 and BOMBE2 videos @@ -223,14 +223,14 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u memcpy(_vm->_graphicsManager->_oldPalette, _vm->_graphicsManager->_palette, 769); if (_vm->_graphicsManager->_lineNbr == SCREEN_WIDTH) - _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 307200); + _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_backBuffer, 307200); else if (_vm->_graphicsManager->_lineNbr == (SCREEN_WIDTH * 2)) - _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 614400); + _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_backBuffer, 614400); if (!_vm->_graphicsManager->_lineNbr) _vm->_graphicsManager->_scrollOffset = 0; - screenP = _vm->_graphicsManager->_vesaScreen; + screenP = _vm->_graphicsManager->_backBuffer; if (!f.open(filename)) error("Error opening file - %s", filename.c_str()); @@ -344,7 +344,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u } _vm->_graphicsManager->_fadingFl = false; - _vm->_saveLoadManager->load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen); + _vm->_saveLoadManager->load("TEMP.SCR", _vm->_graphicsManager->_backBuffer); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); memcpy(_vm->_graphicsManager->_palette, _vm->_graphicsManager->_oldPalette, 769); @@ -359,13 +359,13 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u _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); + _vm->_graphicsManager->m_scroll16(_vm->_graphicsManager->_frontBuffer, _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->m_scroll16(_vm->_graphicsManager->_frontBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } _vm->_graphicsManager->unlockScreen(); _vm->_graphicsManager->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); @@ -576,13 +576,13 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui _vm->_eventsManager->refreshScreenAndEvents(); if (_vm->_graphicsManager->_lineNbr == SCREEN_WIDTH) - _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 307200); + _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_backBuffer, 307200); else if (_vm->_graphicsManager->_lineNbr == (SCREEN_WIDTH * 2)) - _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 614400); + _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_backBuffer, 614400); if (!_vm->_graphicsManager->_lineNbr) _vm->_graphicsManager->_scrollOffset = 0; } - byte *screenP = _vm->_graphicsManager->_vesaScreen; + byte *screenP = _vm->_graphicsManager->_backBuffer; Common::File f; if (!f.open(file)) error("Error opening file - %s", file.c_str()); @@ -691,7 +691,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui f.close(); if (!noColFl) { - _vm->_saveLoadManager->load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen); + _vm->_saveLoadManager->load("TEMP.SCR", _vm->_graphicsManager->_backBuffer); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); _vm->_eventsManager->_mouseFl = true; @@ -711,7 +711,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u return; _vm->_eventsManager->_mouseFl = false; - screenP = _vm->_graphicsManager->_vesaScreen; + screenP = _vm->_graphicsManager->_backBuffer; if (!f.open(file)) error("File not found - %s", file.c_str()); diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp index 26d9d30394..a708305c56 100644 --- a/engines/hopkins/computer.cpp +++ b/engines/hopkins/computer.cpp @@ -272,7 +272,7 @@ void ComputerManager::showComputer(ComputerEnum mode) { _vm->_eventsManager->refreshScreenAndEvents(); _vm->_eventsManager->delay(1000); - memset(_vm->_graphicsManager->_vesaBuffer, 0, 307199); + memset(_vm->_graphicsManager->_frontBuffer, 0, 307199); _vm->_graphicsManager->lockScreen(); _vm->_graphicsManager->clearScreen(); _vm->_graphicsManager->unlockScreen(); @@ -424,13 +424,13 @@ 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->Copy_Mem(_vm->_graphicsManager->_backBuffer, x1, yp, 3 * _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager->_frontBuffer, x1, yp); _vm->_graphicsManager->addDirtyRect(x1, yp, x2, yp + 12); _vm->_fontManager->displayTextVesa(x1, yp, "_", 252); } 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->Copy_Mem(_vm->_graphicsManager->_backBuffer, x1, yp, _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager->_frontBuffer, x1, yp); _vm->_graphicsManager->addDirtyRect(x1, yp, _vm->_fontManager->_fontFixedWidth + x1, yp + 12); _inputBuf[textIndex] = newChar; @@ -442,7 +442,7 @@ 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->Copy_Mem(_vm->_graphicsManager->_backBuffer, x1, yp, _vm->_fontManager->_fontFixedWidth, 12, _vm->_graphicsManager->_frontBuffer, x1, yp); _vm->_graphicsManager->addDirtyRect(x1, yp, _vm->_fontManager->_fontFixedWidth + x1, yp + 12); _vm->_eventsManager->refreshScreenAndEvents(); diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp index e5bc5a1e87..48640aa824 100644 --- a/engines/hopkins/dialogs.cpp +++ b/engines/hopkins/dialogs.cpp @@ -68,11 +68,11 @@ void DialogsManager::drawInvent(Common::Point oldBorder, int oldBorderSpriteInde if (!_vm->_dialogsManager->_inventDisplayedFl) return; - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight); + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight); if (oldBorder.x && oldBorder.y) - _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_dialogsManager->_inventBuf2, oldBorder.x + 300, oldBorder.y + 300, oldBorderSpriteIndex + 1); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_dialogsManager->_inventBuf2, oldBorder.x + 300, oldBorder.y + 300, oldBorderSpriteIndex + 1); if (newBorder.x && newBorder.y) - _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _vm->_dialogsManager->_inventBuf2, newBorder.x + 300, newBorder.y + 300, newBorderSpriteIndex); + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_dialogsManager->_inventBuf2, newBorder.x + 300, newBorder.y + 300, newBorderSpriteIndex); _vm->_graphicsManager->addDirtyRect(_vm->_dialogsManager->_inventX, _vm->_dialogsManager->_inventY, _vm->_dialogsManager->_inventX + _vm->_dialogsManager->_inventWidth, _vm->_dialogsManager->_inventY + _vm->_dialogsManager->_inventHeight); } @@ -320,8 +320,8 @@ 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->copySurface(_vm->_graphicsManager->_backBuffer, scrollOffset + 164, + 107, 335, 215, _vm->_graphicsManager->_frontBuffer, scrollOffset + 164, 107); _vm->_graphicsManager->addDirtyRect(scrollOffset + 164, 107, scrollOffset + 498, 320); _vm->_globals->_optionDialogSpr = _vm->_globals->freeMemory(_vm->_globals->_optionDialogSpr); @@ -384,7 +384,7 @@ void DialogsManager::showInventory() { _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->_frontBuffer, _inventWin1, _inventX + 300, 414, 0, 0, 0, false); int curPosY = 0; int inventCount = 0; for (int inventLine = 1; inventLine <= 5; inventLine++) { @@ -395,7 +395,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->_frontBuffer, obj, _inventX + curPosX + 6, curPosY + 120, _vm->_objectsManager->getObjectWidth(), _vm->_objectsManager->getObjectHeight()); _vm->_globals->freeMemory(obj); } @@ -403,7 +403,7 @@ void DialogsManager::showInventory() { }; curPosY += 38; } - _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_vesaBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight); + _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_frontBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight); _vm->_eventsManager->_curMouseButton = 0; int newInventoryItem = 0; @@ -471,7 +471,7 @@ 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->copySurface(_vm->_graphicsManager->_backBuffer, _inventX, 114, _inventWidth, _inventHeight, _vm->_graphicsManager->_frontBuffer, _inventX, 114); _vm->_graphicsManager->addDirtyRect(_inventX, 114, _inventX + _inventWidth, _inventWidth + 114); _vm->_objectsManager->_refreshBobMode10Fl = true; } @@ -502,8 +502,8 @@ 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->copySurface(_vm->_graphicsManager->_backBuffer, _vm->_objectsManager->_oldInventoryPosX, 27, 48, 38, + _vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_oldInventoryPosX, 27); _vm->_graphicsManager->addDirtyRect(_vm->_objectsManager->_oldInventoryPosX, 27, _vm->_objectsManager->_oldInventoryPosX + 48, 65); --_vm->_objectsManager->_eraseVisibleCounter; } @@ -511,31 +511,31 @@ void DialogsManager::inventAnim() { 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->_backBuffer, _vm->_objectsManager->_oldInventoryPosX, 27, 48, 38, + _vm->_graphicsManager->_frontBuffer, _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->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _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->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false); if (_vm->_globals->_saveData->_data[svField355] == 1) - _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_headSprites, 866, 325, 1, 0, 0, false); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 866, 325, 1, 0, 0, false); _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); _vm->_graphicsManager->addDirtyRect(566, 25, 594, 60); } if (_vm->_globals->_saveData->_data[svField356] == 1) { - _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false); _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); } if (_vm->_globals->_saveData->_data[svField354] == 1) { - _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false); + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false); _vm->_graphicsManager->addDirtyRect(532, 25, 560, 60); } } @@ -594,7 +594,7 @@ 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->copySurface(_vm->_graphicsManager->_backBuffer, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager->_frontBuffer, _vm->_eventsManager->_startPos.x + 183, 60); _vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, 457, 413); _vm->_objectsManager->_refreshBobMode10Fl = true; _vm->_objectsManager->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite); @@ -623,7 +623,7 @@ 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->copySurface(_vm->_graphicsManager->_backBuffer, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager->_frontBuffer, _vm->_eventsManager->_startPos.x + 183, 60); _vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, _vm->_eventsManager->_startPos.x + 457, 413); _vm->_objectsManager->_refreshBobMode10Fl = true; _vm->_objectsManager->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite); @@ -664,18 +664,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->_frontBuffer, _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->_frontBuffer, _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->_frontBuffer, _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->_frontBuffer, _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->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 539, 372, 2); } for (int slotNumber = 1; slotNumber <= 6; ++slotNumber) { @@ -688,22 +688,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->_frontBuffer, 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->_frontBuffer, 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->_frontBuffer, 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->_frontBuffer, 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->_frontBuffer, 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->_frontBuffer, thumb, _vm->_eventsManager->_startPos.x + 323, 294, 128, 87); break; } @@ -713,7 +713,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->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353); _vm->_objectsManager->_saveLoadFl = true; _vm->_objectsManager->_saveLoadX = 0; _vm->_objectsManager->_saveLoadY = 0; diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 0d5db1b39f..6a55001792 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -462,7 +462,7 @@ void EventsManager::refreshScreenAndEvents() { } 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->m_scroll16(_vm->_graphicsManager->_frontBuffer, _vm->_graphicsManager->_scrollPosX, 20, SCREEN_WIDTH, 440, 0, 20); _vm->_graphicsManager->unlockScreen(); _vm->_graphicsManager->resetRefreshRects(); diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp index 03b4e2e472..02f1caf439 100644 --- a/engines/hopkins/font.cpp +++ b/engines/hopkins/font.cpp @@ -175,7 +175,7 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in int height = _text[idx]._height; int width = _text[idx]._width; _vm->_graphicsManager->restoreSurfaceRect( - _vm->_graphicsManager->_vesaBuffer, + _vm->_graphicsManager->_frontBuffer, _text[idx]._textBlock, xp, yp, @@ -361,15 +361,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->copySurfaceRect(_vm->_graphicsManager->_frontBuffer, 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->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, 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->_frontBuffer, posX, posY, saveWidth, (byte)-2); + _vm->_graphicsManager->drawHorizontalLine(_vm->_graphicsManager->_frontBuffer, posX, saveHeight + posY, saveWidth, (byte)-2); + _vm->_graphicsManager->drawVerticalLine(_vm->_graphicsManager->_frontBuffer, posX, posY, saveHeight, (byte)-2); + _vm->_graphicsManager->drawVerticalLine(_vm->_graphicsManager->_frontBuffer, saveWidth + posX, posY, saveHeight, (byte)-2); } _text[idx]._lineCount = lineCount; int textPosY = posY + 5; @@ -395,7 +395,7 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in _text[idx]._textBlock = ptre; _text[idx]._width = blockWidth; _text[idx]._height = blockHeight; - _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_vesaBuffer, _text[idx]._textBlock, posX, posY, _text[idx]._width, blockHeight); + _vm->_graphicsManager->copySurfaceRect(_vm->_graphicsManager->_frontBuffer, _text[idx]._textBlock, posX, posY, _text[idx]._width, blockHeight); } _tempText = _vm->_globals->freeMemory(_tempText); } @@ -415,7 +415,7 @@ 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->_frontBuffer, _font, currentX, yp, currChar - 32, col); currentX += _vm->_objectsManager->getWidth(_font, charIndex); } } @@ -432,7 +432,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->_frontBuffer, _font, xp, yp, characterIndex, col); xp += _vm->_objectsManager->getWidth(_font, characterIndex); } } @@ -459,7 +459,7 @@ void FontManager::renderTextDisplay(int xp, int yp, const Common::String &msg, i break; if (curChar >= 32) { byte printChar = curChar - 32; - _vm->_graphicsManager->displayFont(_vm->_graphicsManager->_vesaBuffer, _font, charEndPosX, yp, printChar, fontCol); + _vm->_graphicsManager->displayFont(_vm->_graphicsManager->_frontBuffer, _font, charEndPosX, yp, printChar, fontCol); // UGLY HACK: For some obscure reason, the BeOS and OS/2 versions use another font file, which doesn't have variable width. // All the fonts have a length of 9, which results in completely broken text in the computer. diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 589259b203..ee2c75cf55 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -49,8 +49,8 @@ GraphicsManager::GraphicsManager(HopkinsEngine *vm) { _scrollPosX = 0; _largeScreenFl = false; _oldScrollPosX = 0; - _vesaScreen = NULL; - _vesaBuffer = NULL; + _backBuffer = NULL; + _frontBuffer = NULL; _screenBuffer = g_PTRNUL; _showDirtyRects = false; @@ -94,8 +94,8 @@ GraphicsManager::GraphicsManager(HopkinsEngine *vm) { } GraphicsManager::~GraphicsManager() { - _vm->_globals->freeMemory(_vesaScreen); - _vm->_globals->freeMemory(_vesaBuffer); + _vm->_globals->freeMemory(_backBuffer); + _vm->_globals->freeMemory(_frontBuffer); _vm->_globals->freeMemory(_screenBuffer); } @@ -105,8 +105,8 @@ void GraphicsManager::setGraphicalMode(int width, int height) { initGraphics(width, height, true, &pixelFormat16); // Init surfaces - _vesaScreen = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT); - _vesaBuffer = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT); + _backBuffer = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT); + _frontBuffer = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT); _screenBuffer = _vm->_globals->allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT); _videoPtr = NULL; @@ -156,8 +156,8 @@ void GraphicsManager::clearScreen() { } void GraphicsManager::clearVesaScreen() { - Common::fill(_vesaScreen, _vesaScreen + _screenLineSize * _screenHeight, 0); - Common::fill(_vesaBuffer, _vesaBuffer + _screenLineSize * _screenHeight, 0); + Common::fill(_backBuffer, _backBuffer + _screenLineSize * _screenHeight, 0); + Common::fill(_frontBuffer, _frontBuffer + _screenLineSize * _screenHeight, 0); addDirtyRect(Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); } @@ -178,13 +178,13 @@ void GraphicsManager::loadVgaImage(const Common::String &file) { lockScreen(); clearScreen(); unlockScreen(); - loadPCX320(_vesaScreen, file, _palette); - memcpy(_vesaBuffer, _vesaScreen, 64000); + loadPCX320(_backBuffer, file, _palette); + memcpy(_frontBuffer, _backBuffer, 64000); setScreenWidth(320); _maxX = 320; lockScreen(); - copy16bFromSurfaceScaleX2(_vesaBuffer); + copy16bFromSurfaceScaleX2(_frontBuffer); addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); unlockScreen(); @@ -209,7 +209,7 @@ void GraphicsManager::loadScreen(const Common::String &file) { } scrollScreen(0); - loadPCX640(_vesaScreen, file, _palette, flag); + loadPCX640(_backBuffer, file, _palette, flag); _scrollPosX = 0; _oldScrollPosX = 0; @@ -220,7 +220,7 @@ void GraphicsManager::loadScreen(const Common::String &file) { _maxX = SCREEN_WIDTH; lockScreen(); clearScreen(); - m_scroll16(_vesaScreen, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + m_scroll16(_backBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); unlockScreen(); } else { setScreenWidth(SCREEN_WIDTH * 2); @@ -231,12 +231,12 @@ void GraphicsManager::loadScreen(const Common::String &file) { if (MANU_SCROLL) { lockScreen(); - m_scroll16(_vesaScreen, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + m_scroll16(_backBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); unlockScreen(); } } - memcpy(_vesaBuffer, _vesaScreen, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); + memcpy(_frontBuffer, _backBuffer, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); } void GraphicsManager::initColorTable(int minIndex, int maxIndex, byte *palette) { @@ -557,7 +557,7 @@ void GraphicsManager::fadeOut(const byte *palette, int step, const byte *surface */ void GraphicsManager::fadeInShort() { _fadeDefaultSpeed = 1; - fadeIn(_palette, 1, (const byte *)_vesaBuffer); + fadeIn(_palette, 1, (const byte *)_frontBuffer); } /** @@ -565,7 +565,7 @@ void GraphicsManager::fadeInShort() { */ void GraphicsManager::fadeOutShort() { _fadeDefaultSpeed = 1; - fadeOut(_palette, 1, (const byte *)_vesaBuffer); + fadeOut(_palette, 1, (const byte *)_frontBuffer); } /** @@ -573,7 +573,7 @@ void GraphicsManager::fadeOutShort() { */ void GraphicsManager::fadeInLong() { _fadeDefaultSpeed = 15; - fadeIn(_palette, 20, (const byte *)_vesaBuffer); + fadeIn(_palette, 20, (const byte *)_frontBuffer); } /** @@ -581,7 +581,7 @@ void GraphicsManager::fadeInLong() { */ void GraphicsManager::fadeOutLong() { _fadeDefaultSpeed = 15; - fadeOut(_palette, 20, (const byte *)_vesaBuffer); + fadeOut(_palette, 20, (const byte *)_frontBuffer); } /** @@ -606,7 +606,7 @@ void GraphicsManager::fadeOutDefaultLength(const byte *surface) { void GraphicsManager::fadeInBreakout() { setPaletteVGA256(_palette); lockScreen(); - copy16bFromSurfaceScaleX2(_vesaBuffer); + copy16bFromSurfaceScaleX2(_frontBuffer); unlockScreen(); updateScreen(); } @@ -621,7 +621,7 @@ void GraphicsManager::fadeOutBreakout() { setPaletteVGA256(palette); lockScreen(); - copy16bFromSurfaceScaleX2(_vesaBuffer); + copy16bFromSurfaceScaleX2(_frontBuffer); unlockScreen(); updateScreen(); } @@ -1111,7 +1111,7 @@ void GraphicsManager::displayDirtyRects() { Common::Rect dstRect; if (_vm->_eventsManager->_breakoutFl) { - Copy_Vga16(_vesaBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left, r.top); + Copy_Vga16(_frontBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left, r.top); dstRect.left = r.left * 2; dstRect.top = r.top * 2 + 30; dstRect.setWidth((r.right - r.left) * 2); @@ -1122,7 +1122,7 @@ void GraphicsManager::displayDirtyRects() { // WORKAROUND: Original didn't lock the screen for access lockScreen(); - m_scroll16(_vesaBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left - _vm->_eventsManager->_startPos.x, r.top); + m_scroll16(_frontBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left - _vm->_eventsManager->_startPos.x, r.top); dstRect.left = r.left - _vm->_eventsManager->_startPos.x; dstRect.top = r.top; @@ -1168,11 +1168,11 @@ void GraphicsManager::AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, i int width = _vm->_objectsManager->getWidth(objectData, idx); int height = _vm->_objectsManager->getHeight(objectData, idx); if (*objectData == 78) { - Affiche_Perfect(_vesaScreen, objectData, xp + 300, yp + 300, idx, 0, 0, false); - Affiche_Perfect(_vesaBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false); + Affiche_Perfect(_backBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false); + Affiche_Perfect(_frontBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false); } else { - Sprite_Vesa(_vesaBuffer, objectData, xp + 300, yp + 300, idx); - Sprite_Vesa(_vesaScreen, objectData, xp + 300, yp + 300, idx); + Sprite_Vesa(_frontBuffer, objectData, xp + 300, yp + 300, idx); + Sprite_Vesa(_backBuffer, objectData, xp + 300, yp + 300, idx); } if (addSegment) addDirtyRect(xp, yp, xp + width, yp + height); @@ -1585,11 +1585,11 @@ void GraphicsManager::fastDisplay(const byte *spriteData, int xp, int yp, int sp int height = _vm->_objectsManager->getHeight(spriteData, spriteIndex); if (*spriteData == 78) { - Affiche_Perfect(_vesaScreen, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false); - Affiche_Perfect(_vesaBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false); + Affiche_Perfect(_backBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false); + Affiche_Perfect(_frontBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false); } else { - Sprite_Vesa(_vesaBuffer, spriteData, xp + 300, yp + 300, spriteIndex); - Sprite_Vesa(_vesaScreen, spriteData, xp + 300, yp + 300, spriteIndex); + Sprite_Vesa(_frontBuffer, spriteData, xp + 300, yp + 300, spriteIndex); + Sprite_Vesa(_backBuffer, spriteData, xp + 300, yp + 300, spriteIndex); } if (addSegment) addDirtyRect(xp, yp, xp + width, yp + height); @@ -1736,15 +1736,15 @@ void GraphicsManager::NB_SCREEN(bool initPalette) { initColorTable(50, 65, _palette); if (_lineNbr == SCREEN_WIDTH) - Trans_bloc2(_vesaBuffer, _colorTable, SCREEN_WIDTH * SCREEN_HEIGHT); + Trans_bloc2(_frontBuffer, _colorTable, SCREEN_WIDTH * SCREEN_HEIGHT); else if (_lineNbr == (SCREEN_WIDTH * 2)) - Trans_bloc2(_vesaBuffer, _colorTable, SCREEN_WIDTH * SCREEN_HEIGHT * 2); + Trans_bloc2(_frontBuffer, _colorTable, SCREEN_WIDTH * SCREEN_HEIGHT * 2); lockScreen(); - m_scroll16(_vesaBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + m_scroll16(_frontBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); unlockScreen(); - memcpy(_vesaScreen, _vesaBuffer, 614399); + memcpy(_backBuffer, _frontBuffer, 614399); updateScreen(); } diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index 87a6ae251f..8009a366b9 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -87,8 +87,8 @@ public: byte _colorTable[PALETTE_EXT_BLOCK_SIZE]; byte _palette[PALETTE_EXT_BLOCK_SIZE]; byte _oldPalette[PALETTE_EXT_BLOCK_SIZE]; - byte *_vesaScreen; - byte *_vesaBuffer; + byte *_backBuffer; + byte *_frontBuffer; byte *_screenBuffer; bool _largeScreenFl; bool _noFadingFl; diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index ca76cf8ed8..882efa2cec 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -158,7 +158,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->_backBuffer, 0, 0, 640, 440, _graphicsManager->_frontBuffer, 0, 0); _eventsManager->refreshScreenAndEvents(); } @@ -369,8 +369,8 @@ bool HopkinsEngine::runWin95Demo() { _graphicsManager->clearScreen(); _graphicsManager->unlockScreen(); _graphicsManager->updateScreen(); - memset(_graphicsManager->_vesaBuffer, 0, 307200); - memset(_graphicsManager->_vesaScreen, 0, 307200); + memset(_graphicsManager->_frontBuffer, 0, 307200); + memset(_graphicsManager->_backBuffer, 0, 307200); _graphicsManager->clearPalette(); _graphicsManager->resetDirtyRects(); break; @@ -694,8 +694,8 @@ bool HopkinsEngine::runLinuxDemo() { _graphicsManager->clearScreen(); _graphicsManager->unlockScreen(); _graphicsManager->updateScreen(); - memset(_graphicsManager->_vesaBuffer, 0, 307200); - memset(_graphicsManager->_vesaScreen, 0, 307200); + memset(_graphicsManager->_frontBuffer, 0, 307200); + memset(_graphicsManager->_backBuffer, 0, 307200); _graphicsManager->clearPalette(); _graphicsManager->resetDirtyRects(); break; @@ -921,7 +921,7 @@ 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->_frontBuffer, _graphicsManager->_frontBuffer + SCREEN_WIDTH * 2 * SCREEN_HEIGHT, 0); _graphicsManager->fadeOutLong(); } @@ -1491,8 +1491,8 @@ bool HopkinsEngine::runFull() { _graphicsManager->clearScreen(); _graphicsManager->unlockScreen(); _graphicsManager->updateScreen(); - memset(_graphicsManager->_vesaBuffer, 0, 307200); - memset(_graphicsManager->_vesaScreen, 0, 307200); + memset(_graphicsManager->_frontBuffer, 0, 307200); + memset(_graphicsManager->_backBuffer, 0, 307200); _graphicsManager->clearPalette(); _graphicsManager->resetDirtyRects(); break; @@ -1742,7 +1742,7 @@ void HopkinsEngine::playIntro() { _eventsManager->refreshScreenAndEvents(); memcpy(&paletteData2, _graphicsManager->_palette, 796); - _graphicsManager->setPaletteVGA256WithRefresh(paletteData, _graphicsManager->_vesaBuffer); + _graphicsManager->setPaletteVGA256WithRefresh(paletteData, _graphicsManager->_frontBuffer); _graphicsManager->endDisplayBob(); if (shouldQuit() || _eventsManager->_escKeyFl) @@ -1774,7 +1774,7 @@ void HopkinsEngine::playIntro() { _eventsManager->refreshScreenAndEvents(); _globals->iRegul = 1; - _graphicsManager->setPaletteVGA256WithRefresh(paletteData2, _graphicsManager->_vesaBuffer); + _graphicsManager->setPaletteVGA256WithRefresh(paletteData2, _graphicsManager->_frontBuffer); int introIndex = 0; while (!shouldQuit() && !_eventsManager->_escKeyFl) { @@ -1793,19 +1793,19 @@ void HopkinsEngine::playIntro() { _graphicsManager->_palette[i] -= maxPalVal; } - _graphicsManager->setPaletteVGA256WithRefresh(_graphicsManager->_palette, _graphicsManager->_vesaBuffer); + _graphicsManager->setPaletteVGA256WithRefresh(_graphicsManager->_palette, _graphicsManager->_frontBuffer); for (int i = 1; i < 2 * introIndex; i++) _eventsManager->refreshScreenAndEvents(); - _graphicsManager->setPaletteVGA256WithRefresh(paletteData2, _graphicsManager->_vesaBuffer); + _graphicsManager->setPaletteVGA256WithRefresh(paletteData2, _graphicsManager->_frontBuffer); for (int i = 1; i < 20 - introIndex; i++) _eventsManager->refreshScreenAndEvents(); introIndex += 2; if (introIndex > 15) { - _graphicsManager->setPaletteVGA256WithRefresh(paletteData, _graphicsManager->_vesaBuffer); + _graphicsManager->setPaletteVGA256WithRefresh(paletteData, _graphicsManager->_frontBuffer); for (uint j = 1; j < 100 / _globals->_speed; ++j) _eventsManager->refreshScreenAndEvents(); @@ -1820,7 +1820,7 @@ void HopkinsEngine::playIntro() { _eventsManager->refreshScreenAndEvents(); Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager->_palette[0]); - _graphicsManager->setPaletteVGA256WithRefresh(_graphicsManager->_palette, _graphicsManager->_vesaBuffer); + _graphicsManager->setPaletteVGA256WithRefresh(_graphicsManager->_palette, _graphicsManager->_frontBuffer); for (uint m = 0; m < 50 / _globals->_speed; ++m) { if (m == 30 / _globals->_speed) { @@ -2299,7 +2299,7 @@ void HopkinsEngine::loadBaseMap() { } void HopkinsEngine::drawBaseMap() { - memset(_graphicsManager->_vesaScreen, 0, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); + memset(_graphicsManager->_backBuffer, 0, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); // List of rectangle areas to draw for exit points const int rects[] = { @@ -2317,13 +2317,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->_backBuffer + 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->_frontBuffer, _graphicsManager->_backBuffer, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); // Write some explanatory text _fontManager->displayText(40, 200, "ScummVM base map - select a square for different rooms", 255); @@ -2538,7 +2538,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->_backBuffer, 60, 50, 520, 380, _graphicsManager->_frontBuffer, 60, 50); } else { _eventsManager->refreshScreenAndEvents(); } diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index cdc6da18cf..001b0351ba 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -392,9 +392,9 @@ void ObjectsManager::displaySprite() { if (clipY < _vm->_graphicsManager->_minY) clipY = _vm->_graphicsManager->_minY; - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, clipX, clipY, + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, clipX, clipY, _vm->_fontManager->_textList[idx]._width + 4, _vm->_fontManager->_textList[idx]._height + 4, - _vm->_graphicsManager->_vesaBuffer, clipX, clipY); + _vm->_graphicsManager->_frontBuffer, clipX, clipY); _vm->_fontManager->_textList[idx]._enabledFl = false; } } @@ -410,9 +410,9 @@ void ObjectsManager::displaySprite() { if (clipY < _vm->_graphicsManager->_minY) clipY = _vm->_graphicsManager->_minY; - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, clipX, clipY, + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, clipX, clipY, Liste[idx]._width + 4, Liste[idx]._height + 4, - _vm->_graphicsManager->_vesaBuffer, clipX, clipY); + _vm->_graphicsManager->_frontBuffer, clipX, clipY); Liste[idx]._visibleFl = false; } } @@ -498,30 +498,30 @@ void ObjectsManager::displaySprite() { _vm->_dialogsManager->drawInvent(_oldBorderPos, _oldBorderSpriteIndex, _borderPos, _borderSpriteIndex); if (_saveLoadFl) { - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, _saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353); + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, _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->_frontBuffer, _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); } // 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->_frontBuffer, _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->_frontBuffer, _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->_frontBuffer, _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->_frontBuffer, _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->_frontBuffer, _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->_frontBuffer, _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->_frontBuffer, _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->_frontBuffer, _vm->_globals->_optionDialogSpr, _vm->_eventsManager->_startPos.x + 611, 502, _vm->_globals->_menuScrollSpeed); _vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 164, 107, _vm->_eventsManager->_startPos.x + 498, 320); } @@ -605,10 +605,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->_frontBuffer, _bob[idx]._spriteData, xp + 300, yp + 300, _bob[idx]._frameIndex); else - _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_vesaBuffer, + _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, _bob[idx]._spriteData, xp + 300, yp + 300, _bob[idx]._frameIndex, _bob[idx]._zoomOutFactor, _bob[idx]._zooInmFactor, _bob[idx]._flipFl); @@ -854,10 +854,10 @@ void ObjectsManager::showSprite(int idx) { return; if (spr->_rleFl) - _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, spr->_spriteData, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, 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->_frontBuffer, spr->_spriteData, spr->_destX + 300, spr->_destY + 300, spr->_spriteIndex, spr->_reducePct, spr->_zoomPct, spr->_flipFl); ListeItem *list = &Liste[idx]; @@ -887,7 +887,7 @@ void ObjectsManager::showSprite(int idx) { void ObjectsManager::displayHiding(int idx) { HidingItem *hid = &_hidingItem[idx]; - _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_vesaBuffer, _hidingItemData[1], + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _hidingItemData[1], hid->_x + 300, hid->_y + 300, hid->_spriteIndex); _vm->_graphicsManager->addDirtyRect(hid->_x, hid->_y, hid->_x + hid->_width, hid->_y + hid->_height); } @@ -1095,10 +1095,10 @@ void ObjectsManager::displayBobAnim() { if ((_bob[i]._bobMode == 10) && (_bob[i]._bobMode10)) { if ((_bob[i]._bobModeChange != 2) && (_bob[i]._bobModeChange != 4)) { if (Liste2[i]._visibleFl) { - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, Liste2[i]._posX, Liste2[i]._posY, Liste2[i]._width, Liste2[i]._height, - _vm->_graphicsManager->_vesaBuffer, Liste2[i]._posX, + _vm->_graphicsManager->_frontBuffer, Liste2[i]._posX, Liste2[i]._posY); Liste2[i]._visibleFl = false; } @@ -1107,10 +1107,10 @@ void ObjectsManager::displayBobAnim() { if (_bob[i]._bobMode == 11) { if (Liste2[i]._visibleFl) { - _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, + _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, Liste2[i]._posX, Liste2[i]._posY, Liste2[i]._width, Liste2[i]._height, - _vm->_graphicsManager->_vesaBuffer, + _vm->_graphicsManager->_frontBuffer, Liste2[i]._posX, Liste2[i]._posY); Liste2[i]._visibleFl = false; } @@ -1145,10 +1145,10 @@ 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->_backBuffer, vbob->_surface, vbob->_xp, vbob->_yp, width, height); - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, vbob->_surface, + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, vbob->_surface, vbob->_xp, vbob->_yp, width, height); _vm->_graphicsManager->addDirtyRect(vbob->_xp, vbob->_yp, vbob->_xp + width, height + vbob->_yp); @@ -1169,10 +1169,10 @@ 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->_backBuffer, vbob->_surface, vbob->_oldX, vbob->_oldY, width, height); - _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_vesaBuffer, vbob->_surface, + _vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, vbob->_surface, vbob->_oldX, vbob->_oldY, width, height); _vm->_graphicsManager->addDirtyRect(vbob->_oldX, vbob->_oldY, vbob->_oldX + width, vbob->_oldY + height); @@ -1196,20 +1196,20 @@ 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->_backBuffer, 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->_backBuffer, 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->_frontBuffer, 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->_frontBuffer, 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->_backBuffer, vbob->_spriteData, vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex); } @@ -2161,7 +2161,7 @@ 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->copySurface(_vm->_graphicsManager->_backBuffer, 532, 25, 65, 40, _vm->_graphicsManager->_frontBuffer, 532, 25); _vm->_graphicsManager->addDirtyRect(532, 25, 597, 65); _vm->_globals->_checkDistanceFl = true; _vm->_linesManager->_route = (RouteItem *)g_PTRNUL; @@ -2653,7 +2653,7 @@ void ObjectsManager::handleSpecialGames() { oldPalette = _vm->_globals->allocMemory(1000); memcpy(oldPalette, _vm->_graphicsManager->_palette, 769); - _vm->_saveLoadManager->saveFile("TEMP1.SCR", _vm->_graphicsManager->_vesaScreen, 307200); + _vm->_saveLoadManager->saveFile("TEMP1.SCR", _vm->_graphicsManager->_backBuffer, 307200); if (!_vm->_graphicsManager->_lineNbr) _vm->_graphicsManager->_scrollOffset = 0; @@ -2665,7 +2665,7 @@ void ObjectsManager::handleSpecialGames() { _vm->_soundManager->_specialSoundNum = 0; _vm->_graphicsManager->NB_SCREEN(false); - _vm->_saveLoadManager->load("TEMP1.SCR", _vm->_graphicsManager->_vesaScreen); + _vm->_saveLoadManager->load("TEMP1.SCR", _vm->_graphicsManager->_backBuffer); g_system->getSavefileManager()->removeSavefile("TEMP1.SCR"); _charactersEnabledFl = false; @@ -2673,9 +2673,9 @@ void ObjectsManager::handleSpecialGames() { _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->m_scroll16(_vm->_graphicsManager->_backBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager->unlockScreen(); - memcpy(_vm->_graphicsManager->_vesaBuffer, _vm->_graphicsManager->_vesaScreen, 614399); + memcpy(_vm->_graphicsManager->_frontBuffer, _vm->_graphicsManager->_backBuffer, 614399); _vm->_graphicsManager->_scrollStatus = 0; _vm->_graphicsManager->updateScreen(); diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp index 6bba86082d..1d3421ad2e 100644 --- a/engines/hopkins/saveload.cpp +++ b/engines/hopkins/saveload.cpp @@ -234,7 +234,7 @@ void SaveLoadManager::createThumbnail(Graphics::Surface *s) { Graphics::Surface thumb8; thumb8.create(w, h, Graphics::PixelFormat::createFormatCLUT8()); - _vm->_graphicsManager->reduceScreenPart(_vm->_graphicsManager->_vesaBuffer, (byte *)thumb8.pixels, + _vm->_graphicsManager->reduceScreenPart(_vm->_graphicsManager->_frontBuffer, (byte *)thumb8.pixels, _vm->_eventsManager->_startPos.x, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 40, 80); // Convert the 8-bit pixel to 16 bit surface diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index dcb77d5c2e..3d5d5f4e46 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -571,14 +571,14 @@ int ScriptManager::handleOpcode(byte *dataP) { } _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager->fadeInDefaultLength(_vm->_graphicsManager->_vesaBuffer); + _vm->_graphicsManager->fadeInDefaultLength(_vm->_graphicsManager->_frontBuffer); 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->fadeOutDefaultLength(_vm->_graphicsManager->_frontBuffer); _vm->_graphicsManager->endDisplayBob(); // If uncensored, rip the throat of the hostage @@ -601,9 +601,9 @@ int ScriptManager::handleOpcode(byte *dataP) { } _vm->_eventsManager->mouseOff(); - _vm->_graphicsManager->fadeInDefaultLength(_vm->_graphicsManager->_vesaBuffer); + _vm->_graphicsManager->fadeInDefaultLength(_vm->_graphicsManager->_frontBuffer); _vm->_objectsManager->SCI_OPTI_ONE(1, 0, 17, 3); - _vm->_graphicsManager->fadeOutDefaultLength(_vm->_graphicsManager->_vesaBuffer); + _vm->_graphicsManager->fadeOutDefaultLength(_vm->_graphicsManager->_frontBuffer); _vm->_graphicsManager->endDisplayBob(); if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo()) @@ -2354,7 +2354,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_graphicsManager->_fadingFl = true; _vm->_animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); _vm->_soundManager->_specialSoundNum = 0; - memset(_vm->_graphicsManager->_vesaBuffer, 0, 614400); + memset(_vm->_graphicsManager->_frontBuffer, 0, 614400); _vm->_graphicsManager->_noFadingFl = true; _vm->_globals->_exitId = 151; break; @@ -2366,7 +2366,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); _vm->_soundManager->_specialSoundNum = 0; _vm->_graphicsManager->_noFadingFl = true; - memset(_vm->_graphicsManager->_vesaBuffer, 0, 614400); + memset(_vm->_graphicsManager->_frontBuffer, 0, 614400); _vm->_globals->_exitId = 151; break; @@ -2379,7 +2379,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _vm->_animationManager->playAnim("BOMBE2A.ANM", 50, 14, 500); _vm->_soundManager->_specialSoundNum = 0; _vm->_graphicsManager->_noFadingFl = true; - memset(_vm->_graphicsManager->_vesaBuffer, 0, 614400); + memset(_vm->_graphicsManager->_frontBuffer, 0, 614400); _vm->_globals->_exitId = 151; break; @@ -2388,7 +2388,7 @@ int ScriptManager::handleOpcode(byte *dataP) { _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->_frontBuffer, 0, 614400); } _vm->_globals->_exitId = 6; break; diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 191277aafa..555932f03a 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -84,9 +84,9 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) } if (_vm->_graphicsManager->_lineNbr == SCREEN_WIDTH) - _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 307200); + _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_backBuffer, 307200); else if (_vm->_graphicsManager->_lineNbr == (SCREEN_WIDTH * 2)) - _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 614400); + _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_backBuffer, 614400); if (!_vm->_graphicsManager->_lineNbr) _vm->_graphicsManager->_scrollOffset = 0; @@ -126,7 +126,7 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) _characterSprite = _vm->_globals->freeMemory(_characterSprite); _vm->_graphicsManager->NB_SCREEN(false); - _vm->_saveLoadManager->load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen); + _vm->_saveLoadManager->load("TEMP.SCR", _vm->_graphicsManager->_backBuffer); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); _vm->_objectsManager->_charactersEnabledFl = false; @@ -141,9 +141,9 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) _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->m_scroll16(_vm->_graphicsManager->_backBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager->unlockScreen(); - memcpy(_vm->_graphicsManager->_vesaBuffer, _vm->_graphicsManager->_vesaScreen, 614399); + memcpy(_vm->_graphicsManager->_frontBuffer, _vm->_graphicsManager->_backBuffer, 614399); _vm->_globals->_disableInventFl = oldDisableInventFl; _vm->_graphicsManager->updateScreen(); for (int i = 0; i <= 4; i++) @@ -998,9 +998,9 @@ void TalkManager::animateObject(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); + _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_backBuffer, 307200); else if (_vm->_graphicsManager->_lineNbr == (SCREEN_WIDTH * 2)) - _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_vesaScreen, 614400); + _vm->_saveLoadManager->saveFile("TEMP.SCR", _vm->_graphicsManager->_backBuffer, 614400); if (!_vm->_graphicsManager->_lineNbr) _vm->_graphicsManager->_scrollOffset = 0; @@ -1060,7 +1060,7 @@ void TalkManager::animateObject(const Common::String &filename) { if (_vm->_globals->_exitId == 101) _vm->_globals->_exitId = 0; - _vm->_saveLoadManager->load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen); + _vm->_saveLoadManager->load("TEMP.SCR", _vm->_graphicsManager->_backBuffer); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); _vm->_objectsManager->_charactersEnabledFl = false; @@ -1074,10 +1074,10 @@ void TalkManager::animateObject(const Common::String &filename) { _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->m_scroll16(_vm->_graphicsManager->_backBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager->unlockScreen(); _vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette); - memcpy(_vm->_graphicsManager->_vesaBuffer, _vm->_graphicsManager->_vesaScreen, 614399); + memcpy(_vm->_graphicsManager->_frontBuffer, _vm->_graphicsManager->_backBuffer, 614399); _vm->_globals->_disableInventFl = false; _vm->_graphicsManager->updateScreen(); for (int i = 0; i <= 4; i++) |