diff options
author | Cameron Cawley | 2019-06-17 16:27:52 +0100 |
---|---|---|
committer | Filippos Karapetis | 2019-06-17 23:11:20 +0300 |
commit | afefb386178bd34594c9ac56144ccaed1fd007a3 (patch) | |
tree | 560189e4a04c2e52efdd2b5c70ec0c040922e5ae /engines/bladerunner/vqa_decoder.cpp | |
parent | b428c23c75efae41fa7d907f5676faf05bc338e0 (diff) | |
download | scummvm-rg350-afefb386178bd34594c9ac56144ccaed1fd007a3.tar.gz scummvm-rg350-afefb386178bd34594c9ac56144ccaed1fd007a3.tar.bz2 scummvm-rg350-afefb386178bd34594c9ac56144ccaed1fd007a3.zip |
BLADERUNNER: Replace strTag with tag2str
Diffstat (limited to 'engines/bladerunner/vqa_decoder.cpp')
-rw-r--r-- | engines/bladerunner/vqa_decoder.cpp | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/engines/bladerunner/vqa_decoder.cpp b/engines/bladerunner/vqa_decoder.cpp index e97d2383a9..3b230ef6c6 100644 --- a/engines/bladerunner/vqa_decoder.cpp +++ b/engines/bladerunner/vqa_decoder.cpp @@ -106,18 +106,6 @@ static inline uint32 roundup(uint32 v) { return (v + 1) & ~1u; } -const char *strTag(uint32 tag) { - static char s[5]; - - sprintf(s, "%c%c%c%c", - (tag >> 24) & 0xff, - (tag >> 16) & 0xff, - (tag >> 8) & 0xff, - (tag >> 0) & 0xff); - - return s; -} - VQADecoder::VQADecoder() { _s = nullptr; _frameInfo = nullptr; @@ -191,13 +179,13 @@ bool VQADecoder::loadStream(Common::SeekableReadStream *s) { case kMSCI: rc = readMSCI(s, chd.size); break; case kVQHD: rc = readVQHD(s, chd.size); break; default: - warning("Unhandled chunk '%s'", strTag(chd.id)); + warning("Unhandled chunk '%s'", tag2str(chd.id)); s->skip(roundup(chd.size)); rc = true; } if (!rc) { - warning("failed to handle chunk %s", strTag(chd.id)); + warning("failed to handle chunk %s", tag2str(chd.id)); return false; } } while (chd.id != kFINF); @@ -264,7 +252,7 @@ void VQADecoder::readPacket(uint readFlags) { } if (!rc) { - warning("VQADecoder::readPacket(): Error handling chunk %s", strTag(chd.id)); + warning("VQADecoder::readPacket(): Error handling chunk %s", tag2str(chd.id)); return; } } while (chd.id != kVQFR); @@ -364,7 +352,7 @@ bool VQADecoder::VQAVideoTrack::readVQFR(Common::SeekableReadStream *s, uint32 s } if (!rc) { - error("VQADecoder::VQAVideoTrack::readVQFR(): error handling chunk %s", strTag(chd.id)); + error("VQADecoder::VQAVideoTrack::readVQFR(): error handling chunk %s", tag2str(chd.id)); return false; } } @@ -404,7 +392,7 @@ bool VQADecoder::readMSCI(Common::SeekableReadStream *s, uint32 size) { _maxAESCChunkSize = max_size; break; default: - warning("Unknown tag in MSCT: %s", strTag(tag)); + warning("Unknown tag in MSCT: %s", tag2str(tag)); } uint32 zero; @@ -680,7 +668,7 @@ bool VQADecoder::VQAVideoTrack::readVQFL(Common::SeekableReadStream *s, uint32 s } if (!rc) { - warning("VQFL: error handling chunk %s", strTag(chd.id)); + warning("VQFL: error handling chunk %s", tag2str(chd.id)); return false; } } |