[Scummvm-cvs-logs] SF.net SVN: scummvm:[45161] scummvm/trunk/engines/sci/seq_decoder.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Oct 16 13:43:37 CEST 2009


Revision: 45161
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45161&view=rev
Author:   thebluegr
Date:     2009-10-16 11:43:37 +0000 (Fri, 16 Oct 2009)

Log Message:
-----------
SEQ full frames which don't cover the whole screen width are handled correctly again. Fixes the videos in the GK1 demo

Modified Paths:
--------------
    scummvm/trunk/engines/sci/seq_decoder.cpp

Modified: scummvm/trunk/engines/sci/seq_decoder.cpp
===================================================================
--- scummvm/trunk/engines/sci/seq_decoder.cpp	2009-10-16 11:22:06 UTC (rev 45160)
+++ scummvm/trunk/engines/sci/seq_decoder.cpp	2009-10-16 11:43:37 UTC (rev 45161)
@@ -129,13 +129,17 @@
 		_videoInfo.startTime = g_system->getMillis();
 
 	if (frameType == kSeqFrameFull) {
-		if (frameLeft != 0 && frameWidth != 320) {
-			// This case should never happen, but apparently it does in the
-			// seagulls video in KQ6 CD (most likely due to bad/incomplete data)
-			_fileStream->skip(frameSize);
-		} else {
-			_fileStream->read(_videoFrameBuffer + 320 * frameTop, frameSize);
-		}
+		byte *dst = _videoFrameBuffer + frameTop * 320 + frameLeft;
+		
+		byte *linebuf = new byte[frameWidth];
+
+		do {
+			_fileStream->read(linebuf, frameWidth);
+			memcpy(dst, linebuf, frameWidth);
+			dst += 320;
+		} while (--frameHeight);
+
+		delete[] linebuf;
 	} else {
 		byte *buf = new byte[frameSize];
 		_fileStream->read(buf, frameSize);


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