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

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Sun Dec 27 23:41:33 CET 2009


Revision: 46661
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46661&view=rev
Author:   mthreepwood
Date:     2009-12-27 22:41:33 +0000 (Sun, 27 Dec 2009)

Log Message:
-----------
wCompressed is still a uint16 in SCI32, so correct the vol version detection.

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

Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp	2009-12-27 22:34:12 UTC (rev 46660)
+++ scummvm/trunk/engines/sci/resource.cpp	2009-12-27 22:41:33 UTC (rev 46661)
@@ -819,7 +819,7 @@
 	// SCI0 volume format:  {wResId wPacked+4 wUnpacked wCompression} = 8 bytes
 	// SCI1 volume format:  {bResType wResNumber wPacked+4 wUnpacked wCompression} = 9 bytes
 	// SCI1.1 volume format:  {bResType wResNumber wPacked wUnpacked wCompression} = 9 bytes
-	// SCI32 volume format :  {bResType wResNumber dwPacked dwUnpacked wCompression} = 13 bytes
+	// SCI32 volume format:   {bResType wResNumber dwPacked dwUnpacked wCompression} = 13 bytes
 	// Try to parse volume with SCI0 scheme to see if it make sense
 	// Checking 1MB of data should be enough to determine the version
 	uint16 resId, wCompression;
@@ -835,7 +835,7 @@
 		resId = fileStream->readUint16LE();
 		dwPacked = (curVersion < kResVersionSci32) ? fileStream->readUint16LE() : fileStream->readUint32LE();
 		dwUnpacked = (curVersion < kResVersionSci32) ? fileStream->readUint16LE() : fileStream->readUint32LE();
-		wCompression = (curVersion < kResVersionSci32) ? fileStream->readUint16LE() : fileStream->readUint32LE();
+		wCompression = fileStream->readUint16LE();
 		if (fileStream->eos()) {
 			delete fileStream;
 			return curVersion;
@@ -873,7 +873,7 @@
 		else if (curVersion == kResVersionSci11)
 			fileStream->seek(sci11Align && ((9 + dwPacked) % 2) ? dwPacked + 1 : dwPacked, SEEK_CUR);
 		else if (curVersion == kResVersionSci32)
-			fileStream->seek(dwPacked - 2, SEEK_CUR);
+			fileStream->seek(dwPacked, SEEK_CUR);
 	}
 
 	delete fileStream;


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