diff options
| author | Paul Gilbert | 2013-03-12 21:43:48 -0400 | 
|---|---|---|
| committer | Paul Gilbert | 2013-03-12 21:43:48 -0400 | 
| commit | 408345ebabe803f239e85d32a0627f5ca5c7b46b (patch) | |
| tree | 3c00e6a6bc59829f4293ec18b29f5dd0b16f83cb | |
| parent | f49fb723dafff9e8b9f213cff785e580c671a3a8 (diff) | |
| download | scummvm-rg350-408345ebabe803f239e85d32a0627f5ca5c7b46b.tar.gz scummvm-rg350-408345ebabe803f239e85d32a0627f5ca5c7b46b.tar.bz2 scummvm-rg350-408345ebabe803f239e85d32a0627f5ca5c7b46b.zip  | |
HOPKINS: Further cleaned up dirty rect display
| -rw-r--r-- | engines/hopkins/graphics.cpp | 22 | 
1 files changed, 4 insertions, 18 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 326571828e..4041363814 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -185,6 +185,7 @@ void GraphicsManager::loadVgaImage(const Common::String &file) {  	lockScreen();  	copy16bFromSurfaceScaleX2(_vesaBuffer); +	addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);  	unlockScreen();  	fadeInBreakout(); @@ -1165,12 +1166,6 @@ void GraphicsManager::displayDirtyRects() {  	lockScreen();  	// Refresh the entire screen  -	Graphics::Surface *screenSurface = NULL; -	if (_showDirtyRects) { -		screenSurface = g_system->lockScreen(); -		g_system->copyRectToScreen(_screenBuffer, WinScan, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); -	} -  	for (uint idx = 0; idx < _dirtyRects.size(); ++idx) {  		Common::Rect &r = _dirtyRects[idx];  		Common::Rect dstRect; @@ -1199,21 +1194,12 @@ void GraphicsManager::displayDirtyRects() {  			unlockScreen();  		} -		// If it's a valid rect, then copy it over -		if (dstRect.isValidRect() && dstRect.width() > 0 && dstRect.height() > 0) { -			byte *srcP = _videoPtr + WinScan * dstRect.top + (dstRect.left * 2); -			g_system->copyRectToScreen(srcP, WinScan, dstRect.left, dstRect.top,  -				dstRect.width(), dstRect.height()); - -			if (_showDirtyRects) -				screenSurface->frameRect(dstRect, 0xffffff); -		} +		// If it's a valid rect, then add it to the list of areas to refresh on the screen +		if (dstRect.isValidRect() && dstRect.width() > 0 && dstRect.height() > 0) +			addRectToArray(_refreshRects, dstRect);  	}  	unlockScreen(); -	if (_showDirtyRects) -		g_system->unlockScreen(); -  	resetDirtyRects();  }  | 
