From d63c2d17c210f2cc0b5bf5ddc914f827b42b8511 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 13 May 2011 14:26:35 +0200 Subject: SCUMM: Improve and document res tag sanity check --- engines/scumm/resource.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'engines/scumm') 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()); } -- cgit v1.2.3