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/m4/font.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/m4/font.cpp')
-rw-r--r-- | engines/m4/font.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/m4/font.cpp b/engines/m4/font.cpp index cba32c2225..3ed419675d 100644 --- a/engines/m4/font.cpp +++ b/engines/m4/font.cpp @@ -81,7 +81,7 @@ Font::Font(MadsM4Engine *vm, const char *filename) : _vm(vm) { void Font::setFontM4(const char *filename) { Common::SeekableReadStream *fontFile = _vm->res()->openFile(filename); - if (fontFile->readUint32LE() != MKID_BE('FONT')) { + if (fontFile->readUint32LE() != MKTAG('F','O','N','T')) { debugCN(kDebugGraphics, "Font::Font: FONT tag expected\n"); return; } @@ -92,7 +92,7 @@ void Font::setFontM4(const char *filename) { //debugCN(kDebugGraphics, "Font::Font: _maxWidth = %d, _maxHeight = %d, fontSize = %d\n", _maxWidth, _maxHeight, fontSize); - if (fontFile->readUint32LE() != MKID_BE('WIDT')) { + if (fontFile->readUint32LE() != MKTAG('W','I','D','T')) { debugCN(kDebugGraphics, "Font::Font: WIDT tag expected\n"); return; } @@ -100,7 +100,7 @@ void Font::setFontM4(const char *filename) { _charWidths = new uint8[256]; fontFile->read(_charWidths, 256); - if (fontFile->readUint32LE() != MKID_BE('OFFS')) { + if (fontFile->readUint32LE() != MKTAG('O','F','F','S')) { debugCN(kDebugGraphics, "Font::Font: OFFS tag expected\n"); return; } @@ -110,7 +110,7 @@ void Font::setFontM4(const char *filename) { for (int i = 0; i < 256; i++) _charOffs[i] = fontFile->readUint16LE(); - if (fontFile->readUint32LE() != MKID_BE('PIXS')) { + if (fontFile->readUint32LE() != MKTAG('P','I','X','S')) { debugCN(kDebugGraphics, "Font::Font: PIXS tag expected\n"); return; } |