[Scummvm-cvs-logs] SF.net SVN: scummvm:[50114] scummvm/trunk/engines/groovie/cursor.cpp

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Mon Jun 21 16:44:18 CEST 2010


Revision: 50114
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50114&view=rev
Author:   mthreepwood
Date:     2010-06-21 14:44:18 +0000 (Mon, 21 Jun 2010)

Log Message:
-----------
Check against the signature of Groovie v2 cursors with MKID_BE, makes it easier to see what it's doing.

Modified Paths:
--------------
    scummvm/trunk/engines/groovie/cursor.cpp

Modified: scummvm/trunk/engines/groovie/cursor.cpp
===================================================================
--- scummvm/trunk/engines/groovie/cursor.cpp	2010-06-21 13:58:51 UTC (rev 50113)
+++ scummvm/trunk/engines/groovie/cursor.cpp	2010-06-21 14:44:18 UTC (rev 50114)
@@ -403,19 +403,16 @@
 
 	// Open the icons file
 	Common::File iconsFile;
-	if (!iconsFile.open("icons.ph")) {
+	if (!iconsFile.open("icons.ph"))
 		error("Groovie::Cursor: Couldn't open icons.ph");
-		return;
-	}
 
 	// Verify the signature
-	uint32 tmp32 = iconsFile.readUint32LE();
+	uint32 tmp32 = iconsFile.readUint32BE();
 	uint16 tmp16 = iconsFile.readUint16LE();
-	if (tmp32 != 0x6e6f6369 || tmp16 != 1) {
-		error("Groovie::Cursor: icons.ph signature failed: %04X %d", tmp32, tmp16);
-		return;
-	}
+	if (tmp32 != MKID_BE('icon') || tmp16 != 1)
+		error("Groovie::Cursor: icons.ph signature failed: %s %d", tag2str(tmp32), tmp16);
 
+
 	// Read the number of icons
 	uint16 nicons = iconsFile.readUint16LE();
 


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