diff options
author | Paul Gilbert | 2017-09-26 21:08:06 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-09-26 21:08:06 -0400 |
commit | a65a0c47688c54bd2d07758420596e1821821c1b (patch) | |
tree | f6e1eaa5ce2e2c30a36bf93ad90bbd9ee76c7fa0 /engines | |
parent | bd388fed62a8d55e542eca5aa2bc46677f1a5f74 (diff) | |
download | scummvm-rg350-a65a0c47688c54bd2d07758420596e1821821c1b.tar.gz scummvm-rg350-a65a0c47688c54bd2d07758420596e1821821c1b.tar.bz2 scummvm-rg350-a65a0c47688c54bd2d07758420596e1821821c1b.zip |
TITANIC: DE: Fix switch in DeskbotScript::doSentenceEntry
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/true_talk/deskbot_script.cpp | 82 |
1 files changed, 52 insertions, 30 deletions
diff --git a/engines/titanic/true_talk/deskbot_script.cpp b/engines/titanic/true_talk/deskbot_script.cpp index 128868c84e..f45b1b1358 100644 --- a/engines/titanic/true_talk/deskbot_script.cpp +++ b/engines/titanic/true_talk/deskbot_script.cpp @@ -386,48 +386,70 @@ uint DeskbotScript::getDialsBitset() const { } int DeskbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) { - uint id; + uint id = *srcIdP; - if (g_language == Common::DE_DEU && val1 != 4501) - return TTnpcScript::doSentenceEntry(val1, srcIdP, roomScript, sentence); + if (g_language == Common::DE_DEU) { + if (val1 != 4501) + return TTnpcScript::doSentenceEntry(val1, srcIdP, roomScript, sentence); - switch (val1) { - case 1: - id = *srcIdP; - if (id == 240431 || id == 240432) { - switch (getValue(1)) { - case 1: - id = 240336; - break; - case 2: - id = addAssignedRoomDialogue(); - break; - case 3: + switch (getValue(1)) { + case 1: + id = 240336; + break; + case 2: + addAssignedRoom(); + break; + case 3: + if (id == 240431 || id == 240432) { if (getValue(3) == 1) { if (id == 240431) id = 240432; - } - else { + } else { if (id == 240432) id = 240431; } - default: - break; } - - addResponse(getDialogueId(id)); - applyResponse(); - return 2; + break; + default: + break; } - break; + } else { + switch (val1) { + case 1: + if (id == 240431 || id == 240432) { + switch (getValue(1)) { + case 1: + id = 240336; + break; + case 2: + id = addAssignedRoomDialogue(); + break; + case 3: + if (getValue(3) == 1) { + if (id == 240431) + id = 240432; + } else { + if (id == 240432) + id = 240431; + } + default: + break; + } - case 2: - if (getValue(1) == 1) - return true; - break; + addResponse(getDialogueId(id)); + applyResponse(); + return 2; + } + break; - default: - break; + case 2: + if (getValue(1) == 1) + return true; + break; + + default: + break; + } } return 0; |