diff options
author | Max Horn | 2003-04-12 17:59:24 +0000 |
---|---|---|
committer | Max Horn | 2003-04-12 17:59:24 +0000 |
commit | 32c7c4eb6bfdb9c8103b735c60700c58fcc1981a (patch) | |
tree | 8af7eccadebe558038b47236adc00e990e87c3f5 /scumm | |
parent | fb1409937e33ae9f64538d3a1be90ffe5909524a (diff) | |
download | scummvm-rg350-32c7c4eb6bfdb9c8103b735c60700c58fcc1981a.tar.gz scummvm-rg350-32c7c4eb6bfdb9c8103b735c60700c58fcc1981a.tar.bz2 scummvm-rg350-32c7c4eb6bfdb9c8103b735c60700c58fcc1981a.zip |
fixed (?) local script offests for OLD_BUNDLE games
svn-id: r6990
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/scummvm.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index bf195b8ec1..a118ba66e3 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -996,6 +996,9 @@ void Scumm::initRoomSubBlocks() { } } + // + // Load sccale data + // if (_features & GF_OLD_BUNDLE) ptr = 0; // TODO ? else @@ -1025,7 +1028,7 @@ void Scumm::initRoomSubBlocks() { } // - // Setup local script + // Setup local scripts // // Determine the room script base address @@ -1038,16 +1041,16 @@ void Scumm::initRoomSubBlocks() { int num_objects = *(roomResPtr + 20); int num_sounds = *(roomResPtr + 23); int num_scripts = *(roomResPtr + 24); - int offset = 29 + num_objects * 4 + num_sounds + num_scripts; + ptr = roomptr + 29 + num_objects * 4 + num_sounds + num_scripts; if ((_gameId != GID_MANIAC) && (_gameId != GID_ZAK)) { - for (;;) { - int id = *(roomResPtr + offset); - if (id == 0) - break; + while (*ptr) { + int id = *ptr; - _localScriptList[id - _numGlobalScripts] = offset + 1; - offset += 3; + _localScriptList[id - _numGlobalScripts] = READ_LE_UINT16(ptr + 1); + ptr += 3; + + // TODO: add script dumping, but how do we determine the script length? } } } else if (_features & GF_SMALL_HEADER) { |