From faef4ab349df5cd206fe2e5dfc666f76be3b60ec Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 21 Jun 2010 14:44:18 +0000 Subject: Check against the signature of Groovie v2 cursors with MKID_BE, makes it easier to see what it's doing. svn-id: r50114 --- engines/groovie/cursor.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/engines/groovie/cursor.cpp b/engines/groovie/cursor.cpp index 3f304c7859..2d0a2df245 100644 --- a/engines/groovie/cursor.cpp +++ b/engines/groovie/cursor.cpp @@ -403,18 +403,15 @@ GrvCursorMan_v2::GrvCursorMan_v2(OSystem *system) : // Open the icons file Common::File iconsFile; - if (!iconsFile.open("icons.ph")) { + if (!iconsFile.open("icons.ph")) error("Groovie::Cursor: Couldn't open icons.ph"); - return; - } // Verify the signature - uint32 tmp32 = iconsFile.readUint32LE(); + uint32 tmp32 = iconsFile.readUint32BE(); uint16 tmp16 = iconsFile.readUint16LE(); - if (tmp32 != 0x6e6f6369 || tmp16 != 1) { - error("Groovie::Cursor: icons.ph signature failed: %04X %d", tmp32, tmp16); - return; - } + if (tmp32 != MKID_BE('icon') || tmp16 != 1) + error("Groovie::Cursor: icons.ph signature failed: %s %d", tag2str(tmp32), tmp16); + // Read the number of icons uint16 nicons = iconsFile.readUint16LE(); -- cgit v1.2.3