From 3c547b6b354fc54a19dc88cc2470fb51093eb5bb Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 24 Jul 2016 23:08:46 -0400 Subject: TITANIC: Load word lists for each NPC Script class --- engines/titanic/true_talk/tt_npc_script.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'engines/titanic/true_talk/tt_npc_script.h') diff --git a/engines/titanic/true_talk/tt_npc_script.h b/engines/titanic/true_talk/tt_npc_script.h index ab4379bf60..29b174b8e0 100644 --- a/engines/titanic/true_talk/tt_npc_script.h +++ b/engines/titanic/true_talk/tt_npc_script.h @@ -120,6 +120,18 @@ public: void load(const char *name); }; +struct TTwordEntry { + uint _id; + CString _text; + + TTwordEntry() : _id(0) {} +}; + +class TTwordEntries : public Common::Array { +public: + void load(const char *name); +}; + class TTnpcScriptBase : public TTscriptBase { protected: int _field54; @@ -167,6 +179,7 @@ protected: TTscriptMappings _mappings; TTsentenceEntries _entries; TTtagMappings _tagMappings; + TTwordEntries _words; int _entryCount; int _field68; int _field6C; @@ -313,7 +326,11 @@ public: */ virtual void selectResponse(int id); - virtual int proc15(int id) const; + /** + * Handles scanning the word list for a given Id, and if + * found adds it to the sentence concept list + */ + virtual bool handleWord(uint id) const; virtual bool handleQuote(TTroomScript *roomScript, TTsentence *sentence, int val, uint tagId, uint remainder) const; -- cgit v1.2.3