[Scummvm-cvs-logs] SF.net SVN: scummvm:[38239] scummvm/branches/branch-0-13-0/engines/agos/vga .cpp

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sun Feb 15 14:57:22 CET 2009


Revision: 38239
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38239&view=rev
Author:   Kirben
Date:     2009-02-15 13:57:22 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
Fix offset error in clearVideoBackGround(), that could cause menu glitches after fighting in Elvira 1.

Modified Paths:
--------------
    scummvm/branches/branch-0-13-0/engines/agos/vga.cpp

Modified: scummvm/branches/branch-0-13-0/engines/agos/vga.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/engines/agos/vga.cpp	2009-02-15 13:54:53 UTC (rev 38238)
+++ scummvm/branches/branch-0-13-0/engines/agos/vga.cpp	2009-02-15 13:57:22 UTC (rev 38239)
@@ -1125,7 +1125,7 @@
 
 void AGOSEngine::clearVideoBackGround(uint16 num, uint16 color) {
 	const uint16 *vlut = &_videoWindows[num * 4];
-	byte *dst = getBackGround() + vlut[0] * 16 + (vlut[1] * (vlut[2] * 16));
+	byte *dst = getBackGround() + vlut[0] * 16 + vlut[1] * _dxSurfacePitch;
 
 	for (uint h = 0; h < vlut[3]; h++) {
 		memset(dst, color, vlut[2] * 16);
@@ -1188,10 +1188,6 @@
 	uint16 num = vcReadNextWord();
 	uint16 color = vcReadNextWord();
 
-	// Clear video window
-	clearVideoWindow(num, color);
-	_vgaSpriteChanged++;
-
 	// Clear video background
 	if (getGameType() == GType_ELVIRA1) {
 		if (num == 2 || num == 6)
@@ -1204,7 +1200,10 @@
 			return;
 	}
 
+	// Clear video window
+	clearVideoWindow(num, color);
 	clearVideoBackGround(num, color);
+	_vgaSpriteChanged++;
 }
 
 void AGOSEngine::vc36_setWindowImage() {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list