diff options
author | Strangerke | 2013-04-10 12:51:13 +0200 |
---|---|---|
committer | Strangerke | 2013-04-10 12:51:13 +0200 |
commit | 1b081457c944d3a0b72d8d22b085aaa4787a9a0b (patch) | |
tree | a2f1a265ced623c75b731d43f3c81b60b729213d /engines | |
parent | 1ac0c06bf61818bc37e96c9dd1a82f027f313ca5 (diff) | |
download | scummvm-rg350-1b081457c944d3a0b72d8d22b085aaa4787a9a0b.tar.gz scummvm-rg350-1b081457c944d3a0b72d8d22b085aaa4787a9a0b.tar.bz2 scummvm-rg350-1b081457c944d3a0b72d8d22b085aaa4787a9a0b.zip |
HOPKINS: Remove some useless lockScreen() and unlockScreen() around copy16BitRect()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/anim.cpp | 16 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 3 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 15 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 4 |
5 files changed, 4 insertions, 36 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 63ac4b8d55..67f0e46fc0 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -90,10 +90,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); } else { _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); - _vm->_graphicsMan->lockScreen(); _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); _vm->_graphicsMan->updateScreen(); } @@ -243,12 +240,9 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u _vm->_graphicsMan->scrollScreen(0); _vm->_graphicsMan->clearScreen(); _vm->_graphicsMan->_maxX = SCREEN_WIDTH; - _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); - _vm->_graphicsMan->lockScreen(); + _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); _vm->_graphicsMan->updateScreen(); @@ -349,16 +343,13 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u if (_vm->_graphicsMan->_largeScreenFl) { _vm->_graphicsMan->setScreenWidth(2 * SCREEN_WIDTH); _vm->_graphicsMan->_maxX = 2 * SCREEN_WIDTH; - _vm->_graphicsMan->lockScreen(); _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_frontBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } else { _vm->_graphicsMan->setScreenWidth(SCREEN_WIDTH); _vm->_graphicsMan->_maxX = SCREEN_WIDTH; _vm->_graphicsMan->clearScreen(); - _vm->_graphicsMan->lockScreen(); _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_frontBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); } - _vm->_graphicsMan->unlockScreen(); _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); _vm->_graphicsMan->fadeInShort(); @@ -592,10 +583,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui } _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); } else { - _vm->_graphicsMan->lockScreen(); _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); _vm->_graphicsMan->updateScreen(); } @@ -716,8 +704,8 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u } else { _vm->_graphicsMan->lockScreen(); _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); - _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsMan->unlockScreen(); + _vm->_graphicsMan->copy16BitRect(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); _vm->_graphicsMan->updateScreen(); diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 6e2dc369c5..211bf5693c 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -464,10 +464,7 @@ void EventsManager::refreshScreenAndEvents() { _vm->_graphicsMan->displayDirtyRects(); } else { _vm->_fontMan->hideText(9); - _vm->_graphicsMan->lockScreen(); _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_scrollPosX, 20, SCREEN_WIDTH, 440, 0, 20); - _vm->_graphicsMan->unlockScreen(); - _vm->_graphicsMan->resetRefreshRects(); _vm->_graphicsMan->addRefreshRect(0, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 20); diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 5637cd7d77..6d366217d1 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -223,19 +223,15 @@ void GraphicsManager::loadScreen(const Common::String &file) { setScreenWidth(SCREEN_WIDTH); _maxX = SCREEN_WIDTH; clearScreen(); - lockScreen(); + copy16BitRect(_backBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - unlockScreen(); } else { setScreenWidth(SCREEN_WIDTH * 2); _maxX = SCREEN_WIDTH * 2; clearScreen(); - if (MANU_SCROLL) { - lockScreen(); + if (MANU_SCROLL) copy16BitRect(_backBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - unlockScreen(); - } } memcpy(_frontBuffer, _backBuffer, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); @@ -1122,16 +1118,12 @@ void GraphicsManager::displayDirtyRects() { r.left = MAX<int16>(r.left, _vm->_events->_startPos.x); r.right = MIN<int16>(r.right, (int16)_vm->_events->_startPos.x + SCREEN_WIDTH); - // WORKAROUND: Original didn't lock the screen for access - lockScreen(); copy16BitRect(_frontBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left - _vm->_events->_startPos.x, r.top); dstRect.left = r.left - _vm->_events->_startPos.x; dstRect.top = r.top; dstRect.setWidth(r.right - r.left); dstRect.setHeight(r.bottom - r.top); - - unlockScreen(); } // If it's a valid rect, then add it to the list of areas to refresh on the screen @@ -1748,10 +1740,7 @@ void GraphicsManager::displayScreen(bool initPalette) { else if (_lineNbr == (SCREEN_WIDTH * 2)) fillSurface(_frontBuffer, _colorTable, SCREEN_WIDTH * SCREEN_HEIGHT * 2); - lockScreen(); copy16BitRect(_frontBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - unlockScreen(); - memcpy(_backBuffer, _frontBuffer, 614399); updateScreen(); } diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 62f2f3883d..9c1d7bc4e9 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -2671,9 +2671,7 @@ void ObjectsManager::handleSpecialGames() { memcpy(_vm->_graphicsMan->_palette, oldPalette, 769); _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); _vm->_globals->freeMemory(oldPalette); - _vm->_graphicsMan->lockScreen(); _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_backBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsMan->unlockScreen(); memcpy(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_backBuffer, 614399); _vm->_graphicsMan->_scrollStatus = 0; diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index abcf36c93e..a16f6f5e4e 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -138,9 +138,7 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename) _vm->_graphicsMan->initColorTable(145, 150, _vm->_graphicsMan->_palette); _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); - _vm->_graphicsMan->lockScreen(); _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_backBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsMan->unlockScreen(); memcpy(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_backBuffer, 614399); _vm->_globals->_disableInventFl = oldDisableInventFl; _vm->_graphicsMan->updateScreen(); @@ -1070,9 +1068,7 @@ void TalkManager::animateObject(const Common::String &filename) { _vm->_graphicsMan->initColorTable(145, 150, _vm->_graphicsMan->_palette); _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); - _vm->_graphicsMan->lockScreen(); _vm->_graphicsMan->copy16BitRect(_vm->_graphicsMan->_backBuffer, _vm->_events->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - _vm->_graphicsMan->unlockScreen(); _vm->_graphicsMan->setPaletteVGA256(_vm->_graphicsMan->_palette); memcpy(_vm->_graphicsMan->_frontBuffer, _vm->_graphicsMan->_backBuffer, 614399); _vm->_globals->_disableInventFl = false; |