From 8bdffcb2fb7aefc96aa10fde1bebd372233cac9d Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Wed, 4 Dec 2013 20:42:16 +0100 Subject: SCI: script patcher is now a separate class --- engines/sci/engine/script.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/sci/engine/script.cpp') diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 6616a0ee13..c661a00185 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -32,7 +32,8 @@ namespace Sci { -Script::Script() : SegmentObj(SEG_TYPE_SCRIPT), _buf(NULL) { +Script::Script() + : SegmentObj(SEG_TYPE_SCRIPT), _buf(NULL) { freeScript(); } @@ -65,7 +66,7 @@ void Script::freeScript() { _objects.clear(); } -void Script::load(int script_nr, ResourceManager *resMan) { +void Script::load(int script_nr, ResourceManager *resMan, ScriptPatcher *scriptPatcher) { freeScript(); Resource *script = resMan->findResource(ResourceId(kResourceTypeScript, script_nr), 0); @@ -136,7 +137,7 @@ void Script::load(int script_nr, ResourceManager *resMan) { memcpy(_buf, script->data, script->size); // Check scripts for matching signatures and patch those, if found - patcherProcessScript(_nr, _buf, script->size); + scriptPatcher->processScript(_nr, _buf, script->size); if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1) { Resource *heap = resMan->findResource(ResourceId(kResourceTypeHeap, _nr), 0); -- cgit v1.2.3