From bccb460e36120d3555684ef13b23e00a367a8eb7 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 10 Apr 2013 12:59:39 +0200 Subject: HOPKINS: Add lockScreen() and unlockScreen() in copyVideoVbe16() --- engines/hopkins/anim.cpp | 7 +------ engines/hopkins/graphics.cpp | 3 +++ 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'engines/hopkins') diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 67f0e46fc0..43b75521e7 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -137,10 +137,8 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui if (!_vm->_events->_escKeyFl) { _vm->_events->_rateCounter = 0; - _vm->_graphicsMan->lockScreen(); if (*screenP != kByteStop) _vm->_graphicsMan->copyVideoVbe16(screenP); - _vm->_graphicsMan->unlockScreen(); _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); _vm->_graphicsMan->updateScreen(); @@ -282,11 +280,8 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u } _vm->_events->_rateCounter = 0; - _vm->_graphicsMan->lockScreen(); - if (*screenP != kByteStop) { + if (*screenP != kByteStop) _vm->_graphicsMan->copyVideoVbe16(screenP); - } - _vm->_graphicsMan->unlockScreen(); _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); _vm->_graphicsMan->updateScreen(); diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 50620e3f29..2a29b351b6 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -725,6 +725,8 @@ void GraphicsManager::copyWinscanVbe3(const byte *srcData, byte *destSurface) { void GraphicsManager::copyVideoVbe16(const byte *srcData) { const byte *srcP = srcData; int destOffset = 0; + + lockScreen(); assert(_videoPtr); for (;;) { @@ -791,6 +793,7 @@ void GraphicsManager::copyVideoVbe16(const byte *srcData) { ++destOffset; } } + unlockScreen(); } void GraphicsManager::copyVideoVbe16a(const byte *srcData) { -- cgit v1.2.3