mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-15 14:28:28 +00:00
TITANIC: Fix quote searches done by all the bots
This commit is contained in:
parent
e617a53608
commit
7b61e71ae5
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user