diff options
author | Max Horn | 2003-04-12 12:03:55 +0000 |
---|---|---|
committer | Max Horn | 2003-04-12 12:03:55 +0000 |
commit | 95f6141c7145a55805c7249740fdb734f994ce78 (patch) | |
tree | 51fe3bcad4a071add6cfdfe8b23ba90cb2cdbd59 /scumm | |
parent | a236803241fb1ba81a1bd25e8b78ec7fe8d8d3f9 (diff) | |
download | scummvm-rg350-95f6141c7145a55805c7249740fdb734f994ce78.tar.gz scummvm-rg350-95f6141c7145a55805c7249740fdb734f994ce78.tar.bz2 scummvm-rg350-95f6141c7145a55805c7249740fdb734f994ce78.zip |
fixed OLD_BUNDLE entry script (d'oh!) and dump entry/exit script for OLD_BUNDLE games, too
svn-id: r6985
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/scummvm.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 71c7f5b12b..bf195b8ec1 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -884,6 +884,9 @@ void Scumm::initRoomSubBlocks() { else rmhd = (RoomHeader *)findResourceData(MKID('RMHD'), roomptr); + // + // Determine the room dimensions (width/height) + // if (_features & GF_AFTER_V8) { _scrWidth = READ_LE_UINT32(&(rmhd->v8.width)); _scrHeight = READ_LE_UINT32(&(rmhd->v8.height)); @@ -895,6 +898,9 @@ void Scumm::initRoomSubBlocks() { _scrHeight = READ_LE_UINT16(&(rmhd->old.height)); } + // + // Find the room image data + // if (_features & GF_OLD_BUNDLE) _IM00_offs = READ_LE_UINT16(roomptr + 0x0A); else if (_features & GF_SMALL_HEADER) @@ -913,30 +919,35 @@ void Scumm::initRoomSubBlocks() { _IM00_offs = findResource(MKID('IM00'), findResource(MKID('RMIM'), roomptr)) - roomptr; + // // Look for an exit script + // if (_features & GF_OLD_BUNDLE) _EXCD_offs = READ_LE_UINT16(roomptr + 0x19); else { ptr = findResourceData(MKID('EXCD'), roomResPtr); - if (ptr) { + if (ptr) _EXCD_offs = ptr - roomResPtr; - if (_dumpScripts) - dumpResource("exit-", _roomResource, ptr - _resourceHeaderSize); - } } + if (_dumpScripts && _EXCD_offs) + dumpResource("exit-", _roomResource, roomResPtr + _EXCD_offs - _resourceHeaderSize); + // // Look for an entry script + // if (_features & GF_OLD_BUNDLE) - _EXCD_offs = READ_LE_UINT16(roomptr + 0x1B); + _ENCD_offs = READ_LE_UINT16(roomptr + 0x1B); else { ptr = findResourceData(MKID('ENCD'), roomResPtr); - if (ptr) { + if (ptr) _ENCD_offs = ptr - roomResPtr; - if (_dumpScripts) - dumpResource("entry-", _roomResource, ptr - _resourceHeaderSize); - } } + if (_dumpScripts && _ENCD_offs) + dumpResource("entry-", _roomResource, roomResPtr + _ENCD_offs - _resourceHeaderSize); + // + // Load box data + // if (_features & GF_SMALL_HEADER) { if (_features & GF_OLD_BUNDLE) ptr = roomptr + READ_LE_UINT16(roomptr + 0x15); |