aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/true_talk/deskbot_script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/true_talk/deskbot_script.cpp')
-rw-r--r--engines/titanic/true_talk/deskbot_script.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/engines/titanic/true_talk/deskbot_script.cpp b/engines/titanic/true_talk/deskbot_script.cpp
index 219ac74a24..1e3eaae26a 100644
--- a/engines/titanic/true_talk/deskbot_script.cpp
+++ b/engines/titanic/true_talk/deskbot_script.cpp
@@ -397,7 +397,25 @@ int DeskbotScript::getStateDialogueId() const {
}
void DeskbotScript::setFlags17(int newId, int index) {
- // TODO
+ int newValue = getValue(17);
+
+ for (uint idx = 0; idx < _states.size(); ++idx) {
+ const TTupdateState3 &us = _states[idx];
+ if (newId == (idx == 0 ? 0 : us._newId)) {
+ uint bits = us._dialBits;
+
+ if (!bits
+ || (index == 1 && (bits & 1) && (bits & 4))
+ || (index == 0 && (bits & 2) && (bits & 4))
+ || (index == 3 && (bits & 1) && (bits & 8))
+ || (index == 2 && (bits & 2) && (bits & 8))) {
+ newValue = us._newValue;
+ break;
+ }
+ }
+ }
+
+ CTrueTalkManager::setFlags(17, newValue);
}
} // End of namespace Titanic