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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Feb 19 15:40:24 CET 2009


Revision: 38549
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38549&view=rev
Author:   thebluegr
Date:     2009-02-19 14:40:24 +0000 (Thu, 19 Feb 2009)

Log Message:
-----------
Fixed version checking for unpacked executable files, and updated the SCI version for an entry for PQ2

Modified Paths:
--------------
    scummvm/trunk/engines/sci/detection.cpp
    scummvm/trunk/engines/sci/exereader.cpp

Modified: scummvm/trunk/engines/sci/detection.cpp
===================================================================
--- scummvm/trunk/engines/sci/detection.cpp	2009-02-19 13:54:50 UTC (rev 38548)
+++ scummvm/trunk/engines/sci/detection.cpp	2009-02-19 14:40:24 UTC (rev 38549)
@@ -930,7 +930,7 @@
 		{"resource.003", 0, "77f02def3094af804fd2371db25b7100", 591851},
 		{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
 		{},
-		SCI_VERSION(0, 000, 395)	// FIXME: some versions are v. 0.000.409/0.000.490
+		SCI_VERSION(0, 000, 490)	// verified
 	},
 
 	// Police Quest 3 - English Amiga (from www.back2roots.org)
@@ -1449,7 +1449,6 @@
 			// Is it really an executable file?
 			Common::SeekableReadStream *fileStream = file->createReadStream();
 			bool isExe = isGameExe(fileStream);
-			int exeVersion = -1;
 
 			if (isExe) {
 				if (!readSciVersionFromExe(fileStream, &exeVersion)) {

Modified: scummvm/trunk/engines/sci/exereader.cpp
===================================================================
--- scummvm/trunk/engines/sci/exereader.cpp	2009-02-19 13:54:50 UTC (rev 38548)
+++ scummvm/trunk/engines/sci/exereader.cpp	2009-02-19 14:40:24 UTC (rev 38549)
@@ -236,7 +236,8 @@
 	bool isLZEXE = isLZEXECompressed(exeStream);
 
 	if (!isLZEXE) {
-		exeStream->seek(0, SEEK_SET);
+		// Read the last VERSION_DETECT_BUF_SIZE bytes
+		exeStream->seek(exeStream->size() - VERSION_DETECT_BUF_SIZE, SEEK_SET);
 		exeStream->read(buffer, VERSION_DETECT_BUF_SIZE);
 	} else {
 		// Read the two initial bytes


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