[Scummvm-cvs-logs] SF.net SVN: scummvm:[47584] tools/trunk/engines/mohawk

tdhs at users.sourceforge.net tdhs at users.sourceforge.net
Wed Jan 27 00:23:11 CET 2010


Revision: 47584
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47584&view=rev
Author:   tdhs
Date:     2010-01-26 23:23:10 +0000 (Tue, 26 Jan 2010)

Log Message:
-----------
Correct our interpretation of the first four bytes of the RSRC section in Mohawk archives for Mohawk tools as per r47583.

Modified Paths:
--------------
    tools/trunk/engines/mohawk/archive.cpp
    tools/trunk/engines/mohawk/archive.h

Modified: tools/trunk/engines/mohawk/archive.cpp
===================================================================
--- tools/trunk/engines/mohawk/archive.cpp	2010-01-26 23:05:52 UTC (rev 47583)
+++ tools/trunk/engines/mohawk/archive.cpp	2010-01-26 23:23:10 UTC (rev 47584)
@@ -75,7 +75,12 @@
 	if (_mhk->readUint32BE() != ID_RSRC)
 		error ("Could not find tag \'RSRC\'");
 
-	_rsrc.size = _mhk->readUint32BE();
+	_rsrc.version = _mhk->readUint16BE();
+	
+	if (_rsrc.version != 0x100)
+		error("Unsupported Mohawk resource version %d.%d", (_rsrc.version >> 8) & 0xff, _rsrc.version & 0xff);
+	
+	_rsrc.compaction = _mhk->readUint16BE(); // Only used in creation, not in reading
 	_rsrc.filesize = _mhk->readUint32BE();
 	_rsrc.abs_offset = _mhk->readUint32BE();
 	_rsrc.file_table_offset = _mhk->readUint16BE();

Modified: tools/trunk/engines/mohawk/archive.h
===================================================================
--- tools/trunk/engines/mohawk/archive.h	2010-01-26 23:05:52 UTC (rev 47583)
+++ tools/trunk/engines/mohawk/archive.h	2010-01-26 23:23:10 UTC (rev 47584)
@@ -170,7 +170,8 @@
 };
 
 struct RSRC_Header {
-	uint32 size;
+	uint16 version;
+	uint16 compaction;
 	uint32 filesize;
 	uint32 abs_offset;
 	uint16 file_table_offset;


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