[Scummvm-cvs-logs] CVS: tools compress_san.cpp,1.1,1.2

Pawel Kolodziejski aquadran at users.sourceforge.net
Tue Apr 13 12:51:11 CEST 2004


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

Modified Files:
	compress_san.cpp 
Log Message:
add endianes

Index: compress_san.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/compress_san.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- compress_san.cpp	13 Apr 2004 19:25:02 -0000	1.1
+++ compress_san.cpp	13 Apr 2004 19:36:39 -0000	1.2
@@ -89,6 +89,7 @@
 	for (l = 0; l < nbframes; l++) {
 		printf("frame: %d\n", l);
 		tag = readUint32BE(input); // chunk tag
+		assert(tag != TO_BE_32('FRME'));
 		writeUint32BE(output, tag); // FRME
 		int32 frameSize = readUint32BE(input); // FRME size
 		frameInfo[l].frameSize = frameSize;
@@ -98,10 +99,10 @@
 			tag = readUint32BE(input); // chunk tag
 			if (feof(input))
 				break;
-			if (tag == 'FRME') {
+			if (tag == TO_BE_32('FRME')) {
 				fseek(input, -4, SEEK_CUR);
 				break;
-			} else if (tag != 'FOBJ') {
+			} else if (tag != TO_BE_32('FOBJ')) {
 				size = readUint32BE(input); // chunk size
 				writeUint32BE(output, tag);
 				writeUint32BE(output, size);
@@ -110,7 +111,7 @@
 				for (int k = 0; k < size; k++) {
 					writeByte(output, readByte(input)); // chunk datas
 				}
-			} else if (tag == 'FOBJ') {
+			} else if (tag == TO_BE_32('FOBJ')) {
 				size = readUint32BE(input); // FOBJ size
 				if ((size & 1) != 0)
 					size++;
@@ -128,7 +129,7 @@
 					outputSize++;
 				frameInfo[l].fobjDecompressedSize = size;
 				frameInfo[l].fobjCompressedSize = outputSize;
-				writeUint32BE(output, 'ZFOB');
+				writeUint32BE(output, TO_BE_32('ZFOB'));
 				writeUint32BE(output, outputSize + 4);
 				writeUint32BE(output, size);
 				for (int k = 0; k < outputSize; k++) {





More information about the Scummvm-git-logs mailing list