aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2011-05-13 14:26:35 +0200
committerMax Horn2011-05-13 14:26:35 +0200
commitd63c2d17c210f2cc0b5bf5ddc914f827b42b8511 (patch)
tree86bec336ab38782efa9d8c39647f5dc0751d8137 /engines/scumm
parent1faf89c524ff734ad40a13ab85a84f465e54e1ce (diff)
downloadscummvm-rg350-d63c2d17c210f2cc0b5bf5ddc914f827b42b8511.tar.gz
scummvm-rg350-d63c2d17c210f2cc0b5bf5ddc914f827b42b8511.tar.bz2
scummvm-rg350-d63c2d17c210f2cc0b5bf5ddc914f827b42b8511.zip
SCUMM: Improve and document res tag sanity check
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/resource.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index b5cfa40534..8eb41ecdfb 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -662,9 +662,17 @@ int ScummEngine::loadResource(ResType type, ResId idx) {
}
// Sanity check: Is this the right tag for this resource type?
+ //
+ // Currently disabled for newer HE games because they use different
+ // tags. For example, for rtRoom, 'ROOM' changed to 'RMDA'; and for
+ // rtImage, 'AWIZ' and 'MULT' can both occur simultaneously.
+ // On the long run, it would be preferable to not turn this check off,
+ // but instead to explicitly support the variations in the HE games.
tag = _fileHandle->readUint32BE();
if (tag != _res->_types[type]._tag && _game.heversion < 70) {
- error("%s %d not in room %d at %d+%d in file %s",
+ error("Unknown res tag '%s' encountered (expected '%s') "
+ "while trying to load res (%s,%d) in room %d at %d+%d in file %s",
+ tag2str(tag), tag2str(_res->_types[type]._tag),
nameOfResType(type), idx, roomNr,
_fileOffset, fileOffs, _fileHandle->getName());
}