diff options
| author | Peter Kohaut | 2019-01-24 22:57:41 +0100 |
|---|---|---|
| committer | Peter Kohaut | 2019-01-24 23:05:13 +0100 |
| commit | 2cc09b6b1097007b6eeac12882c03475e56e1be0 (patch) | |
| tree | 777e076f39c4c7dd246342cfe15b3321076b8c6b /engines/bladerunner/script/scene/dr03.cpp | |
| parent | 2fd29c5193a0b9e6d3920f0512ce3ca37b00bf7e (diff) | |
| download | scummvm-rg350-2cc09b6b1097007b6eeac12882c03475e56e1be0.tar.gz scummvm-rg350-2cc09b6b1097007b6eeac12882c03475e56e1be0.tar.bz2 scummvm-rg350-2cc09b6b1097007b6eeac12882c03475e56e1be0.zip | |
BLADERUNNER: Fixes for game scripts & cleanup
Diffstat (limited to 'engines/bladerunner/script/scene/dr03.cpp')
| -rw-r--r-- | engines/bladerunner/script/scene/dr03.cpp | 176 |
1 files changed, 108 insertions, 68 deletions
diff --git a/engines/bladerunner/script/scene/dr03.cpp b/engines/bladerunner/script/scene/dr03.cpp index f012c68ea5..008cf45840 100644 --- a/engines/bladerunner/script/scene/dr03.cpp +++ b/engines/bladerunner/script/scene/dr03.cpp @@ -29,8 +29,11 @@ void SceneScriptDR03::InitializeScene() { Game_Flag_Reset(kFlagDR02toDR03); Setup_Scene_Information(330.31f, 4.27f, -910.91f, 297); } + Setup_Scene_Information(330.31f, 4.27f, -910.91f, 297); + Scene_Exit_Add_2D_Exit(0, 377, 122, 445, 266, 0); + if (Global_Variable_Query(kVariableChapter) == 3) { Actor_Put_In_Set(kActorChew, kSetDR03); Actor_Set_At_XYZ(kActorChew, 431.21f, 4.27f, -776.26f, 0); @@ -38,10 +41,11 @@ void SceneScriptDR03::InitializeScene() { Actor_Put_In_Set(kActorChew, kSetDR03); Actor_Set_At_XYZ(kActorChew, 360.77f, 4.4f, -806.67f, 126); } + Ambient_Sounds_Remove_All_Looping_Sounds(1); - Ambient_Sounds_Add_Looping_Sound(110, 7, 0, 1); - Ambient_Sounds_Add_Looping_Sound(109, 50, 0, 1); - Ambient_Sounds_Add_Looping_Sound(95, 20, 70, 1); + Ambient_Sounds_Add_Looping_Sound(110, 7, 0, 1); + Ambient_Sounds_Add_Looping_Sound(109, 50, 0, 1); + Ambient_Sounds_Add_Looping_Sound( 95, 20, 70, 1); } void SceneScriptDR03::SceneLoaded() { @@ -62,6 +66,7 @@ bool SceneScriptDR03::ClickedOnActor(int actorId) { if (actorId == kActorChew) { Actor_Face_Actor(kActorMcCoy, kActorChew, true); Actor_Face_Actor(kActorChew, kActorMcCoy, true); + if (!Game_Flag_Query(kFlagDR03ChewTalk1)) { Actor_Says(kActorMcCoy, 755, 18); Actor_Says(kActorChew, 10, 14); @@ -72,52 +77,62 @@ bool SceneScriptDR03::ClickedOnActor(int actorId) { Game_Flag_Set(kFlagDR03ChewTalk1); return true; } - if (Actor_Clue_Query(kActorMcCoy, kClueChewInterview)) { - if (Game_Flag_Query(kFlagMorajiExploded) - && Game_Flag_Query(kFlagDR03ChewTalk1)) { - Actor_Says(kActorMcCoy, 815, 18); - Actor_Says(kActorChew, 60, 14); - Actor_Says(kActorChew, 70, 14); - Actor_Says(kActorChew, 80, 14); - Actor_Says(kActorMcCoy, 820, 18); - Actor_Says(kActorChew, 90, 14); - Actor_Says(kActorMcCoy, 825, 18); - Actor_Says(kActorChew, 100, 14); - Game_Flag_Reset(kFlagMorajiExploded); - Game_Flag_Set(505); - return true; - } - if ((Actor_Clue_Query(kActorMcCoy, kClueDNATyrell) || Actor_Clue_Query(kActorMcCoy, kClueAnsweringMachineMessage) || Actor_Clue_Query(kActorMcCoy, kClueEnvelope) || Actor_Clue_Query(kActorMcCoy, kClueChewInterview)) - && Game_Flag_Query(505)) { - sub_401B18(); - } else { - Actor_Says(kActorMcCoy, 810, 18); - Actor_Says(kActorChew, 40, 14); - Actor_Says(kActorChew, 50, 14); + + if (!Actor_Clue_Query(kActorMcCoy, kClueChewInterview)) { + Actor_Says(kActorMcCoy, 770, 12); + Actor_Says(kActorChew, 110, 12); + Actor_Says(kActorChew, 120, 13); + Actor_Says(kActorMcCoy, 835, 13); + Actor_Says(kActorChew, 130, 14); + Actor_Says(kActorMcCoy, 840, 16); + Actor_Says(kActorChew, 140, 15); + if (!Game_Flag_Query(kFlagDR03ChewTalkExplosion)) { + Actor_Says(kActorChew, 150, 13); + Actor_Says(kActorMcCoy, 845, 17); + Actor_Says(kActorChew, 170, 18); + Actor_Says(kActorChew, 180, 16); + Actor_Says(kActorMcCoy, 850, 15); + Actor_Says(kActorChew, 190, 14); + Actor_Says(kActorChew, 200, 13); + Actor_Says(kActorMcCoy, 855, 18); + Actor_Says(kActorChew, 210, 12); } + Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, true, kActorChew); return true; } - Actor_Says(kActorMcCoy, 770, 12); - Actor_Says(kActorChew, 110, 12); - Actor_Says(kActorChew, 120, 13); - Actor_Says(kActorMcCoy, 835, 13); - Actor_Says(kActorChew, 130, 14); - Actor_Says(kActorMcCoy, 840, 16); - Actor_Says(kActorChew, 140, 15); - if (!Game_Flag_Query(505)) { - Actor_Says(kActorChew, 150, 13); - Actor_Says(kActorMcCoy, 845, 17); - Actor_Says(kActorChew, 170, 18); - Actor_Says(kActorChew, 180, 16); - Actor_Says(kActorMcCoy, 850, 15); - Actor_Says(kActorChew, 190, 14); - Actor_Says(kActorChew, 200, 13); - Actor_Says(kActorMcCoy, 855, 18); - Actor_Says(kActorChew, 210, 12); + + if (Game_Flag_Query(kFlagDR05JustExploded) + && Game_Flag_Query(kFlagDR03ChewTalk1) + ) { + Actor_Says(kActorMcCoy, 815, 18); + Actor_Says(kActorChew, 60, 14); + Actor_Says(kActorChew, 70, 14); + Actor_Says(kActorChew, 80, 14); + Actor_Says(kActorMcCoy, 820, 18); + Actor_Says(kActorChew, 90, 14); + Actor_Says(kActorMcCoy, 825, 18); + Actor_Says(kActorChew, 100, 14); + Game_Flag_Reset(kFlagDR05JustExploded); + Game_Flag_Set(kFlagDR03ChewTalkExplosion); + return true; + } + + if ((Actor_Clue_Query(kActorMcCoy, kClueDNATyrell) + || Actor_Clue_Query(kActorMcCoy, kClueAnsweringMachineMessage) + || Actor_Clue_Query(kActorMcCoy, kClueEnvelope) + || Actor_Clue_Query(kActorMcCoy, kClueChewInterview) + ) + && Game_Flag_Query(kFlagDR03ChewTalkExplosion) + ) { + dialogueWithChew(); + } else { + Actor_Says(kActorMcCoy, 810, 18); + Actor_Says(kActorChew, 40, 14); + Actor_Says(kActorChew, 50, 14); } - Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, true, kActorChew); return true; } + return false; } @@ -141,7 +156,21 @@ bool SceneScriptDR03::ClickedOn2DRegion(int region) { } void SceneScriptDR03::SceneFrameAdvanced(int frame) { - if (frame == 1 || frame == 4 || frame == 8 || frame == 10 || frame == 19 || frame == 21 || frame == 22 || frame == 23 || frame == 30 || frame == 31 || frame == 32 || frame == 33 || frame == 46 || frame == 49) { + if (frame == 1 + || frame == 4 + || frame == 8 + || frame == 10 + || frame == 19 + || frame == 21 + || frame == 22 + || frame == 23 + || frame == 30 + || frame == 31 + || frame == 32 + || frame == 33 + || frame == 46 + || frame == 49 + ) { if (Random_Query(0, 1)) { Sound_Play(97, Random_Query(20, 33), 80, 80, 50); } else { @@ -174,31 +203,36 @@ void SceneScriptDR03::PlayerWalkedOut() { void SceneScriptDR03::DialogueQueueFlushed(int a1) { } -void SceneScriptDR03::sub_401B18() { +void SceneScriptDR03::dialogueWithChew() { Dialogue_Menu_Clear_List(); - if (Actor_Clue_Query(kActorMcCoy, kClueChewInterview) || Actor_Clue_Query(kActorMcCoy, kClueAnsweringMachineMessage) || Actor_Clue_Query(kActorMcCoy, kClueMorajiInterview)) { - DM_Add_To_List_Never_Repeat_Once_Selected(650, 5, 5, 5); + if (Actor_Clue_Query(kActorMcCoy, kClueChewInterview) + || Actor_Clue_Query(kActorMcCoy, kClueAnsweringMachineMessage) + || Actor_Clue_Query(kActorMcCoy, kClueMorajiInterview) + ) { + DM_Add_To_List_Never_Repeat_Once_Selected(650, 5, 5, 5); // TWINS } if (Actor_Clue_Query(kActorMcCoy, kClueChewInterview)) { - DM_Add_To_List_Never_Repeat_Once_Selected(660, 5, 5, 5); + DM_Add_To_List_Never_Repeat_Once_Selected(660, 5, 5, 5); // MORAJI } if (Actor_Clue_Query(kActorMcCoy, kClueTyrellInterview)) { - DM_Add_To_List_Never_Repeat_Once_Selected(670, 6, 5, 2); + DM_Add_To_List_Never_Repeat_Once_Selected(670, 6, 5, 2); // TYRELL } - if (Game_Flag_Query(505)) { + if (Game_Flag_Query(kFlagDR03ChewTalkExplosion)) { if (Actor_Clue_Query(kActorMcCoy, kClueAnsweringMachineMessage)) { - DM_Add_To_List_Never_Repeat_Once_Selected(680, 8, 8, 8); + DM_Add_To_List_Never_Repeat_Once_Selected(680, 8, 8, 8); // SEBASTIAN } if (Actor_Clue_Query(kActorMcCoy, kClueEnvelope)) { - DM_Add_To_List_Never_Repeat_Once_Selected(1270, 2, 5, 7); + DM_Add_To_List_Never_Repeat_Once_Selected(1270, 2, 5, 7); // LANCE'S ENVELOPE } } - Dialogue_Menu_Add_DONE_To_List(690); + Dialogue_Menu_Add_DONE_To_List(690); // DONE + Dialogue_Menu_Appear(320, 240); int answer = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); + switch (answer) { - case 640: + case 640: // EISENDULLER Actor_Says(kActorMcCoy, 770, 12); Actor_Says(kActorChew, 110, 12); Actor_Says(kActorChew, 120, 13); @@ -206,7 +240,7 @@ void SceneScriptDR03::sub_401B18() { Actor_Says(kActorChew, 130, 14); Actor_Says(kActorMcCoy, 840, 16); Actor_Says(kActorChew, 140, 15); - if (!Game_Flag_Query(505)) { + if (!Game_Flag_Query(kFlagDR03ChewTalkExplosion)) { Actor_Says(kActorChew, 150, 13); Actor_Says(kActorMcCoy, 845, 17); Actor_Says(kActorChew, 170, 18); @@ -219,7 +253,8 @@ void SceneScriptDR03::sub_401B18() { } Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, true, kActorChew); break; - case 650: + + case 650: // TWINS Actor_Says(kActorMcCoy, 775, 11); Actor_Says(kActorChew, 220, 14); Actor_Says(kActorMcCoy, 860, 11); @@ -228,9 +263,10 @@ void SceneScriptDR03::sub_401B18() { Actor_Says(kActorChew, 240, 14); Actor_Says(kActorChew, 250, 14); break; - case 660: + + case 660: // MORAJI Actor_Says(kActorMcCoy, 780, 13); - if (Game_Flag_Query(505)) { + if (Game_Flag_Query(kFlagDR03ChewTalkExplosion)) { Actor_Says(kActorChew, 260, 14); Actor_Says(kActorChew, 270, 13); Actor_Says(kActorChew, 280, 12); @@ -240,34 +276,41 @@ void SceneScriptDR03::sub_401B18() { Actor_Says(kActorChew, 280, 12); Actor_Says(kActorMcCoy, 870, 18); Actor_Says(kActorChew, 290, 15); - if (!Game_Flag_Query(kFlagMorajiExploded)) { + if (!Game_Flag_Query(kFlagDR05JustExploded)) { Actor_Says(kActorChew, 300, 12); } } Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, true, kActorChew); break; - case 670: + + case 670: // TYRELL Actor_Says(kActorMcCoy, 765, 12); Actor_Says(kActorMcCoy, 790, 13); Actor_Says(kActorChew, 310, 12); Actor_Says(kActorChew, 320, 3); break; - case 680: + + case 680: // SEBASTIAN Actor_Says(kActorMcCoy, 795, 3); - if (Game_Flag_Query(505) == 1) { + if (Game_Flag_Query(kFlagDR03ChewTalkExplosion)) { Actor_Says(kActorChew, 330, 12); Actor_Says(kActorChew, 340, 15); Actor_Says(kActorMcCoy, 875, 16); Actor_Says(kActorChew, 350, 12); Actor_Says(kActorChew, 360, 15); - Game_Flag_Set(326); + Game_Flag_Set(kFlagBB01Available); } else { Actor_Says(kActorChew, 320, 13); Actor_Says(kActorChew, 150, 14); - Game_Flag_Set(326); + Game_Flag_Set(kFlagBB01Available); } break; - case 1270: + + case 690: // DONE + Actor_Says(kActorMcCoy, 805, 3); + break; + + case 1270: // LANCE'S ENVELOPE Actor_Says(kActorMcCoy, 800, 16); Actor_Says(kActorChew, 370, 3); Actor_Says(kActorMcCoy, 880, 15); @@ -280,9 +323,6 @@ void SceneScriptDR03::sub_401B18() { Actor_Says(kActorChew, 420, 13); Actor_Says(kActorChew, 430, 12); break; - case 690: - Actor_Says(kActorMcCoy, 805, 3); - break; } } |
