From 361ac2cfe4c6e778ad5eeafac94bbc6927aeaf1b Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 16 May 2016 23:13:24 -0400 Subject: TITANIC: Implemented secondary replaceNumbers method --- engines/titanic/true_talk/tt_parser.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'engines/titanic/true_talk/tt_parser.h') diff --git a/engines/titanic/true_talk/tt_parser.h b/engines/titanic/true_talk/tt_parser.h index 7e4e97f1ff..171c91d470 100644 --- a/engines/titanic/true_talk/tt_parser.h +++ b/engines/titanic/true_talk/tt_parser.h @@ -28,7 +28,7 @@ namespace Titanic { -enum NumberFlag { NF_2 = 2, NF_8 = 8, NF_10 = 0x10 }; +enum NumberFlag { NF_1 = 1, NF_2 = 2, NF_4 = 4, NF_8 = 8, NF_10 = 0x10 }; class CScriptHandler; @@ -93,6 +93,16 @@ private: */ static int searchAndReplace(TTstring &line, int startIndex, const StringArray &strings); + /** + * Checks the string starting at a given index for a number representation + * such as roman numericals, spelled out numbers, etc. and replaces it with + * a plain decimal representation. + * @param line Line to check + * @param startIndex Starting index in the start to check + * @returns Index of the start of the following word, or -1 if at end of line + */ + int replaceNumbers(TTstring &line, int startIndex); + /** * Checks the string starting at a given index for a number representation * such as roman numericals, spelled out numbers, etc. and replaces it with @@ -101,7 +111,7 @@ private: * @param startIndex Starting index in the start to check * @returns Pointer to matching number entry, if match occurred */ - const NumberEntry *replaceNumbers(TTstring &line, int *startIndex); + const NumberEntry *replaceNumbers2(TTstring &line, int *startIndex); public: CScriptHandler *_owner; int _field4; -- cgit v1.2.3