[Scummvm-cvs-logs] SF.net SVN: scummvm: [22196] tools/trunk/encode_dxa.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Thu Apr 27 17:43:25 CEST 2006


Revision: 22196
Author:   eriktorbjorn
Date:     2006-04-27 17:42:33 -0700 (Thu, 27 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22196&view=rev

Log Message:
-----------
Use readUint32LE() to extract header information from the SMK file. Also, if
the "Y-doubled" flag is set, the RAD Video Tools will already have scaled the
frames to twice the height indicated in the header. Compensate for that. (This
is not used in any of the Feeble Files cutscenes - not in the 2CD version, at
least - but Broken Sword 1 uses it for several.)

Modified Paths:
--------------
    tools/trunk/encode_dxa.cpp
Modified: tools/trunk/encode_dxa.cpp
===================================================================
--- tools/trunk/encode_dxa.cpp	2006-04-27 23:16:45 UTC (rev 22195)
+++ tools/trunk/encode_dxa.cpp	2006-04-28 00:42:33 UTC (rev 22196)
@@ -358,14 +358,25 @@
 		exit(-1);
 	}
 
-	uint32 sig;
+	uint32 flags;
 
-	fread(&sig, 4, 1, smk);
-	fread(&width, 4, 1, smk);
-	fread(&height, 4, 1, smk);
-	fread(&frames, 4, 1, smk);
-	fread(&framerate, 4, 1, smk);
+	// Skip the signature. We could use it to verify that it's a SMK file,
+	// but if it wasn't, how did we ever extract the PNG frames from it?
 
+	readUint32LE(smk);
+
+	width = readUint32LE(smk);
+	height = readUint32LE(smk);
+	frames = readUint32LE(smk);
+	framerate = readUint32LE(smk);
+	flags = readUint32LE(smk);
+
+	// If the Y-doubled flag is set, the RAD Video Tools will have scaled
+	// the frames to twice their original height.
+
+	if (flags & 0x04)
+		height *= 2;
+
 	fclose(smk);
 }
 


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