diff options
-rw-r--r-- | engines/titanic/true_talk/tt_concept.h | 2 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_parser.cpp | 20 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_parser.h | 1 |
3 files changed, 22 insertions, 1 deletions
diff --git a/engines/titanic/true_talk/tt_concept.h b/engines/titanic/true_talk/tt_concept.h index 7fc56e7345..0a14482ba6 100644 --- a/engines/titanic/true_talk/tt_concept.h +++ b/engines/titanic/true_talk/tt_concept.h @@ -41,7 +41,6 @@ private: int _field14; int _field1C; int _field20; - TTstring _string2; TTword *_word2P; int _field30; int _field34; @@ -75,6 +74,7 @@ private: public: TTconcept *_nextP; ScriptType _scriptType; + TTstring _string2; public: TTconcept(); TTconcept(TTscriptBase *script, ScriptType scriptType); diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp index f2abe5eec0..9b078b4fd4 100644 --- a/engines/titanic/true_talk/tt_parser.cpp +++ b/engines/titanic/true_talk/tt_parser.cpp @@ -1231,4 +1231,24 @@ bool TTparser::resetConcept(TTconcept **conceptPP, int conceptIndex) { return !result; } +int TTparser::processModifiers(int modifier, TTword *word) { + TTconcept *newConcept = new TTconcept(word, ST_UNKNOWN_SCRIPT); + + for (TTword *currP = _currentWordP; currP != word; currP = currP->_nextP) { + if ((modifier == 2 && currP->_wordClass == WC_ADJECTIVE) || + (modifier == 1 && currP->_wordClass == WC_ADVERB)) { + newConcept->_string2 += ' '; + newConcept->_string2 += _currentWordP->getText(); + } else if (word->_id == 113 && currP->_wordClass == WC_ADJECTIVE) { + addToConceptList(currP); + addNode(13); + } + + if (modifier == 2 || modifier == 3) { + // TODO + } + } + return 0; +} + } // End of namespace Titanic diff --git a/engines/titanic/true_talk/tt_parser.h b/engines/titanic/true_talk/tt_parser.h index 95a3be42d4..7aa47fd12c 100644 --- a/engines/titanic/true_talk/tt_parser.h +++ b/engines/titanic/true_talk/tt_parser.h @@ -169,6 +169,7 @@ private: */ void removeNode(TTparserNode *node); + int processModifiers(int modifier, TTword *word); int checkForAction(); int fn2(TTword *word); |