aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2013-04-10 12:59:39 +0200
committerStrangerke2013-04-10 12:59:39 +0200
commitbccb460e36120d3555684ef13b23e00a367a8eb7 (patch)
tree83f0fc823146556e032bb49db5b2d5b3c48d0f0b /engines
parent094a0617ac88148be291ffdff412cd515ed34ac8 (diff)
downloadscummvm-rg350-bccb460e36120d3555684ef13b23e00a367a8eb7.tar.gz
scummvm-rg350-bccb460e36120d3555684ef13b23e00a367a8eb7.tar.bz2
scummvm-rg350-bccb460e36120d3555684ef13b23e00a367a8eb7.zip
HOPKINS: Add lockScreen() and unlockScreen() in copyVideoVbe16()
Diffstat (limited to 'engines')
-rw-r--r--engines/hopkins/anim.cpp7
-rw-r--r--engines/hopkins/graphics.cpp3
2 files changed, 4 insertions, 6 deletions
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) {