From 094a0617ac88148be291ffdff412cd515ed34ac8 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 10 Apr 2013 12:55:20 +0200 Subject: HOPKINS: Add lockScreen() and unlockScreen() in copy16bFromSurfaceScaleX2() --- engines/hopkins/graphics.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'engines') 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) { -- cgit v1.2.3