aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/true_talk/tt_sentence.cpp4
-rw-r--r--engines/titanic/true_talk/tt_sentence.h6
2 files changed, 10 insertions, 0 deletions
diff --git a/engines/titanic/true_talk/tt_sentence.cpp b/engines/titanic/true_talk/tt_sentence.cpp
index 54c66446f3..56ccc5ab04 100644
--- a/engines/titanic/true_talk/tt_sentence.cpp
+++ b/engines/titanic/true_talk/tt_sentence.cpp
@@ -266,4 +266,8 @@ bool TTsentence::localWord(const char *str) const {
return false;
}
+bool TTsentence::contains(const char *str) const {
+ return _initialLine.contains(str) || _normalizedLine.contains(str);
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/true_talk/tt_sentence.h b/engines/titanic/true_talk/tt_sentence.h
index c9e8de9a7a..94cc265f5f 100644
--- a/engines/titanic/true_talk/tt_sentence.h
+++ b/engines/titanic/true_talk/tt_sentence.h
@@ -119,6 +119,12 @@ public:
bool isConcept34(int slotIndex, TTconceptNode *node = nullptr);
bool localWord(const char *str) const;
+
+ /**
+ * Returns true if the sentence (either the original or normalized lines)
+ * contain the specified substring
+ */
+ bool contains(const char *str) const;
};
} // End of namespace Titanic