aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2010-06-21 14:44:18 +0000
committerMatthew Hoops2010-06-21 14:44:18 +0000
commitfaef4ab349df5cd206fe2e5dfc666f76be3b60ec (patch)
tree5ecd8015335f18d4a746a06b41aece9ec7960aa5
parentb5a25a6e1988c11929fe68cc9e5786bf738b21ce (diff)
downloadscummvm-rg350-faef4ab349df5cd206fe2e5dfc666f76be3b60ec.tar.gz
scummvm-rg350-faef4ab349df5cd206fe2e5dfc666f76be3b60ec.tar.bz2
scummvm-rg350-faef4ab349df5cd206fe2e5dfc666f76be3b60ec.zip
Check against the signature of Groovie v2 cursors with MKID_BE, makes it easier to see what it's doing.
svn-id: r50114
-rw-r--r--engines/groovie/cursor.cpp13
1 files 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();