diff options
author | Paul Gilbert | 2016-05-22 14:28:47 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-15 19:14:27 -0400 |
commit | 6ab35972e87fd1ac6a2eab7a4a07683f2e844d76 (patch) | |
tree | d2fa9689e2929f338a3f98dd3b9b321e7a1fdcbd /engines/titanic/true_talk/tt_concept.cpp | |
parent | 8c99ff510c2e8a7d4cde30dc6d8b3698fb998907 (diff) | |
download | scummvm-rg350-6ab35972e87fd1ac6a2eab7a4a07683f2e844d76.tar.gz scummvm-rg350-6ab35972e87fd1ac6a2eab7a4a07683f2e844d76.tar.bz2 scummvm-rg350-6ab35972e87fd1ac6a2eab7a4a07683f2e844d76.zip |
TITANIC: Implement TTconcept getText
Diffstat (limited to 'engines/titanic/true_talk/tt_concept.cpp')
-rw-r--r-- | engines/titanic/true_talk/tt_concept.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/engines/titanic/true_talk/tt_concept.cpp b/engines/titanic/true_talk/tt_concept.cpp index 8ecaf89289..f88722eb48 100644 --- a/engines/titanic/true_talk/tt_concept.cpp +++ b/engines/titanic/true_talk/tt_concept.cpp @@ -41,7 +41,7 @@ TTconcept::TTconcept(TTscriptBase *script, ScriptType scriptType) : setScriptType(scriptType); _scriptP = script; - if (scriptType == ST_UNKNOWN_SCRIPT && script->_field8 == 1) + if (scriptType == ST_UNKNOWN_SCRIPT && script->_id == 1) _scriptType = ST_ROOM_SCRIPT; } @@ -202,4 +202,27 @@ void TTconcept::copyFrom(TTconcept *src) { reset(); } +bool TTconcept::checkWordId1() const { + return (_wordP && (_wordP->_id == 200 || _wordP->_id == 201 || + _wordP->_id == 602 || _wordP->_id == 607)) || + (_scriptP && _scriptP->_id <= 2); +} + +bool TTconcept::checkWordId2() const { + return (_wordP && _wordP->_id == 204) || (_scriptP && _scriptP->getId() == 3); +} + +bool TTconcept::checkWordClass() const { + return !_scriptP && _wordP && (_wordP->_wordClass == WC_THING || _wordP->_wordClass == WC_PRONOUN); +} + +const TTstring TTconcept::getText() { + if (_scriptP) + return _scriptP->getText(); + else if (_wordP) + return _wordP->getText(); + else + return TTstring(); +} + } // End of namespace Titanic |