diff options
Diffstat (limited to 'engines/titanic/true_talk/script_handler.cpp')
-rw-r--r-- | engines/titanic/true_talk/script_handler.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/engines/titanic/true_talk/script_handler.cpp b/engines/titanic/true_talk/script_handler.cpp index cd06d71796..c4665465da 100644 --- a/engines/titanic/true_talk/script_handler.cpp +++ b/engines/titanic/true_talk/script_handler.cpp @@ -24,6 +24,7 @@ #include "titanic/true_talk/tt_concept.h" #include "titanic/true_talk/tt_sentence.h" #include "titanic/true_talk/tt_parser.h" +#include "titanic/true_talk/tt_word.h" #include "titanic/titanic.h" namespace Titanic { @@ -117,4 +118,25 @@ int CScriptHandler::setResponse(TTscriptBase *script, TTresponse *response) { return _owner->setResponse(script, response); } +void CScriptHandler::handleWord(TTstring &str) { + handleWord1(str); + handleWord2(str); +} + +void CScriptHandler::handleWord1(TTstring &str) { + if (_concept2P) + delete _concept2P; + + TTword word(str, WC_UNKNOWN, 0); + _concept2P = new TTconcept(&word); +} + +void CScriptHandler::handleWord2(TTstring &str) { + if (_concept1P) + delete _concept1P; + + TTword word(str, WC_UNKNOWN, 0); + _concept1P = new TTconcept(&word); +} + } // End of namespace Titanic |