diff options
author | Strangerke | 2013-01-30 00:17:08 +0100 |
---|---|---|
committer | Strangerke | 2013-01-30 00:17:08 +0100 |
commit | e68e3c91ebb089cf31f305f18199bb3a9ccca612 (patch) | |
tree | 67a04040f354eb4233ed8ba9e4c76ef9e73bd53e | |
parent | 3b63e28a39cd80ada4c67ee17536566424e0d573 (diff) | |
download | scummvm-rg350-e68e3c91ebb089cf31f305f18199bb3a9ccca612.tar.gz scummvm-rg350-e68e3c91ebb089cf31f305f18199bb3a9ccca612.tar.bz2 scummvm-rg350-e68e3c91ebb089cf31f305f18199bb3a9ccca612.zip |
HOPKINS: USe MKTAG where possible
-rw-r--r-- | engines/hopkins/anim.cpp | 6 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 7e7c621a8e..ec256eb05d 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -489,7 +489,7 @@ void AnimationManager::loadAnim(const Common::String &animName) { f.read(filename5, 15); f.read(filename6, 15); - if (header[0] != 'A' || header[1] != 'N' || header[2] != 'I' || header[3] != 'S') + if (READ_BE_UINT32(header) != MKTAG('A', 'N', 'I', 'S')) error("Invalid animation File: %s", filename.c_str()); const char *files[6] = { &filename1[0], &filename2[0], &filename3[0], &filename4[0], @@ -622,14 +622,14 @@ void AnimationManager::searchAnim(const byte *data, int animIndex, int count) { v21 = 0; bool loopCond = false; do { - if (data[v21] == 'A' && data[v21 + 1] == 'N' && data[v21 + 2] == 'I' && data[v21 + 3] == 'M') { + if (READ_BE_UINT32(&data[v21]) == MKTAG('A', 'N', 'I', 'M')) { int entryIndex = data[v21 + 4]; if (animIndex == entryIndex) { v6 = v21 + 5; v7 = 0; bool innerLoopCond = false; do { - if ((data[v6] == 'A' && data[v6 + 1] == 'N' && data[v6 + 2] == 'I' && data[v6 + 3] == 'M') || + if (READ_BE_UINT32(&data[v6]) == MKTAG('A', 'N', 'I', 'M') || (data[v6] == 'F' && data[v6 + 1] == 'I' && data[v6 + 2] == 'N')) innerLoopCond = true; if (count < v6) { diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 3e88415383..5e265dbeff 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -633,7 +633,7 @@ void TalkManager::startCharacterAnim0(int startIdx, bool readOnlyFl) { int animIdx = 0; size_t curIdx = startIdx; for (;;) { - if (_characterBuffer[curIdx] == 'A' && _characterBuffer[curIdx + 1] == 'N' && _characterBuffer[curIdx + 2] == 'I' && _characterBuffer[curIdx + 3] == 'M' && _characterBuffer[curIdx + 4] == 1) { + if (READ_BE_UINT32(&_characterBuffer[curIdx]) == MKTAG('A', 'N', 'I', 'M') && _characterBuffer[curIdx + 4] == 1) { animIdx = curIdx; break; } |