diff options
author | Filippos Karapetis | 2019-06-08 13:57:00 +0300 |
---|---|---|
committer | Filippos Karapetis | 2019-06-08 13:57:34 +0300 |
commit | d2f5023ee9ec5534a9f7a4754c4f1e805c0fb605 (patch) | |
tree | 11bfdde4332ab07727c9fba812ff13fe4b21858d /engines/sci/engine/seg_manager.h | |
parent | 3915be8ff1cbb0a5aa9a63cb443829578d97e745 (diff) | |
download | scummvm-rg350-d2f5023ee9ec5534a9f7a4754c4f1e805c0fb605.tar.gz scummvm-rg350-d2f5023ee9ec5534a9f7a4754c4f1e805c0fb605.tar.bz2 scummvm-rg350-d2f5023ee9ec5534a9f7a4754c4f1e805c0fb605.zip |
SCI: Do not apply script patches when checking for static selectors
Fixes bug #10969
Diffstat (limited to 'engines/sci/engine/seg_manager.h')
-rw-r--r-- | engines/sci/engine/seg_manager.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h index d13edf0ef2..fdef0b6463 100644 --- a/engines/sci/engine/seg_manager.h +++ b/engines/sci/engine/seg_manager.h @@ -98,10 +98,11 @@ public: * Determines the segment occupied by a certain script. Optionally * load it, or load & lock it. * @param[in] script_nr Number of the script to look up - * @param[in] load flag determining whether to load/lock the script - * @return The script's segment ID, or 0 on failure + * @param[in] load Flag determining whether to load/lock the script + * @param[in] applyScriptPatches Apply patches for the script, if available + * @return The script's segment ID, or 0 on failure */ - SegmentId getScriptSegment(int script_nr, ScriptLoadType load); + SegmentId getScriptSegment(int script_nr, ScriptLoadType load, bool applyScriptPatches = true); /** * Makes sure that a script and its superclasses get loaded to the heap. @@ -109,10 +110,11 @@ public: * increased. All scripts containing superclasses of this script are loaded * recursively as well, unless 'recursive' is set to zero. The * complementary function is "uninstantiateScript()" below. - * @param[in] script_nr The script number to load - * @return The script's segment ID or 0 if out of heap + * @param[in] script_nr The script number to load + * @param[in] applyScriptPatches Apply patches for the script, if available + * @return The script's segment ID or 0 if out of heap */ - int instantiateScript(int script_nr); + int instantiateScript(int script_nr, bool applyScriptPatches = true); /** * Decreases the numer of lockers of a script and unloads it if that number @@ -128,7 +130,7 @@ private: public: // TODO: document this - reg_t getClassAddress(int classnr, ScriptLoadType lock, uint16 callerSegment); + reg_t getClassAddress(int classnr, ScriptLoadType lock, uint16 callerSegment, bool applyScriptPatches = true); /** * Return a pointer to the specified script. |