aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-07-28 23:25:38 -0400
committerPaul Gilbert2016-07-28 23:25:38 -0400
commit39f882d9f3bfcf304806968f97cfb43e5ce95481 (patch)
tree27b7966fcee1b05431c6fb6bf6ab2fd6d06c14df
parent186b4e095a7f91bf1d5a186c0da9b4a81a0ae525 (diff)
downloadscummvm-rg350-39f882d9f3bfcf304806968f97cfb43e5ce95481.tar.gz
scummvm-rg350-39f882d9f3bfcf304806968f97cfb43e5ce95481.tar.bz2
scummvm-rg350-39f882d9f3bfcf304806968f97cfb43e5ce95481.zip
TITANIC: Added LiftbotScript updateState
-rw-r--r--engines/titanic/true_talk/liftbot_script.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/titanic/true_talk/liftbot_script.cpp b/engines/titanic/true_talk/liftbot_script.cpp
index 2308ea1beb..66e2042ee3 100644
--- a/engines/titanic/true_talk/liftbot_script.cpp
+++ b/engines/titanic/true_talk/liftbot_script.cpp
@@ -212,8 +212,15 @@ int LiftbotScript::handleQuote(TTroomScript *roomScript, TTsentence *sentence,
}
int LiftbotScript::updateState(uint oldId, uint newId, int index) {
- warning("TODO");
- return 0;
+ for (uint idx = 0; idx < _states.size(); ++idx) {
+ TTupdateState2 &us = _states[idx];
+ if (us._src == newId) {
+ setState(us._dest);
+ break;
+ }
+ }
+
+ return newId;
}
int LiftbotScript::proc22(int id) const {