aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/graphics.cpp
diff options
context:
space:
mode:
authorStrangerke2013-04-10 12:55:20 +0200
committerStrangerke2013-04-10 12:55:20 +0200
commit094a0617ac88148be291ffdff412cd515ed34ac8 (patch)
tree2dd01b2c11c721b8cf1a81b38dabcb31405f0b99 /engines/hopkins/graphics.cpp
parent1b081457c944d3a0b72d8d22b085aaa4787a9a0b (diff)
downloadscummvm-rg350-094a0617ac88148be291ffdff412cd515ed34ac8.tar.gz
scummvm-rg350-094a0617ac88148be291ffdff412cd515ed34ac8.tar.bz2
scummvm-rg350-094a0617ac88148be291ffdff412cd515ed34ac8.zip
HOPKINS: Add lockScreen() and unlockScreen() in copy16bFromSurfaceScaleX2()
Diffstat (limited to 'engines/hopkins/graphics.cpp')
-rw-r--r--engines/hopkins/graphics.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 6d366217d1..50620e3f29 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -185,10 +185,8 @@ void GraphicsManager::loadVgaImage(const Common::String &file) {
setScreenWidth(320);
_maxX = 320;
- lockScreen();
copy16bFromSurfaceScaleX2(_frontBuffer);
addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
- unlockScreen();
fadeInBreakout();
}
@@ -603,9 +601,7 @@ void GraphicsManager::fadeOutDefaultLength(const byte *surface) {
*/
void GraphicsManager::fadeInBreakout() {
setPaletteVGA256(_palette);
- lockScreen();
copy16bFromSurfaceScaleX2(_frontBuffer);
- unlockScreen();
updateScreen();
}
@@ -617,10 +613,7 @@ void GraphicsManager::fadeOutBreakout() {
memset(palette, 0, PALETTE_EXT_BLOCK_SIZE);
setPaletteVGA256(palette);
-
- lockScreen();
copy16bFromSurfaceScaleX2(_frontBuffer);
- unlockScreen();
updateScreen();
}
@@ -1198,6 +1191,8 @@ void GraphicsManager::copy16bFromSurfaceScaleX2(const byte *surface) {
byte *palPtr;
int curPixel;
+ lockScreen();
+
assert(_videoPtr);
const byte *curSurface = surface;
byte *destPtr = 30 * _screenLineSize + (byte *)_videoPtr;
@@ -1213,6 +1208,8 @@ void GraphicsManager::copy16bFromSurfaceScaleX2(const byte *surface) {
}
destPtr = _screenLineSize * 2 + oldDestPtr;
}
+
+ unlockScreen();
}
void GraphicsManager::restoreSurfaceRect(byte *destSurface, const byte *src, int xp, int yp, int width, int height) {