aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-06-02 07:48:25 -0400
committerPaul Gilbert2016-07-15 19:18:59 -0400
commit95dc0bc4ccf51de23ab30133d6d1f339936ad413 (patch)
treee9e1eaf9b93c96fe8144a243bf233e507ae25507
parentb1ae3f44db79c7dc4ce31985dc5ca072fc1c9d76 (diff)
downloadscummvm-rg350-95dc0bc4ccf51de23ab30133d6d1f339936ad413.tar.gz
scummvm-rg350-95dc0bc4ccf51de23ab30133d6d1f339936ad413.tar.bz2
scummvm-rg350-95dc0bc4ccf51de23ab30133d6d1f339936ad413.zip
TITANIC: Finished BarbotScript chooseResponse
-rw-r--r--engines/titanic/true_talk/barbot_script.cpp47
-rw-r--r--engines/titanic/true_talk/tt_npc_script.h3
2 files changed, 45 insertions, 5 deletions
diff --git a/engines/titanic/true_talk/barbot_script.cpp b/engines/titanic/true_talk/barbot_script.cpp
index ed7e083897..16bc2447b6 100644
--- a/engines/titanic/true_talk/barbot_script.cpp
+++ b/engines/titanic/true_talk/barbot_script.cpp
@@ -49,14 +49,53 @@ int BarbotScript::chooseResponse(TTroomScript *roomScript, TTsentence *sentence,
applyResponse();
return 2;
- }
+
+ } else if (tag == MKTAG('S', 'W', 'E', 'R')) {
+ adjustDial(0, -18);
+ adjustDial(1, -5);
+
+ if (getRandomNumber(100) > 50) {
+ addResponse(getDialogueId(getDialRegion(0) == 0 ? 250200 : 250062));
+ applyResponse();
+ return 2;
+ }
+
+ } else if (tag == MKTAG('B', 'A', 'R', 'K') && getRandomNumber(100) > 50) {
+ proc14(250025);
+ switch (proc23()) {
+ case 4:
+ case 6:
+ addResponse(getDialogueId(250125));
+ break;
+ default:
+ break;
+ }
+
+ applyResponse();
+ return 2;
- if (tag == MKTAG('S', 'W', 'E', 'R')) {
+ } else if (tag == MKTAG('B', 'A', 'R', 'U') && getRandomNumber(100) > 50) {
+ proc14(250025);
+ switch (proc23()) {
+ case 4:
+ case 6:
+ addResponse(getDialogueId(250112));
+ break;
+ default:
+ break;
+ }
+ applyResponse();
+ return 2;
}
- warning("TODO");
- return SS_2;
+ if (tag == MKTAG('T', 'H', 'R', 'T') || tag == MKTAG('S', 'L', 'O', 'W') ||
+ tag == MKTAG('S', 'E', 'X', '1') || tag == MKTAG('P', 'K', 'U', 'P')) {
+ adjustDial(0, -7);
+ adjustDial(1, -3);
+ }
+
+ return TTnpcScript::chooseResponse(roomScript, sentence, tag);
}
void BarbotScript::proc7(int v1, int v2) {
diff --git a/engines/titanic/true_talk/tt_npc_script.h b/engines/titanic/true_talk/tt_npc_script.h
index 69934ce863..906489ec3b 100644
--- a/engines/titanic/true_talk/tt_npc_script.h
+++ b/engines/titanic/true_talk/tt_npc_script.h
@@ -198,7 +198,8 @@ public:
virtual int getDialRegion(int dialNum);
/**
- * Get the NPC's dial level
+ * Gets the value for a dial, introducing a slight random variance so that
+ * the displayed dial will oscillate randomly around it's real level
*/
virtual int getDialLevel(uint dialNum, bool flag = true);