aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/true_talk/tt_parser.cpp8
-rw-r--r--engines/titanic/true_talk/tt_parser.h6
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp
index 5a94196552..f2abe5eec0 100644
--- a/engines/titanic/true_talk/tt_parser.cpp
+++ b/engines/titanic/true_talk/tt_parser.cpp
@@ -975,6 +975,14 @@ void TTparser::removeConcept(TTconcept *concept) {
delete concept;
}
+void TTparser::removeNode(TTparserNode *node) {
+ if (!node->_priorP)
+ // Node is the head of the chain, so reset parser's nodes pointer
+ _nodesP = static_cast<TTparserNode *>(node->_nextP);
+
+ delete node;
+}
+
int TTparser::checkForAction() {
int status = SS_VALID;
bool flag = false;
diff --git a/engines/titanic/true_talk/tt_parser.h b/engines/titanic/true_talk/tt_parser.h
index 5d431114ec..95a3be42d4 100644
--- a/engines/titanic/true_talk/tt_parser.h
+++ b/engines/titanic/true_talk/tt_parser.h
@@ -164,6 +164,12 @@ private:
*/
void removeConcept(TTconcept *concept);
+ /**
+ * Detaches a node from the main node list
+ */
+ void removeNode(TTparserNode *node);
+
+
int checkForAction();
int fn2(TTword *word);
bool checkConcept2(TTconcept *concept, int conceptMode);