aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-27 07:41:05 -0400
committerPaul Gilbert2016-07-15 19:15:52 -0400
commit409271778e35b5089330abd589e3304f6f25064a (patch)
tree53b8116b874537fa490b7de6c44c14735ceed283
parent1fff06e97a2d29aa94c4a5a4ee3c08f310ece0d3 (diff)
downloadscummvm-rg350-409271778e35b5089330abd589e3304f6f25064a.tar.gz
scummvm-rg350-409271778e35b5089330abd589e3304f6f25064a.tar.bz2
scummvm-rg350-409271778e35b5089330abd589e3304f6f25064a.zip
TITANIC: Added TTparser removeNode
-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);