aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/messages/messages.h2
-rw-r--r--engines/titanic/pet_control/pet_conversations.cpp8
-rw-r--r--engines/titanic/pet_control/pet_text.cpp4
-rw-r--r--engines/titanic/pet_control/pet_text.h5
4 files changed, 17 insertions, 2 deletions
diff --git a/engines/titanic/messages/messages.h b/engines/titanic/messages/messages.h
index 3af65c29da..4c8ccaf43a 100644
--- a/engines/titanic/messages/messages.h
+++ b/engines/titanic/messages/messages.h
@@ -345,7 +345,7 @@ MESSAGE0(CSubTurnOnMsg);
MESSAGE2(CSummonBotMsg, CString, strValue, "", int, numValue, 0);
MESSAGE1(CSummonBotQueryMsg, CString, npcName, "");
MESSAGE1(CTakeHeadPieceMsg, CString, value, "NULL");
-MESSAGE2(CTextInputMsg, CString, value1, "", CString, value2, "");
+MESSAGE2(CTextInputMsg, CString, input, "", CString, response, "");
MESSAGE1(CTimeDilationMsg, int, value, 0);
MESSAGE0(CTitleSequenceEndedMsg);
MESSAGE0(CTransitMsg);
diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp
index d7fe68ef88..ae5bbd6e24 100644
--- a/engines/titanic/pet_control/pet_conversations.cpp
+++ b/engines/titanic/pet_control/pet_conversations.cpp
@@ -256,7 +256,13 @@ void CPetConversations::textLineEntered(const CString &textLine) {
return;
if (_petControl->_activeNPC) {
- warning("TODO: textLineEntered");
+ _log.addLine("- " + textLine, getColor(0));
+
+ CTextInputMsg inputMsg(textLine, "");
+ inputMsg.execute(_petControl->_activeNPC);
+
+ if (!inputMsg._response.empty())
+ _log.addLine(inputMsg._response);
} else {
_log.addLine("There is no one here to talk to", getColor(1));
}
diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp
index a092255d7c..349e419513 100644
--- a/engines/titanic/pet_control/pet_text.cpp
+++ b/engines/titanic/pet_control/pet_text.cpp
@@ -320,6 +320,10 @@ int CPetText::getPageHeight(CScreenManager *screenManager) {
}
}
+void CPetText::addLine(const CString &str) {
+ addLine(str, _textR, _textG, _textB);
+}
+
void CPetText::addLine(const CString &str, uint color) {
addLine(str, color & 0xff, (color >> 8) & 0xff,
(color >> 16) & 0xff);
diff --git a/engines/titanic/pet_control/pet_text.h b/engines/titanic/pet_control/pet_text.h
index 00eab10146..a3d136a2d4 100644
--- a/engines/titanic/pet_control/pet_text.h
+++ b/engines/titanic/pet_control/pet_text.h
@@ -207,6 +207,11 @@ public:
/**
* Add a line to the text
*/
+ void addLine(const CString &str);
+
+ /**
+ * Add a line to the text
+ */
void addLine(const CString &str, uint color);
/**