aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/smush/saud_channel.cpp
diff options
context:
space:
mode:
authorMax Horn2011-04-12 16:53:15 +0200
committerMax Horn2011-04-12 16:53:15 +0200
commit0ce2ca4e006a70d787481040fa844c85aac43222 (patch)
tree25fb61d7e7165ec2570ecf14a4af52e9bdb6b176 /engines/scumm/smush/saud_channel.cpp
parenta8b3501252c46c3fc4fd129fa0a945eb87f47d0a (diff)
downloadscummvm-rg350-0ce2ca4e006a70d787481040fa844c85aac43222.tar.gz
scummvm-rg350-0ce2ca4e006a70d787481040fa844c85aac43222.tar.bz2
scummvm-rg350-0ce2ca4e006a70d787481040fa844c85aac43222.zip
COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler, and as such was always a bit unsafe. The new MKTAG macro is slightly less elegant, but does no longer depend on the behavior of the compiler. Inspired by FFmpeg, which has an almost identical macro.
Diffstat (limited to 'engines/scumm/smush/saud_channel.cpp')
-rw-r--r--engines/scumm/smush/saud_channel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/scumm/smush/saud_channel.cpp b/engines/scumm/smush/saud_channel.cpp
index 94df70633f..04ed955224 100644
--- a/engines/scumm/smush/saud_channel.cpp
+++ b/engines/scumm/smush/saud_channel.cpp
@@ -50,7 +50,7 @@ bool SaudChannel::handleSubTags(int32 &offset) {
uint32 available_size = _tbufferSize - offset;
switch (type) {
- case MKID_BE('STRK'):
+ case MKTAG('S','T','R','K'):
_inData = false;
if (available_size >= (size + 8)) {
int32 subSize = READ_BE_UINT32((byte *)_tbuffer + offset + 4);
@@ -60,14 +60,14 @@ bool SaudChannel::handleSubTags(int32 &offset) {
} else
return false;
break;
- case MKID_BE('SMRK'):
+ case MKTAG('S','M','R','K'):
_inData = false;
if (available_size >= (size + 8))
_markReached = true;
else
return false;
break;
- case MKID_BE('SHDR'):
+ case MKTAG('S','H','D','R'):
_inData = false;
if (available_size >= (size + 8)) {
int32 subSize = READ_BE_UINT32((byte *)_tbuffer + offset + 4);
@@ -76,7 +76,7 @@ bool SaudChannel::handleSubTags(int32 &offset) {
} else
return false;
break;
- case MKID_BE('SDAT'):
+ case MKTAG('S','D','A','T'):
_inData = true;
_dataSize = size;
offset += 8;
@@ -123,7 +123,7 @@ bool SaudChannel::appendData(Common::SeekableReadStream &b, int32 size) {
assert(size > 8);
uint32 saud_type = b.readUint32BE();
/*uint32 saud_size =*/ b.readUint32BE();
- if (saud_type != MKID_BE('SAUD'))
+ if (saud_type != MKTAG('S','A','U','D'))
error("Invalid Chunk for SaudChannel : %X", saud_type);
size -= 8;
_dataSize = -2;