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/sci.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 065565d8de..69a7c0bc56 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -38,6 +38,7 @@ #include "sci/engine/state.h" #include "sci/engine/kernel.h" #include "sci/engine/script.h" // for script_adjust_opcode_formats +#include "sci/engine/script_patches.h" #include "sci/engine/selector.h" // for SELECTOR #include "sci/sound/audio.h" @@ -184,6 +185,7 @@ SciEngine::~SciEngine() { delete[] _opcode_formats; + delete _scriptPatcher; delete _resMan; // should be deleted last g_sci = 0; } @@ -217,8 +219,9 @@ Common::Error SciEngine::run() { // Add the after market GM patches for the specified game, if they exist _resMan->addNewGMPatch(_gameId); _gameObjectAddress = _resMan->findGameObject(); - - SegManager *segMan = new SegManager(_resMan); + + _scriptPatcher = new ScriptPatcher(); + SegManager *segMan = new SegManager(_resMan, _scriptPatcher); // Initialize the game screen _gfxScreen = new GfxScreen(_resMan); -- cgit v1.2.3