diff options
Diffstat (limited to 'engines/bladerunner/script/scene/ug15.cpp')
-rw-r--r-- | engines/bladerunner/script/scene/ug15.cpp | 116 |
1 files changed, 65 insertions, 51 deletions
diff --git a/engines/bladerunner/script/scene/ug15.cpp b/engines/bladerunner/script/scene/ug15.cpp index 4743c8d336..13408bbfab 100644 --- a/engines/bladerunner/script/scene/ug15.cpp +++ b/engines/bladerunner/script/scene/ug15.cpp @@ -25,57 +25,62 @@ namespace BladeRunner { void SceneScriptUG15::InitializeScene() { - if (Game_Flag_Query(353)) { - Setup_Scene_Information(-25.0f, 26.31f, -434.0f, 520); - } else if (Game_Flag_Query(kFlagUG16toUG15)) { - Setup_Scene_Information(-17.0f, 26.31f, -346.0f, 711); - } else if (Game_Flag_Query(355)) { - Setup_Scene_Information(-18.0f, 48.07f, 62.0f, 650); + if (Game_Flag_Query(kFlagUG17toUG15)) { + Setup_Scene_Information( -25.0f, 26.31f, -434.0f, 520); + } else if (Game_Flag_Query(kFlagUG16toUG15a)) { + Setup_Scene_Information( -17.0f, 26.31f, -346.0f, 711); + } else if (Game_Flag_Query(kFlagUG16toUG15b)) { + Setup_Scene_Information( -18.0f, 48.07f, 62.0f, 650); } else { - Setup_Scene_Information(-238.0f, 48.07f, 222.0f, 180); - if (Game_Flag_Query(676) && Random_Query(1, 10) == 10) { + Setup_Scene_Information(-238.0f, 48.07f, 222.0f, 180); + if (Game_Flag_Query(676) + && Random_Query(1, 10) == 10 + ) { Game_Flag_Reset(676); } } if (Game_Flag_Query(682)) { Scene_Loop_Set_Default(3); } - if (Game_Flag_Query(353) || Game_Flag_Query(kFlagUG16toUG15)) { - Scene_Exit_Add_2D_Exit(0, 260, 0, 307, 298, 0); + + if (Game_Flag_Query(kFlagUG17toUG15) + || Game_Flag_Query(kFlagUG16toUG15a) + ) { + Scene_Exit_Add_2D_Exit(0, 260, 0, 307, 298, 0); Scene_Exit_Add_2D_Exit(1, 301, 147, 337, 304, 1); - Game_Flag_Reset(353); - Game_Flag_Reset(kFlagUG16toUG15); + Game_Flag_Reset(kFlagUG17toUG15); + Game_Flag_Reset(kFlagUG16toUG15a); } else { Scene_Exit_Add_2D_Exit(2, 406, 128, 480, 316, 1); - Scene_Exit_Add_2D_Exit(3, 0, 0, 30, 479, 3); + Scene_Exit_Add_2D_Exit(3, 0, 0, 30, 479, 3); } + Ambient_Sounds_Add_Looping_Sound(105, 71, 0, 1); - Ambient_Sounds_Add_Looping_Sound(95, 45, 0, 1); + Ambient_Sounds_Add_Looping_Sound( 95, 45, 0, 1); Ambient_Sounds_Add_Looping_Sound(332, 76, 0, 1); - Ambient_Sounds_Add_Sound(291, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(292, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(293, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(294, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(295, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(303, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(1, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(57, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(58, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(306, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(307, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(308, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(196, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(197, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(198, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(199, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); - + Ambient_Sounds_Add_Sound(291, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(292, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(293, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(294, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(295, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(303, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 1, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 57, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 58, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(306, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(307, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(308, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(196, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(197, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(198, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(199, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0); } void SceneScriptUG15::SceneLoaded() { @@ -107,20 +112,22 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -25.0f, 26.31f, -434.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(352); + Game_Flag_Set(kFlagUG15toUG17); Set_Enter(kSetUG17, kSceneUG17); } return true; } + if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -17.0f, 26.31f, -346.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(kFlagUG15toUG16); + Game_Flag_Set(kFlagUG15toUG16a); Set_Enter(kSetUG16, kSceneUG16); } return true; } + if (exitId == 2) { int v1 = Actor_Query_Goal_Number(kActorFreeSlotA); if (v1 >= 300 && v1 <= 303) { @@ -128,22 +135,22 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) { } else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 18.0f, 52.28f, 46.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(354); + Game_Flag_Set(kFlagUG15toUG16b); Set_Enter(kSetUG16, kSceneUG16); } return true; } + if (exitId == 3) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -238.0f, 52.46f, 222.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(350); + Game_Flag_Set(kFlagUG15toUG13); Set_Enter(kSetUG13, kSceneUG13); } return true; } return false; - } bool SceneScriptUG15::ClickedOn2DRegion(int region) { @@ -154,7 +161,9 @@ void SceneScriptUG15::SceneFrameAdvanced(int frame) { if (Actor_Query_Goal_Number(kActorFreeSlotA) == 300) { float x, y, z; Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); - if (-160.0f <= x && z < 220.0f) { + if (-160.0f <= x + && z < 220.0f + ) { Actor_Set_Goal_Number(kActorFreeSlotA, 301); } } @@ -164,14 +173,19 @@ void SceneScriptUG15::SceneFrameAdvanced(int frame) { if (Game_Flag_Query(677) && !Game_Flag_Query(682)) { float x, y, z; Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); - if (-180.0f <= x && (z < 220.0f && !Game_Flag_Query(724))) { + if (-180.0f <= x + && z < 220.0f + && !Game_Flag_Query(724) + ) { Game_Flag_Set(724); Game_Flag_Set(682); Scene_Loop_Set_Default(3); Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true); Actor_Set_Goal_Number(kActorMcCoy, 390); Actor_Query_XYZ(kActorFreeSlotA, &x, &y, &z); - if (-200.0f < x && -62.0f > x) { + if (-200.0f < x + && -62.0f > x + ) { Actor_Set_Goal_Number(kActorFreeSlotA, 309); } } @@ -183,11 +197,11 @@ void SceneScriptUG15::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptUG15::PlayerWalkedIn() { - if (Game_Flag_Query(355)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -62.0f, 48.07f, 102.0f, 0, 0, false, 0); - Game_Flag_Reset(355); - } else if (Game_Flag_Query(351)) { - Game_Flag_Reset(351); + if (Game_Flag_Query(kFlagUG16toUG15b)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -62.0f, 48.07f, 102.0f, 0, false, false, 0); + Game_Flag_Reset(kFlagUG16toUG15b); + } else if (Game_Flag_Query(kFlagUG13toUG15)) { + Game_Flag_Reset(kFlagUG13toUG15); if (!Game_Flag_Query(676)) { Actor_Set_Goal_Number(kActorFreeSlotA, 310); } |