diff options
author | Paul Gilbert | 2016-06-05 14:27:31 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-15 19:20:05 -0400 |
commit | bfe075d314f8e9d7010d0f5e60d44bb314e53846 (patch) | |
tree | 1465badfec7efda97928b9a57492c36e8b1c0c07 /engines/titanic/true_talk/tt_quotes_tree.h | |
parent | 51226842c8f63ffa65c397906ad7aed9dd3d9ca9 (diff) | |
download | scummvm-rg350-bfe075d314f8e9d7010d0f5e60d44bb314e53846.tar.gz scummvm-rg350-bfe075d314f8e9d7010d0f5e60d44bb314e53846.tar.bz2 scummvm-rg350-bfe075d314f8e9d7010d0f5e60d44bb314e53846.zip |
TITANIC: Further fleshing out of TTquotes and TTquotesTree
Diffstat (limited to 'engines/titanic/true_talk/tt_quotes_tree.h')
-rw-r--r-- | engines/titanic/true_talk/tt_quotes_tree.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/engines/titanic/true_talk/tt_quotes_tree.h b/engines/titanic/true_talk/tt_quotes_tree.h index 9496fa8887..fb7d262879 100644 --- a/engines/titanic/true_talk/tt_quotes_tree.h +++ b/engines/titanic/true_talk/tt_quotes_tree.h @@ -31,24 +31,41 @@ namespace Titanic { #define QUOTES_TREE_COUNT 1022 -enum TreeEntryType { ET_END = 0, ET_TABLE = 1, ET_STRING = 2 }; +class TTtreeBuffer { +public: + int _field0; + const char *_strP; +public: + TTtreeBuffer() : _field0(0), _strP(nullptr) {} +}; class TTquotesTree { struct TTquotesTreeEntry { uint _id; - TreeEntryType _type; TTquotesTreeEntry *_subTable; CString _string; - TTquotesTreeEntry() : _id(0), _type(ET_END), _subTable(nullptr) {} + TTquotesTreeEntry() : _id(0), _subTable(nullptr) {} }; private: TTquotesTreeEntry _entries[QUOTES_TREE_COUNT]; +private: + /** + * Inner search method + */ + void search(const char **str, TTquotesTreeEntry *bTree, TTtreeBuffer *buffer, + int quoteId); + + /** + * Compare the current word in the string against a specified word + */ + bool compareWord(const char **str, const char *refStr); public: /** * Load data for the quotes tree */ void load(); + }; } // End of namespace Titanic |