aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/true_talk
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-22 10:51:03 -0400
committerPaul Gilbert2016-07-15 19:14:14 -0400
commitb862f95fe175f3938905e3357d8219cf27d62ae9 (patch)
tree2ced93b8e4544450909a9c08dd97d073c5cc6a1c /engines/titanic/true_talk
parent82614fedf3c2b9380530fdc4bc68d585d31aaedb (diff)
downloadscummvm-rg350-b862f95fe175f3938905e3357d8219cf27d62ae9.tar.gz
scummvm-rg350-b862f95fe175f3938905e3357d8219cf27d62ae9.tar.bz2
scummvm-rg350-b862f95fe175f3938905e3357d8219cf27d62ae9.zip
TITANIC: Added concept pointers to CScriptHandler
Diffstat (limited to 'engines/titanic/true_talk')
-rw-r--r--engines/titanic/true_talk/script_handler.cpp18
-rw-r--r--engines/titanic/true_talk/script_handler.h8
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;