[Scummvm-cvs-logs] CVS: scummvm sound.cpp,1.83,1.84
James Brown
ender at users.sourceforge.net
Wed May 8 20:52:03 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv27683
Modified Files:
sound.cpp
Log Message:
Revert incorrect endian fixes.
If there's something wrong here, it's with the MKID_BE define in scummsys.h, not this code.
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound.cpp,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- sound.cpp 8 May 2002 20:50:07 -0000 1.83
+++ sound.cpp 9 May 2002 03:51:51 -0000 1.84
@@ -693,7 +693,11 @@
int num = fileReadDwordBE(_sfxFile);
fileReadDwordBE(_sfxFile); fileReadDwordBE(_sfxFile);
- if (tag != MKID('COMP')) {
+
+ // DO -NOT- change these MKID_BE calls to MKID! If you have
+ // to do so, then your ScummSys.H file is detecting the
+ // wrong endian. - Ender
+ if (tag != MKID_BE('COMP')) {
warning("Compressed sound %d invalid (%c%c%c%c)", index, tag>>24, tag>>16, tag>>8, tag);
return;
}
@@ -764,27 +768,27 @@
byte *ptr = CompFinal;
int tag, size;
tag = READ_BE_UINT32(ptr); ptr+=4;
- if (tag != MKID('iMUS')) {
+ if (tag != MKID_BE('iMUS')) {
warning("Decompression of bundle sound failed");
free(CompFinal);
return;
}
ptr+=12; /* Skip header */
- while(tag != MKID('DATA')) {
+ while(tag != MKID_BE('DATA')) {
tag = READ_BE_UINT32(ptr); ptr+=4;
switch(tag) {
- case MKID('FRMT'):
+ case MKID_BE('FRMT'):
size = READ_BE_UINT32(ptr); ptr+=16;
rate = READ_BE_UINT32(ptr); ptr+=8;
break;
- case MKID('TEXT'):
- case MKID('REGN'):
- case MKID('STOP'):
+ case MKID_BE('TEXT'):
+ case MKID_BE('REGN'):
+ case MKID_BE('STOP'):
size = READ_BE_UINT32(ptr); ptr+=size+4;
break;
- case MKID('DATA'):
+ case MKID_BE('DATA'):
size = READ_BE_UINT32(ptr); ptr+=4;
break;
More information about the Scummvm-git-logs
mailing list