diff options
-rw-r--r-- | engines/titanic/true_talk/script_handler.cpp | 18 | ||||
-rw-r--r-- | engines/titanic/true_talk/script_handler.h | 8 |
2 files changed, 20 insertions, 6 deletions
diff --git a/engines/titanic/true_talk/script_handler.cpp b/engines/titanic/true_talk/script_handler.cpp index a5f00868bc..470a1fc807 100644 --- a/engines/titanic/true_talk/script_handler.cpp +++ b/engines/titanic/true_talk/script_handler.cpp @@ -21,6 +21,7 @@ */ #include "titanic/true_talk/script_handler.h" +#include "titanic/true_talk/tt_concept.h" #include "titanic/true_talk/tt_sentence.h" #include "titanic/true_talk/tt_parser.h" #include "titanic/titanic.h" @@ -32,7 +33,8 @@ namespace Titanic { CScriptHandler::CScriptHandler(CTitleEngine *owner, int val1, int val2) : _owner(owner), _script(owner->_script), _resources(g_vm->_exeResources), _sub1(), _parser(this), _field10(0), _inputCtr(0), - _field20(0), _field24(0), _field28(0), _field2C(0), _field30(0) { + _concept1P(nullptr), _concept2P(nullptr), _concept3P(nullptr), + _concept4P(nullptr), _field30(0) { g_vm->_scriptHandler = this; g_vm->_script = _script; g_vm->_exeResources.reset(this, val1, val2); @@ -41,6 +43,10 @@ CScriptHandler::CScriptHandler(CTitleEngine *owner, int val1, int val2) : CScriptHandler::~CScriptHandler() { delete _vocab; + delete _concept1P; + delete _concept2P; + delete _concept3P; + delete _concept4P; } ScriptChangedResult CScriptHandler::scriptChanged(TTroomScript *roomScript, TTnpcScript *npcScript, uint dialogueId) { @@ -56,7 +62,15 @@ ScriptChangedResult CScriptHandler::scriptChanged(TTroomScript *roomScript, TTnp if (result != SCR_3 && result != SCR_4) return result; - error("TODO: CScriptHandler::scriptChanged"); + ++_inputCtr; + delete _concept1P; + delete _concept2P; + delete _concept3P; + delete _concept4P; + _concept1P = nullptr; + _concept2P = nullptr; + _concept3P = nullptr; + _concept4P = nullptr; } int CScriptHandler::processInput(TTroomScript *roomScript, TTnpcScript *npcScript, diff --git a/engines/titanic/true_talk/script_handler.h b/engines/titanic/true_talk/script_handler.h index 0183612210..62cf9d0ad4 100644 --- a/engines/titanic/true_talk/script_handler.h +++ b/engines/titanic/true_talk/script_handler.h @@ -55,10 +55,10 @@ private: CScriptHandlerSub1 _sub1; TTparser _parser; int _inputCtr; - int _field20; - int _field24; - int _field28; - int _field2C; + TTconcept *_concept1P; + TTconcept *_concept2P; + TTconcept *_concept3P; + TTconcept *_concept4P; int _field30; public: TTvocab *_vocab; |