aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/sound.cpp b/sound.cpp
index 5676befeea..eca38eed3a 100644
--- a/sound.cpp
+++ b/sound.cpp
@@ -693,7 +693,11 @@ void Scumm::decompressBundleSound(int index) {
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 @@ void Scumm::decompressBundleSound(int index) {
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;