diff options
author | Paul Gilbert | 2016-05-17 07:26:31 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-15 19:12:44 -0400 |
commit | 39b85d845b008613c0c5ce5eb614159362ab1797 (patch) | |
tree | edee23dd787665f9de151eac1447e17f15d389d0 | |
parent | a7c1b2fc6bb7d158f8a48664dd07b4d03f4dc1d5 (diff) | |
download | scummvm-rg350-39b85d845b008613c0c5ce5eb614159362ab1797.tar.gz scummvm-rg350-39b85d845b008613c0c5ce5eb614159362ab1797.tar.bz2 scummvm-rg350-39b85d845b008613c0c5ce5eb614159362ab1797.zip |
TITANIC: Changed parser & script processInput methods to preprocess
-rw-r--r-- | engines/titanic/true_talk/script_handler.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_parser.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_parser.h | 5 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_script_base.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_script_base.h | 2 |
5 files changed, 10 insertions, 9 deletions
diff --git a/engines/titanic/true_talk/script_handler.cpp b/engines/titanic/true_talk/script_handler.cpp index 2e2a148e26..0b600f9be0 100644 --- a/engines/titanic/true_talk/script_handler.cpp +++ b/engines/titanic/true_talk/script_handler.cpp @@ -64,9 +64,9 @@ int CScriptHandler::processInput(TTroomScript *roomScript, TTnpcScript *npcScrip return SS_5; TTinput *input = new TTinput(_inputCtr++, line, this, roomScript, npcScript); - _parser.processInput(input); - roomScript->processInput(input); - npcScript->processInput(input); + _parser.preprocess(input); + roomScript->preprocess(input); + npcScript->preprocess(input); warning("TODO: CScriptHandler::processInput"); diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp index 46eb50daa1..66cb57bcd4 100644 --- a/engines/titanic/true_talk/tt_parser.cpp +++ b/engines/titanic/true_talk/tt_parser.cpp @@ -66,7 +66,7 @@ void TTparser::loadArrays() { } -int TTparser::processInput(TTinput *input) { +int TTparser::preprocess(TTinput *input) { _input = input; if (normalize(input)) return 0; diff --git a/engines/titanic/true_talk/tt_parser.h b/engines/titanic/true_talk/tt_parser.h index 171c91d470..4dbc4d4c48 100644 --- a/engines/titanic/true_talk/tt_parser.h +++ b/engines/titanic/true_talk/tt_parser.h @@ -124,9 +124,10 @@ public: TTparser(CScriptHandler *owner); /** - * Gets passed a newly created input wrapper during conversation text processing + * Preprocesses the passed input text, to handle things like lowercasing + * all the words, and replcaing common slang with their full equivalents */ - int processInput(TTinput *input); + int preprocess(TTinput *input); }; } // End of namespace Titanic diff --git a/engines/titanic/true_talk/tt_script_base.cpp b/engines/titanic/true_talk/tt_script_base.cpp index 88f06a493e..0a14107974 100644 --- a/engines/titanic/true_talk/tt_script_base.cpp +++ b/engines/titanic/true_talk/tt_script_base.cpp @@ -73,8 +73,8 @@ void TTscriptBase::reset() { _field48 = 0; } -int TTscriptBase::processInput(TTinput *input) { - warning("TODO: TTscriptBase::processInput"); +int TTscriptBase::preprocess(TTinput *input) { + warning("TODO: TTscriptBase::preprocess"); return 0; } diff --git a/engines/titanic/true_talk/tt_script_base.h b/engines/titanic/true_talk/tt_script_base.h index 12abb5ccda..820d2691e4 100644 --- a/engines/titanic/true_talk/tt_script_base.h +++ b/engines/titanic/true_talk/tt_script_base.h @@ -64,7 +64,7 @@ public: /** * Gets passed a newly created input wrapper during conversation text processing */ - int processInput(TTinput *input); + int preprocess(TTinput *input); virtual void proc2(int v); |