From d2f5023ee9ec5534a9f7a4754c4f1e805c0fb605 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 8 Jun 2019 13:57:00 +0300 Subject: SCI: Do not apply script patches when checking for static selectors Fixes bug #10969 --- engines/sci/engine/script.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'engines/sci/engine/script.h') diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index f4afca7681..e1a4b9613b 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -133,7 +133,7 @@ public: ~Script(); void freeScript(const bool keepLocalsSegment = false); - void load(int script_nr, ResourceManager *resMan, ScriptPatcher *scriptPatcher); + void load(int script_nr, ResourceManager *resMan, ScriptPatcher *scriptPatcher, bool applyScriptPatches = true); virtual bool isValidOffset(uint32 offset) const; virtual SegmentRef dereference(reg_t pointer); @@ -180,10 +180,11 @@ public: /** * Initializes the script's objects (SCI0) - * @param segMan A reference to the segment manager - * @param segmentId The script's segment id + * @param segMan A reference to the segment manager + * @param segmentId The script's segment id + * @param applyScriptPatches Apply patches for the script, if available */ - void initializeObjects(SegManager *segMan, SegmentId segmentId); + void initializeObjects(SegManager *segMan, SegmentId segmentId, bool applyScriptPatches); // script lock operations @@ -336,10 +337,11 @@ private: /** * Initializes the script's objects (SCI1.1 - SCI2.1) - * @param segMan A reference to the segment manager - * @param segmentId The script's segment id + * @param segMan A reference to the segment manager + * @param segmentId The script's segment id + * @applyScriptPatches Apply patches for the script, if available */ - void initializeObjectsSci11(SegManager *segMan, SegmentId segmentId); + void initializeObjectsSci11(SegManager *segMan, SegmentId segmentId, bool applyScriptPatches); #ifdef ENABLE_SCI32 /** @@ -347,7 +349,7 @@ private: * @param segMan A reference to the segment manager * @param segmentId The script's segment id */ - void initializeObjectsSci3(SegManager *segMan, SegmentId segmentId); + void initializeObjectsSci3(SegManager *segMan, SegmentId segmentId, bool applyScriptPatches); #endif LocalVariables *allocLocalsSegment(SegManager *segMan); -- cgit v1.2.3