diff options
author | Paul Gilbert | 2016-05-12 20:30:20 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:39:24 -0400 |
commit | ae5cd8d8dda5b66a82d33b4164c06b3313522e10 (patch) | |
tree | d33075205879af8aadfffe2c35c8f2b16fd8aaee /engines/titanic | |
parent | 7b71462046155e2927bd1f76634ea9b5bf45d381 (diff) | |
download | scummvm-rg350-ae5cd8d8dda5b66a82d33b4164c06b3313522e10.tar.gz scummvm-rg350-ae5cd8d8dda5b66a82d33b4164c06b3313522e10.tar.bz2 scummvm-rg350-ae5cd8d8dda5b66a82d33b4164c06b3313522e10.zip |
TITANIC: Fix TTstringNode pointers to TTsynonym
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/true_talk/tt_synonym.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_synonym.h | 4 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_word.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_word.h | 4 |
4 files changed, 9 insertions, 5 deletions
diff --git a/engines/titanic/true_talk/tt_synonym.cpp b/engines/titanic/true_talk/tt_synonym.cpp index ea45f2e74a..3ce3b12ee2 100644 --- a/engines/titanic/true_talk/tt_synonym.cpp +++ b/engines/titanic/true_talk/tt_synonym.cpp @@ -27,7 +27,7 @@ namespace Titanic { TTsynonym::TTsynonym() : TTstringNode() { } -TTsynonym::TTsynonym(const TTstringNode *src) { +TTsynonym::TTsynonym(const TTsynonym *src) { _string = src->_string; initialize(src->_mode); _file = src->_file; @@ -51,7 +51,7 @@ TTsynonym *TTsynonym::findByName(TTsynonym *start, const TTString &str, int mode return nullptr; } -TTsynonym *TTsynonym::copy(TTstringNode *src) { +TTsynonym *TTsynonym::copy(TTsynonym *src) { if (src->_field1C) { _field1C = 5; return this; diff --git a/engines/titanic/true_talk/tt_synonym.h b/engines/titanic/true_talk/tt_synonym.h index 20f63ac0f6..b661c166e0 100644 --- a/engines/titanic/true_talk/tt_synonym.h +++ b/engines/titanic/true_talk/tt_synonym.h @@ -30,13 +30,13 @@ namespace Titanic { class TTsynonym : public TTstringNode { public: TTsynonym(); - TTsynonym(const TTstringNode *src); + TTsynonym(const TTsynonym *src); TTsynonym(int mode, const char *str, FileHandle file); /** * Copy the synonym */ - TTsynonym *copy(TTstringNode *src); + TTsynonym *copy(TTsynonym *src); /** * Scan for a synonym with a given string diff --git a/engines/titanic/true_talk/tt_word.cpp b/engines/titanic/true_talk/tt_word.cpp index 80fc611a38..55de72b3d6 100644 --- a/engines/titanic/true_talk/tt_word.cpp +++ b/engines/titanic/true_talk/tt_word.cpp @@ -113,7 +113,7 @@ bool TTword::testFileHandle(FileHandle file) const { TTword *TTword::scanCopy(const TTString &str, TTsynonym *node, int mode) { if (_synP) { - TTstringNode *strNode = TTsynonym::findByName(_synP, str, mode); + TTsynonym *strNode = TTsynonym::findByName(_synP, str, mode); if (strNode) { node->copy(strNode); node->_pPrior = nullptr; diff --git a/engines/titanic/true_talk/tt_word.h b/engines/titanic/true_talk/tt_word.h index d1de4118f9..9bdb810ae6 100644 --- a/engines/titanic/true_talk/tt_word.h +++ b/engines/titanic/true_talk/tt_word.h @@ -78,7 +78,11 @@ public: const char *c_str() const { return _string.c_str(); } operator const char *() const { return c_str(); } + /** + * Creates a copy of the word + */ virtual TTword *copy(); + virtual int proc2() const { return 0; } virtual int proc3() const { return -1; } virtual void proc4() {} |