aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/true_talk/barbot_script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/true_talk/barbot_script.cpp')
-rw-r--r--engines/titanic/true_talk/barbot_script.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/titanic/true_talk/barbot_script.cpp b/engines/titanic/true_talk/barbot_script.cpp
index ad10f5a57f..d79ebedf4d 100644
--- a/engines/titanic/true_talk/barbot_script.cpp
+++ b/engines/titanic/true_talk/barbot_script.cpp
@@ -748,7 +748,7 @@ done:
return 2;
}
- addResponse(getDialogueId(250082 + getRandomNumber(100) <= 89 ? 128 : 0));
+ addResponse(getDialogueId(250082 + (getRandomNumber(100) <= 89 ? 128 : 0)));
}
}
@@ -776,7 +776,7 @@ ScriptChangedResult BarbotScript::scriptChanged(const TTroomScript *roomScript,
resetFlags();
} else {
if (!getValue(28) || !fn10(true)) {
- addResponse(getDialogueId(251627 + getValue(28) ? -1034 : 0));
+ addResponse(getDialogueId(251627 + (getValue(28) ? -1034 : 0)));
applyResponse();
}
@@ -1009,7 +1009,7 @@ uint BarbotScript::getDialsBitset() const {
bits = 1;
if (!getDialRegion(1))
bits |= 2;
- if (!getDialRegion(2))
+ if (getDialRegion(2))
bits |= 4;
return bits;
@@ -1147,9 +1147,10 @@ int BarbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScrip
if (id) {
addResponse(getDialogueId(id));
applyResponse();
+ return 2;
}
- return 2;
+ return 0;
}
void BarbotScript::setDialRegion(int dialNum, int region) {