diff options
author | Max Horn | 2011-04-12 16:53:15 +0200 |
---|---|---|
committer | Max Horn | 2011-04-12 16:53:15 +0200 |
commit | 0ce2ca4e006a70d787481040fa844c85aac43222 (patch) | |
tree | 25fb61d7e7165ec2570ecf14a4af52e9bdb6b176 /engines/queen/resource.cpp | |
parent | a8b3501252c46c3fc4fd129fa0a945eb87f47d0a (diff) | |
download | scummvm-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/queen/resource.cpp')
-rw-r--r-- | engines/queen/resource.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/queen/resource.cpp b/engines/queen/resource.cpp index a70d1f1613..e8519ee68b 100644 --- a/engines/queen/resource.cpp +++ b/engines/queen/resource.cpp @@ -132,7 +132,7 @@ void Resource::loadTextFile(const char *filename, Common::StringArray &stringLis bool Resource::detectVersion(DetectedGameVersion *ver, Common::File *f) { memset(ver, 0, sizeof(DetectedGameVersion)); - if (f->readUint32BE() == MKID_BE('QTBL')) { + if (f->readUint32BE() == MKTAG('Q','T','B','L')) { f->read(ver->str, 6); f->skip(2); ver->compression = f->readByte(); @@ -269,7 +269,7 @@ void Resource::seekResourceFile(int num, uint32 offset) { void Resource::readTableFile(uint8 version, uint32 offset) { Common::File tableFile; tableFile.open(_tableFilename); - if (tableFile.isOpen() && tableFile.readUint32BE() == MKID_BE('QTBL')) { + if (tableFile.isOpen() && tableFile.readUint32BE() == MKTAG('Q','T','B','L')) { uint32 tableVersion = tableFile.readUint32BE(); if (version > tableVersion) { error("The game you are trying to play requires version %d of queen.tbl, " |