[Scummvm-cvs-logs] SF.net SVN: scummvm: [21096] tools/trunk/descumm-tool.cpp

kirben at users.sourceforge.net kirben at users.sourceforge.net
Sun Mar 5 16:37:08 CET 2006


Revision: 21096
Author:   kirben
Date:     2006-03-05 05:02:06 -0800 (Sun, 05 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm?rev=21096&view=rev

Log Message:
-----------
Fix detection of SCUMM4 script headers

Modified Paths:
--------------
    tools/trunk/descumm-tool.cpp
Modified: tools/trunk/descumm-tool.cpp
===================================================================
--- tools/trunk/descumm-tool.cpp	2006-03-05 12:29:13 UTC (rev 21095)
+++ tools/trunk/descumm-tool.cpp	2006-03-05 13:02:06 UTC (rev 21096)
@@ -346,7 +346,8 @@
 			printf("File too small to be a script\n");
 			return 1;
 		}
-		switch (READ_BE_UINT16(mem + 2)) {
+		uint offs = (scriptVersion == 4) ? 4 : 2;
+		switch (READ_BE_UINT16(mem + offs)) {
 		case 'LS':
 			printf("Script# %d\n", (byte)mem[6]);
 			mem += 7;







More information about the Scummvm-git-logs mailing list