diff options
Diffstat (limited to 'engines/bladerunner/script/scene/bb06.cpp')
-rw-r--r-- | engines/bladerunner/script/scene/bb06.cpp | 63 |
1 files changed, 35 insertions, 28 deletions
diff --git a/engines/bladerunner/script/scene/bb06.cpp b/engines/bladerunner/script/scene/bb06.cpp index 7821b735e2..51fc0db2c0 100644 --- a/engines/bladerunner/script/scene/bb06.cpp +++ b/engines/bladerunner/script/scene/bb06.cpp @@ -25,49 +25,54 @@ namespace BladeRunner { void SceneScriptBB06::InitializeScene() { - if (Game_Flag_Query(394)) { - Setup_Scene_Information(76.0f, 0.0f, 79.0f, 622); - } else if (Game_Flag_Query(395)) { - Setup_Scene_Information(55.0f, 0.0f, -96.0f, 761); - } else if (Game_Flag_Query(362)) { + if (Game_Flag_Query(kFlagBB51toBB06a)) { + Setup_Scene_Information( 76.0f, 0.0f, 79.0f, 622); + } else if (Game_Flag_Query(kFlagBB51toBB06b)) { + Setup_Scene_Information( 55.0f, 0.0f, -96.0f, 761); + } else if (Game_Flag_Query(kFlagBB07toBB06)) { Setup_Scene_Information(-115.0f, 0.0f, -103.0f, 375); - Game_Flag_Reset(362); + Game_Flag_Reset(kFlagBB07toBB06); } else { Setup_Scene_Information(-37.0f, 0.0f, 178.0f, 0); } - Scene_Exit_Add_2D_Exit(0, 0, 43, 14, 478, 3); - Scene_Exit_Add_2D_Exit(1, 425, 0, 639, 361, 0); + + Scene_Exit_Add_2D_Exit(0, 0, 43, 14, 478, 3); + Scene_Exit_Add_2D_Exit(1, 425, 0, 639, 361, 0); Scene_Exit_Add_2D_Exit(3, 195, 164, 239, 280, 3); + Ambient_Sounds_Add_Looping_Sound(103, 28, 0, 1); - Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); - if (Game_Flag_Query(394) || Game_Flag_Query(395)) { - Scene_Loop_Start_Special(0, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0); + + if (Game_Flag_Query(kFlagBB51toBB06a) + || Game_Flag_Query(kFlagBB51toBB06b) + ) { + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); Scene_Loop_Set_Default(1); - Game_Flag_Reset(394); - Game_Flag_Reset(395); + Game_Flag_Reset(kFlagBB51toBB06a); + Game_Flag_Reset(kFlagBB51toBB06b); } else { Scene_Loop_Set_Default(1); } if (Game_Flag_Query(410)) { - Overlay_Play("BB06OVER", 1, 1, 0, 0); + Overlay_Play("BB06OVER", 1, true, false, 0); } } void SceneScriptBB06::SceneLoaded() { Obstacle_Object("V2CHESSTBL01", true); Clickable_Object("BOX31"); - Item_Add_To_World(77, 931, 2, -127.0f, 68.42f, 57.0f, 0, 8, 8, true, true, false, true); + Item_Add_To_World(77, 931, kSetBB02_BB04_BB06_BB51, -127.0f, 68.42f, 57.0f, 0, 8, 8, true, true, false, true); } bool SceneScriptBB06::MouseClick(int x, int y) { @@ -96,7 +101,7 @@ bool SceneScriptBB06::ClickedOnActor(int actorId) { bool SceneScriptBB06::ClickedOnItem(int itemId, bool a2) { if (itemId == 77) { if (Player_Query_Combat_Mode()) { - Overlay_Play("BB06OVER", 1, 1, 1, 0); + Overlay_Play("BB06OVER", 1, true, true, 0); Game_Flag_Set(410); Item_Remove_From_World(77); return true; @@ -107,7 +112,7 @@ bool SceneScriptBB06::ClickedOnItem(int itemId, bool a2) { bool SceneScriptBB06::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -37.0f, 0.0f, 178.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -37.0f, 0.0f, 178.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagBB06toBB05); @@ -115,20 +120,22 @@ bool SceneScriptBB06::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 101.0f, 0.0f, -25.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 101.0f, 0.0f, -25.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(393); + Game_Flag_Set(kFlagBB06toBB51); Set_Enter(kSetBB02_BB04_BB06_BB51, kSceneBB51); } return true; } + if (exitId == 3) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -115.0f, 0.0f, -103.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -115.0f, 0.0f, -103.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(363); + Game_Flag_Set(kFlagBB06toBB07); Set_Enter(kSetBB06_BB07, kSceneBB07); } return true; |