diff options
-rw-r--r-- | scumm/scumm.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 6bd27d89a5..daa44b8b92 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -2709,6 +2709,23 @@ void ScummEngine::initRoomSubBlocks() { _localScriptList[id - _numGlobalScripts] = ptr + 1 - roomptr; } + } else if (_heversion >= 99) { + ResourceIterator localScriptIterator(searchptr, false); + while ((ptr = localScriptIterator.findNext(MKID('LSC2'))) != NULL) { + int id = 0; + + ptr += _resourceHeaderSize; /* skip tag & size */ + + id = READ_LE_UINT32(ptr); + //checkRange(NUM_LOCALSCRIPT + _numGlobalScripts, _numGlobalScripts, id, "Invalid local script %d"); + _localScriptList[id - _numGlobalScripts] = ptr + 4 - roomResPtr; + + if (_dumpScripts) { + char buf[32]; + sprintf(buf, "room-%d-", _roomResource); + dumpResource(buf, id, ptr - _resourceHeaderSize); + } + } } else { ResourceIterator localScriptIterator(searchptr, false); while ((ptr = localScriptIterator.findNext(MKID('LSCR'))) != NULL) { |