From 125a061a9650297d81a76cc8e77033ca099191b0 Mon Sep 17 00:00:00 2001 From: richiesams Date: Thu, 18 Jul 2013 14:43:16 -0500 Subject: ZVISION: Convert to using MKTAG() instead of checking each char individually --- engines/zvision/image.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/zvision/image.cpp b/engines/zvision/image.cpp index 981308fa31..6e6b802739 100644 --- a/engines/zvision/image.cpp +++ b/engines/zvision/image.cpp @@ -42,11 +42,11 @@ void ZVision::renderImageToScreen(const Common::String &fileName, uint32 x, uint // Read the magic number // Some files are true TGA, while others are TGZ - char fileType[4]; - file.read(fileType, 4); + uint32 fileType; + fileType = file.readUint32BE(); // Check for TGZ files - if (fileType[0] == 'T' && fileType[1] == 'G' && fileType[2] == 'Z' && fileType[3] == '\0') { + if (fileType == MKTAG('T', 'G', 'Z', '\0')) { // TGZ files have a header and then Bitmap data that is compressed with LZSS uint32 decompressedSize = file.readSint32LE(); uint32 width = file.readSint32LE(); -- cgit v1.2.3