aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/true_talk/tt_talker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/true_talk/tt_talker.cpp')
-rw-r--r--engines/titanic/true_talk/tt_talker.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/titanic/true_talk/tt_talker.cpp b/engines/titanic/true_talk/tt_talker.cpp
index 1eb7fc8b2e..61443a4835 100644
--- a/engines/titanic/true_talk/tt_talker.cpp
+++ b/engines/titanic/true_talk/tt_talker.cpp
@@ -22,6 +22,7 @@
#include "titanic/true_talk/tt_talker.h"
#include "titanic/messages/messages.h"
+#include "titanic/pet_control/pet_control.h"
namespace Titanic {
@@ -32,4 +33,20 @@ void TTtalker::speechStarted(const CString &dialogueStr, uint dialogueId, uint s
msg.execute(_npc, nullptr, MSGFLAG_BREAK_IF_HANDLED);
}
+TTtalker::~TTtalker() {
+ CPetControl *petControl = _npc->getPetControl();
+ if (petControl)
+ // Add in final line
+ petControl->convAddLine(_line);
+
+ // Notify the end of the speech
+ CTrueTalkNotifySpeechEndedMsg endedMsg(_field24, _dialogueId);
+ endedMsg.execute(_npc, nullptr, MSGFLAG_BREAK_IF_HANDLED);
+}
+
+void TTtalker::endSpeech(int val) {
+ _done = true;
+ _field24 = val;
+}
+
} // End of namespace Titanic