[Scummvm-cvs-logs] CVS: tools compress_san.cpp,1.11,1.12

Pawel Kolodziejski aquadran at users.sourceforge.net
Wed Apr 28 10:59:04 CEST 2004


Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4864

Modified Files:
	compress_san.cpp 
Log Message:
improved previous fix and proper offset for flu

Index: compress_san.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/compress_san.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- compress_san.cpp	28 Apr 2004 14:11:38 -0000	1.11
+++ compress_san.cpp	28 Apr 2004 17:58:00 -0000	1.12
@@ -114,10 +114,8 @@
 				size = readUint32BE(input); // FOBJ size
 				if ((size & 1) != 0)
 					size++;
-				if (size < 100)
-					goto normal_block;
 				first_fobj = false;
-				unsigned long outputSize = size + (size / 9);
+				unsigned long outputSize = size + (size / 9) + 100;
 				byte *zlibInputBuffer = (byte *)malloc(size);
 				byte *zlibOutputBuffer = (byte *)malloc(outputSize);
 				for (int k = 0; k < size; k++) {
@@ -142,7 +140,6 @@
 				continue;
 			} else {
 				size = readUint32BE(input); // chunk size
-normal_block:
 				writeUint32BE(output, tag);
 				writeUint32BE(output, size);
 				if ((size & 1) != 0)
@@ -170,7 +167,7 @@
 	writeUint32BE(output, animChunkSize - sumDiff);
 
 	if (flu) {
-		fseek(flu, 0x310, SEEK_SET);
+		fseek(flu, 0x324, SEEK_SET);
 		for (l = 0; l < nbframes; l++) {
 			writeUint32LE(flu, frameInfo[l].offsetOutput - 4);
 		}





More information about the Scummvm-git-logs mailing list