diff options
| author | Paul Gilbert | 2017-07-19 18:56:04 -0400 |
|---|---|---|
| committer | Paul Gilbert | 2017-07-19 18:56:04 -0400 |
| commit | 7b61e71ae5a647955891724fb001fee6a6cc2a9d (patch) | |
| tree | 7bbf35ea262b841235cabc0e66a00e689cf2a73d | |
| parent | e617a53608976062073694a0847335a7ea74469e (diff) | |
| download | scummvm-rg350-7b61e71ae5a647955891724fb001fee6a6cc2a9d.tar.gz scummvm-rg350-7b61e71ae5a647955891724fb001fee6a6cc2a9d.tar.bz2 scummvm-rg350-7b61e71ae5a647955891724fb001fee6a6cc2a9d.zip | |
TITANIC: Fix quote searches done by all the bots
| -rw-r--r-- | engines/titanic/true_talk/barbot_script.cpp | 6 | ||||
| -rw-r--r-- | engines/titanic/true_talk/doorbot_script.cpp | 4 | ||||
| -rw-r--r-- | engines/titanic/true_talk/liftbot_script.cpp | 4 | ||||
| -rw-r--r-- | engines/titanic/true_talk/tt_npc_script.cpp | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/engines/titanic/true_talk/barbot_script.cpp b/engines/titanic/true_talk/barbot_script.cpp index c0d879b965..ae4104cb68 100644 --- a/engines/titanic/true_talk/barbot_script.cpp +++ b/engines/titanic/true_talk/barbot_script.cpp @@ -205,7 +205,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent CTrueTalkManager::setFlags(33, getValue(33) - 1); CTrueTalkManager::setFlags(34, getValue(34) - 1); - TTtreeResult treeResult; + TTtreeResult treeResult[32]; int val34 = getState(); setState(0); @@ -303,7 +303,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent return applySentenceIds(getDialogueId(250526), 16); } else { if (g_vm->_trueTalkManager->_quotesTree.search( - sentence->_normalizedLine.c_str(), TREE_3, &treeResult, 0, nullptr) != -1) { + sentence->_normalizedLine.c_str(), TREE_3, &treeResult[0], 0, nullptr) != -1) { uint newId = getDialogueId(250526); return applySentenceIds(newId, 16); } @@ -358,7 +358,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent break; case 26: if (g_vm->_trueTalkManager->_quotesTree.search( - sentence->_normalizedLine.c_str(), TREE_3, &treeResult, 0, nullptr) != -1) + sentence->_normalizedLine.c_str(), TREE_3, &treeResult[0], 0, nullptr) != -1) return applySentenceIds(getDialogueId(251899), 26); break; diff --git a/engines/titanic/true_talk/doorbot_script.cpp b/engines/titanic/true_talk/doorbot_script.cpp index b1d6a91107..4fcf329af7 100644 --- a/engines/titanic/true_talk/doorbot_script.cpp +++ b/engines/titanic/true_talk/doorbot_script.cpp @@ -259,9 +259,9 @@ int DoorbotScript::process(const TTroomScript *roomScript, const TTsentence *sen break; case 16: { - TTtreeResult treeResult; + TTtreeResult treeResult[32]; if (g_vm->_trueTalkManager->_quotesTree.search(sentence->_normalizedLine.c_str(), - TREE_3, &treeResult, 0, nullptr) != -1) + TREE_3, &treeResult[0], 0, nullptr) != -1) return setResponse(getDialogueId(221380), 0); break; } diff --git a/engines/titanic/true_talk/liftbot_script.cpp b/engines/titanic/true_talk/liftbot_script.cpp index c77885e3ab..18f32a705f 100644 --- a/engines/titanic/true_talk/liftbot_script.cpp +++ b/engines/titanic/true_talk/liftbot_script.cpp @@ -93,7 +93,7 @@ int LiftbotScript::process(const TTroomScript *roomScript, const TTsentence *sen checkItems(roomScript, sentence); int currState = getState(); int sentMode = sentence->_category; - TTtreeResult treeResult; + TTtreeResult treeResult[32]; if (currState) { setState(0); @@ -134,7 +134,7 @@ int LiftbotScript::process(const TTroomScript *roomScript, const TTsentence *sen case 9: if (sentMode == 10 || g_vm->_trueTalkManager->_quotesTree.search( - sentence->_normalizedLine.c_str(), TREE_2, &treeResult, 0, 0) != -1) + sentence->_normalizedLine.c_str(), TREE_2, &treeResult[0], 0, 0) != -1) return addDialogueAndState(getDialogueId(210970), 9); break; diff --git a/engines/titanic/true_talk/tt_npc_script.cpp b/engines/titanic/true_talk/tt_npc_script.cpp index 86ed8716f7..f12d02c05f 100644 --- a/engines/titanic/true_talk/tt_npc_script.cpp +++ b/engines/titanic/true_talk/tt_npc_script.cpp @@ -777,11 +777,11 @@ int TTnpcScript::processEntries(const TTsentenceEntries *entries, uint entryCoun bool TTnpcScript::defaultProcess(const TTroomScript *roomScript, const TTsentence *sentence) { uint remainder; - TTtreeResult results[32]; + TTtreeResult treeResult[32]; const TTstring &line = sentence->_normalizedLine; uint tagId = g_vm->_trueTalkManager->_quotes.find(line.c_str()); - int val = g_vm->_trueTalkManager->_quotesTree.search(line.c_str(), TREE_1, results, tagId, &remainder); + int val = g_vm->_trueTalkManager->_quotesTree.search(line.c_str(), TREE_1, &treeResult[0], tagId, &remainder); if (val > 0) { if (!handleQuote(roomScript, sentence, val, tagId, remainder)) |
