diff options
author | Filippos Karapetis | 2010-05-30 17:02:21 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-30 17:02:21 +0000 |
commit | 29c2f30558e9c40d5c1a76ab600611b21ee72851 (patch) | |
tree | 3d5374c9a67e6534ca6bf0063e3800124476139f /engines/sci/engine/segment.cpp | |
parent | 5cdb13b3e8a160e7eae14c03644ad3be5a38b415 (diff) | |
download | scummvm-rg350-29c2f30558e9c40d5c1a76ab600611b21ee72851.tar.gz scummvm-rg350-29c2f30558e9c40d5c1a76ab600611b21ee72851.tar.bz2 scummvm-rg350-29c2f30558e9c40d5c1a76ab600611b21ee72851.zip |
Unified the script loading code, and marked an issue with the SCI11 heap addresses
svn-id: r49329
Diffstat (limited to 'engines/sci/engine/segment.cpp')
-rw-r--r-- | engines/sci/engine/segment.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp index 30cfe2d046..8a9b953289 100644 --- a/engines/sci/engine/segment.cpp +++ b/engines/sci/engine/segment.cpp @@ -120,15 +120,6 @@ void Script::freeScript() { bool Script::init(int script_nr, ResourceManager *resMan) { setScriptSize(script_nr, resMan); - _buf = (byte *)malloc(_bufSize); - - if (!_buf) { - freeScript(); - warning("Not enough memory space for script size"); - _bufSize = 0; - return false; - } - _localsOffset = 0; _localsBlock = NULL; @@ -138,11 +129,8 @@ bool Script::init(int script_nr, ResourceManager *resMan) { _markedAsDeleted = false; _nr = script_nr; - - if (getSciVersion() >= SCI_VERSION_1_1) - _heapStart = _buf + _scriptSize; - else - _heapStart = _buf; + _buf = 0; + _heapStart = 0; return true; } |