[Scummvm-git-logs] scummvm master -> 4353fd8b662253323b038817f1aa4f36bdd1b82e

dreammaster dreammaster at scummvm.org
Sat Jan 28 21:25:02 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4353fd8b66 TITANIC: Further CScriptHandler renamings


Commit: 4353fd8b662253323b038817f1aa4f36bdd1b82e
    https://github.com/scummvm/scummvm/commit/4353fd8b662253323b038817f1aa4f36bdd1b82e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-01-28T15:24:52-05:00

Commit Message:
TITANIC: Further CScriptHandler renamings

Changed paths:
    engines/titanic/true_talk/script_handler.cpp
    engines/titanic/true_talk/script_handler.h
    engines/titanic/true_talk/tt_npc_script.cpp


diff --git a/engines/titanic/true_talk/script_handler.cpp b/engines/titanic/true_talk/script_handler.cpp
index 13c88e2..04955a6 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 824738d..73419fc 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 ba205b6..b117327 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;
 }
 





More information about the Scummvm-git-logs mailing list