diff options
| author | Filippos Karapetis | 2010-06-13 22:15:30 +0000 |
|---|---|---|
| committer | Filippos Karapetis | 2010-06-13 22:15:30 +0000 |
| commit | b5ebd40d614ab7b1c2f1408750c09f528b7ae2de (patch) | |
| tree | 2eb8b6da50501982a0612102c3e0a916773e3f0a /engines/sci/engine/segment.cpp | |
| parent | 01d53a62165d229b88db11647ffe40ff2502d7b4 (diff) | |
| download | scummvm-rg350-b5ebd40d614ab7b1c2f1408750c09f528b7ae2de.tar.gz scummvm-rg350-b5ebd40d614ab7b1c2f1408750c09f528b7ae2de.tar.bz2 scummvm-rg350-b5ebd40d614ab7b1c2f1408750c09f528b7ae2de.zip | |
The offset of script local variables is now calculated when the script is loaded, thus we no longer need to save it. Merged scriptInitialiseLocals() with scriptInitialiseLocalsZero()
svn-id: r49640
Diffstat (limited to 'engines/sci/engine/segment.cpp')
| -rw-r--r-- | engines/sci/engine/segment.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp index 0e0a759d4b..4b3df11d8f 100644 --- a/engines/sci/engine/segment.cpp +++ b/engines/sci/engine/segment.cpp @@ -197,6 +197,7 @@ void Script::load(ResourceManager *resMan) { if (READ_LE_UINT16(_buf + 1 + 5) > 0) { _exportTable = (const uint16 *)(_buf + 1 + 5 + 2); _numExports = READ_SCI11ENDIAN_UINT16(_exportTable - 1); + _localsOffset = _scriptSize + 4; } } else { _exportTable = (const uint16 *)findBlock(SCI_OBJ_EXPORTS); @@ -209,6 +210,9 @@ void Script::load(ResourceManager *resMan) { _numSynonyms = READ_SCI11ENDIAN_UINT16(_synonyms + 2) / 4; _synonyms += 4; // skip header } + const byte* localsBlock = findBlock(SCI_OBJ_LOCALVARS); + if (localsBlock) + _localsOffset = localsBlock - _buf + 4; } } |
