From 4353fd8b662253323b038817f1aa4f36bdd1b82e Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 28 Jan 2017 15:24:52 -0500 Subject: TITANIC: Further CScriptHandler renamings --- engines/titanic/true_talk/script_handler.cpp | 2 +- engines/titanic/true_talk/script_handler.h | 16 +++++++++++++++- engines/titanic/true_talk/tt_npc_script.cpp | 4 ++-- 3 files changed, 18 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/titanic/true_talk/script_handler.cpp b/engines/titanic/true_talk/script_handler.cpp index 13c88e21db..04955a694b 100644 --- a/engines/titanic/true_talk/script_handler.cpp +++ b/engines/titanic/true_talk/script_handler.cpp @@ -115,7 +115,7 @@ int CScriptHandler::setResponse(TTscriptBase *script, TTresponse *response) { return _owner->setResponse(script, response); } -void CScriptHandler::handleWord(const TTstring *str) { +void CScriptHandler::setActorObject(const TTstring *str) { setActor(str); setObject(str); } diff --git a/engines/titanic/true_talk/script_handler.h b/engines/titanic/true_talk/script_handler.h index 824738d1f7..73419fc73e 100644 --- a/engines/titanic/true_talk/script_handler.h +++ b/engines/titanic/true_talk/script_handler.h @@ -39,7 +39,14 @@ private: CTitleEngine *_owner; int _inputCtr; private: + /** + * Sets the text for the actor concept + */ void setActor(const TTstring *str); + + /** + * Sets the text for the onject concept + */ void setObject(const TTstring *str); public: TTparser _parser; @@ -59,6 +66,10 @@ public: ScriptChangedResult scriptChanged(TTroomScript *roomScript, TTnpcScript *npcScript, uint dialogueId); + /** + * Main processing and handling for text lines entered into the + * Conversation tab of the PET + */ int processInput(TTroomScript *roomScript, TTnpcScript *npcScript, const TTstring &line); @@ -77,7 +88,10 @@ public: */ int setResponse(TTscriptBase *script, TTresponse *response); - void handleWord(const TTstring *str); + /** + * Sets the concepts for both actor and object to the specified text + */ + void setActorObject(const TTstring *str); }; } // End of namespace Titanic diff --git a/engines/titanic/true_talk/tt_npc_script.cpp b/engines/titanic/true_talk/tt_npc_script.cpp index ba205b6498..b1173276bb 100644 --- a/engines/titanic/true_talk/tt_npc_script.cpp +++ b/engines/titanic/true_talk/tt_npc_script.cpp @@ -262,12 +262,12 @@ bool TTnpcScript::handleWord(uint id) const { const TTwordEntry &we = _words[idx]; if (we._id == id) { TTstring str(we._text); - g_vm->_scriptHandler->handleWord(&str); + g_vm->_scriptHandler->setActorObject(&str); return true; } } - g_vm->_scriptHandler->handleWord(nullptr); + g_vm->_scriptHandler->setActorObject(nullptr); return true; } -- cgit v1.2.3