Check against the signature of Groovie v2 cursors with MKID_BE, makes it easier to see what it's doing.

svn-id: r50114
This commit is contained in:
Matthew Hoops
2010-06-21 14:44:18 +00:00
parent b5a25a6e19
commit faef4ab349
+5 -8
View File
@@ -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();