diff options
author | Martin Kiewitz | 2013-12-04 20:42:16 +0100 |
---|---|---|
committer | Martin Kiewitz | 2013-12-04 20:42:16 +0100 |
commit | 8bdffcb2fb7aefc96aa10fde1bebd372233cac9d (patch) | |
tree | 9770e8c6a81342c05150ff19f42da318103d02ca /engines/sci/engine/script.cpp | |
parent | 37f72f56b2a9f3eee9b58001d212123d5295f5ec (diff) | |
download | scummvm-rg350-8bdffcb2fb7aefc96aa10fde1bebd372233cac9d.tar.gz scummvm-rg350-8bdffcb2fb7aefc96aa10fde1bebd372233cac9d.tar.bz2 scummvm-rg350-8bdffcb2fb7aefc96aa10fde1bebd372233cac9d.zip |
SCI: script patcher is now a separate class
Diffstat (limited to 'engines/sci/engine/script.cpp')
-rw-r--r-- | engines/sci/engine/script.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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); |