diff options
author | Paul Gilbert | 2016-05-27 12:50:15 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-15 19:15:56 -0400 |
commit | de1bb1e95c1a6eec7b0b505d1e4d44bb1a6f5098 (patch) | |
tree | 73f444da5a35e8d2b63dd5634714dfef40a9b8c7 /engines | |
parent | 409271778e35b5089330abd589e3304f6f25064a (diff) | |
download | scummvm-rg350-de1bb1e95c1a6eec7b0b505d1e4d44bb1a6f5098.tar.gz scummvm-rg350-de1bb1e95c1a6eec7b0b505d1e4d44bb1a6f5098.tar.bz2 scummvm-rg350-de1bb1e95c1a6eec7b0b505d1e4d44bb1a6f5098.zip |
TITANIC: In-progress TTparser processModifiers
Diffstat (limited to 'engines')
-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); |