From 18d6c501fc8f1af50e0e945406233af7ae94a75a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 5 Oct 2016 10:47:22 +0300 Subject: CHEWY: Add support for in-game texts --- engines/chewy/text.h | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'engines/chewy/text.h') diff --git a/engines/chewy/text.h b/engines/chewy/text.h index fe3e1da8b9..f729205a93 100644 --- a/engines/chewy/text.h +++ b/engines/chewy/text.h @@ -38,11 +38,11 @@ namespace Chewy { * USE - use action texts, 100 entries max */ enum MaxTextTypes { - kADSTextMax = 500, - kATSTextMax = 100, - kAADTextMax = 100, - kINVTextMax = 100, - kUSETextMax = 100 + kADSTextMax = 500, // 0 - 499 + kATSTextMax = 100, // 500 - 599 + kAADTextMax = 100, // 600 - 699 + kINVTextMax = 100, // 700 - 799 + kUSETextMax = 100 // 800 - 899 }; /** @@ -59,12 +59,12 @@ enum TextEntryMarkers { #define VOICE_OFFSET 20 -struct Dialog { +struct TextEntry { uint16 speechId; Common::String text; }; -typedef Common::List DialogList; +typedef Common::List TextEntryList; class Text : public Resource { @@ -72,11 +72,19 @@ public: Text(); virtual ~Text(); - DialogList *getDialog(uint dialogNum, uint entryNum); - // TODO: getText() - // TODO: getAutoDialog() - // TODO: getInvDesc() - // TODO: getUseText() + /** + * Gets a list of lines for a specific dialog entry + */ + TextEntryList *getDialog(uint dialogNum, uint entryNum); + + /** + * Gets a line of text of the following types: + * - text (ATS) - 500 - 599 + * - auto dialog (AAD) - 600 - 699 + * - inventory text (INV) - 700 - 799 + * - use text (USE) - 800 - 899 + */ + TextEntry *getText(uint dialogNum, uint entryNum); }; class ErrorMessage : public Resource { -- cgit v1.2.3