[Scummvm-cvs-logs] SF.net SVN: scummvm:[55505] scummvm/trunk/video/coktel_decoder.cpp

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Mon Jan 24 17:06:28 CET 2011


Revision: 55505
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55505&view=rev
Author:   drmccoy
Date:     2011-01-24 16:06:27 +0000 (Mon, 24 Jan 2011)

Log Message:
-----------
VIDEO: Fix a gfx glitch

Visible in some Inca 2 videos

Modified Paths:
--------------
    scummvm/trunk/video/coktel_decoder.cpp

Modified: scummvm/trunk/video/coktel_decoder.cpp
===================================================================
--- scummvm/trunk/video/coktel_decoder.cpp	2011-01-24 14:59:21 UTC (rev 55504)
+++ scummvm/trunk/video/coktel_decoder.cpp	2011-01-24 16:06:27 UTC (rev 55505)
@@ -1377,7 +1377,10 @@
 
 		if ((type == 2) && (rect.width() == _surface.w) && (_x == 0)) {
 			// Directly uncompress onto the video surface
-			deLZ77((byte *)_surface.pixels + (_y * _surface.pitch), dataPtr, dataSize,
+			int offsetX = rect.left * _surface.bytesPerPixel;
+			int offsetY = (_y + rect.top) * _surface.pitch;
+
+			deLZ77((byte *)_surface.pixels + offsetX + offsetY, dataPtr, dataSize,
 					_surface.w * _surface.h * _surface.bytesPerPixel);
 			return true;
 		}
@@ -2241,7 +2244,10 @@
 
 		if ((type == 2) && (rect.width() == _surface.w) && (_x == 0) && (_blitMode == 0)) {
 			// Directly uncompress onto the video surface
-			deLZ77((byte *)_surface.pixels + (_y * _surface.pitch), dataPtr, dataSize,
+			int offsetX = rect.left * _surface.bytesPerPixel;
+			int offsetY = (_y + rect.top) * _surface.pitch;
+
+			deLZ77((byte *)_surface.pixels + offsetX + offsetY, dataPtr, dataSize,
 					_surface.w * _surface.h * _surface.bytesPerPixel);
 			return true;
 		}


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