diff options
author | Peter Kohaut | 2019-01-31 20:20:21 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-01-31 21:27:31 +0100 |
commit | 69be53530853e432d7ee6e613614d0def7de0049 (patch) | |
tree | e85044842b49d06c0d0fbee62d6e3fe1d9606d54 | |
parent | 49d01c3c135633b3951fbf797eb5735db2a9470e (diff) | |
download | scummvm-rg350-69be53530853e432d7ee6e613614d0def7de0049.tar.gz scummvm-rg350-69be53530853e432d7ee6e613614d0def7de0049.tar.bz2 scummvm-rg350-69be53530853e432d7ee6e613614d0def7de0049.zip |
BLADERUNNER: Initial cleanup of underground scripts
22 files changed, 472 insertions, 304 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index 74db6f9e38..8eb4960e97 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -849,9 +849,22 @@ enum Flags { // 408 is never used kFlagMA01GaffApproachMcCoy = 409, kFlagBB06AndroidDestroyed = 410, + kFlagKP02toUG12 = 411, + kFlagUG12toKP02 = 412, // is never checked + + kFlagUG07toUG10 = 423, + kFlagUG10toUG07 = 424, // is never checked + kFlagUG07toUG08 = 425, // is never checked + kFlagUG08toUG07 = 426, + kFlagUG07toUG09 = 427, // is never checked + kFlagUG09ToUG07 = 428, + kFlagUG08toUG13 = 429, + kFlagUG13toUG08 = 430, kFlagUG09toCT12 = 432, kFlagCT12ToUG09 = 433, + kFlagUG13toUG18 = 434, // is never checked + kFlagUG18toUG13 = 435, kFlagNR04toNR03 = 437, kFlagNR03toNR04 = 438, kFlagNR06toNR08 = 439, @@ -860,6 +873,8 @@ enum Flags { kFlagNR07toNR06 = 442, kFlagGenericWalkerWaiting = 443, kFlagIzoShot = 444, + kFlagTB03toUG17 = 447, + kFlagUG17toTB03 = 448, kFlagUG02WeaponsChecked = 449, kFlagTB02ElevatorToTB05 = 450, kFlagTB05Entered = 451, @@ -939,7 +954,10 @@ enum Flags { kFlagNR05toNR08 = 546, kFlagNR08toNR05 = 547, kFlagDR06MannequinHeadOpen = 548, + kFlagTB03Entered = 549, kFlagMcCoyTiedDown = 550, + kFlagUG16toDR06 = 551, // is never checked + kFlagDR06toUG16 = 552, kFlagDR01toCT11 = 558, kFlagNR02GordoLeaveLighter = 561, kFlagHF05CrazyLegsTalk1 = 562, @@ -1011,6 +1029,7 @@ enum Flags { kFlagNR11BreakWindow = 659, kFlagDNARowAvailableTalk = 660, kFlagTB07ShadeDown = 661, // is never set + kFlagUG19Available = 665, kFlagMA07toPS14 = 672, kFlagPS14toMA07 = 673, kFlagChapter2Intro = 678, diff --git a/engines/bladerunner/script/scene/dr06.cpp b/engines/bladerunner/script/scene/dr06.cpp index 441d7bdf4a..51a3841bf2 100644 --- a/engines/bladerunner/script/scene/dr06.cpp +++ b/engines/bladerunner/script/scene/dr06.cpp @@ -204,7 +204,7 @@ bool SceneScriptDR06::ClickedOnExit(int exitId) { } if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -707.57f, 136.6f, -1132.64f, 0, true, false, 0)) { - Game_Flag_Set(552); + Game_Flag_Set(kFlagDR06toUG16); Set_Enter(kSetUG16, kSceneUG16); } return true; @@ -227,7 +227,7 @@ void SceneScriptDR06::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -729.57f, 136.6f, -1016.0f, 0, false, false, 0); } Game_Flag_Reset(kFlagDR04toDR06); - Game_Flag_Reset(551); + Game_Flag_Reset(kFlagUG16toDR06); } void SceneScriptDR06::PlayerWalkedOut() { diff --git a/engines/bladerunner/script/scene/kp02.cpp b/engines/bladerunner/script/scene/kp02.cpp index 2233b3d2f5..3db4056197 100644 --- a/engines/bladerunner/script/scene/kp02.cpp +++ b/engines/bladerunner/script/scene/kp02.cpp @@ -29,7 +29,7 @@ void SceneScriptKP02::InitializeScene() { Setup_Scene_Information(-884.0f, -615.49f, 3065.0f, 20); } else { Setup_Scene_Information(-1040.0f, -615.49f, 2903.0f, 339); - Game_Flag_Reset(412); + Game_Flag_Reset(kFlagUG12toKP02); } Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3); Ambient_Sounds_Add_Looping_Sound(464, 34, 1, 1); @@ -83,12 +83,12 @@ bool SceneScriptKP02::ClickedOnExit(int exitId) { Actor_Set_Goal_Number(kActorFreeSlotA, 400); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(411); + Game_Flag_Set(kFlagKP02toUG12); Set_Enter(kSetUG12, kSceneUG12); } else { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(411); + Game_Flag_Set(kFlagKP02toUG12); Set_Enter(kSetUG12, kSceneUG12); } } diff --git a/engines/bladerunner/script/scene/ma07.cpp b/engines/bladerunner/script/scene/ma07.cpp index 70169189cf..65d2332d6c 100644 --- a/engines/bladerunner/script/scene/ma07.cpp +++ b/engines/bladerunner/script/scene/ma07.cpp @@ -28,7 +28,7 @@ void SceneScriptMA07::InitializeScene() { if (Game_Flag_Query(kFlagUG19toMA07)) { Setup_Scene_Information( 6.75f, -172.43f, 356.0f, 997); Game_Flag_Reset(kFlagUG19toMA07); - Game_Flag_Set(665); + Game_Flag_Set(kFlagUG19Available); } else if (Game_Flag_Query(kFlagPS14toMA07)) { Setup_Scene_Information(-312.0f, -162.8f, 180.0f, 0); } else { @@ -46,7 +46,7 @@ void SceneScriptMA07::InitializeScene() { if (Global_Variable_Query(kVariableChapter) > 1) { Scene_Exit_Add_2D_Exit(1, 0, 200, 50, 479, 3); } - if (Game_Flag_Query(665)) { + if (Game_Flag_Query(kFlagUG19Available)) { Scene_Exit_Add_2D_Exit(2, 176, 386, 230, 426, 2); } Scene_Exit_Add_2D_Exit(0, 270, 216, 382, 306, 0); diff --git a/engines/bladerunner/script/scene/tb03.cpp b/engines/bladerunner/script/scene/tb03.cpp index bd4d9c5311..fb26584f3c 100644 --- a/engines/bladerunner/script/scene/tb03.cpp +++ b/engines/bladerunner/script/scene/tb03.cpp @@ -25,13 +25,15 @@ namespace BladeRunner { void SceneScriptTB03::InitializeScene() { - if (Game_Flag_Query(448)) { + if (Game_Flag_Query(kFlagUG17toTB03)) { Setup_Scene_Information(-260.0f, 0.15f, 2014.0f, 276); } else { - Setup_Scene_Information(-152.0f, 0.0f, 1890.0f, 500); + Setup_Scene_Information(-152.0f, 0.0f, 1890.0f, 500); } + Scene_Exit_Add_2D_Exit(0, 25, 227, 81, 300, 0); Scene_Exit_Add_2D_Exit(1, 298, 0, 639, 305, 0); + Ambient_Sounds_Add_Looping_Sound(211, 16, 0, 1); Ambient_Sounds_Add_Sound(212, 2, 15, 16, 20, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(213, 2, 15, 16, 20, 0, 0, -101, -101, 0, 0); @@ -55,6 +57,7 @@ void SceneScriptTB03::InitializeScene() { Ambient_Sounds_Add_Sound(194, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(195, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); } + Actor_Put_In_Set(kActorTyrellGuard, kSetTB02_TB03); Actor_Set_At_XYZ(kActorTyrellGuard, -38.53f, 2.93f, 1475.97f, 673); if (Global_Variable_Query(kVariableChapter) == 4) { @@ -66,17 +69,18 @@ void SceneScriptTB03::InitializeScene() { Actor_Set_Goal_Number(kActorTyrellGuard, 300); } } - if (Game_Flag_Query(448)) { - if (Game_Flag_Query(549)) { + + if (Game_Flag_Query(kFlagUG17toTB03)) { + if (!Game_Flag_Query(kFlagTB03Entered)) { + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); Scene_Loop_Set_Default(1); + Game_Flag_Set(kFlagTB03Entered); } else { - Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(1); - Game_Flag_Set(549); } - Game_Flag_Reset(448); + Game_Flag_Reset(kFlagUG17toTB03); } else { - Scene_Loop_Start_Special(0, 0, 0); + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); Scene_Loop_Set_Default(1); } } @@ -107,11 +111,12 @@ bool SceneScriptTB03::ClickedOnExit(int exitId) { Actor_Set_Goal_Number(kActorTyrellGuard, 304); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(447); + Game_Flag_Set(kFlagTB03toUG17); Set_Enter(kSetUG17, kSceneUG17); } return true; } + if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -152.0f, 0.0f, 1774.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); diff --git a/engines/bladerunner/script/scene/ug01.cpp b/engines/bladerunner/script/scene/ug01.cpp index f1c11fe620..ced4378ca1 100644 --- a/engines/bladerunner/script/scene/ug01.cpp +++ b/engines/bladerunner/script/scene/ug01.cpp @@ -79,7 +79,7 @@ bool SceneScriptUG01::MouseClick(int x, int y) { bool SceneScriptUG01::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("PIPES_FG_LFT", objectName)) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -9.0f, -50.13f, -148.0f, 0, 1, false, 0) + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -9.0f, -50.13f, -148.0f, 0, true, false, 0) && !Game_Flag_Query(kFlagUG01SteamOff) ) { Actor_Says(kActorMcCoy, 8525, 13); @@ -137,7 +137,9 @@ bool SceneScriptUG01::ClickedOn2DRegion(int region) { } void SceneScriptUG01::SceneFrameAdvanced(int frame) { - if (frame >= 61 && frame <= 120) { + if (frame >= 61 + && frame <= 120 + ) { float density = (120 - frame) / 29500.0f; // why is this so big? Set_Fog_Density("BoxFog01", density); Set_Fog_Density("BoxFog02", density); @@ -157,14 +159,14 @@ void SceneScriptUG01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptUG01::PlayerWalkedIn() { if (Game_Flag_Query(kFlagUG02toUG01)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -55.0f, -50.13f, -288.0f, 12, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -55.0f, -50.13f, -288.0f, 12, false, false, 0); Game_Flag_Reset(kFlagUG02toUG01); } if (Game_Flag_Query(kFlagRC03toUG01)) { Actor_Set_At_XYZ(kActorMcCoy, -70.0f, 93.87f, -500.0f, 768); Loop_Actor_Travel_Ladder(kActorMcCoy, 12, 0, 0); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -58.0f, -50.13f, -488.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -58.0f, -50.13f, -488.0f, 0, false, false, 0); Game_Flag_Reset(kFlagRC03toUG01); } diff --git a/engines/bladerunner/script/scene/ug02.cpp b/engines/bladerunner/script/scene/ug02.cpp index 5ac3fad135..12be0c2547 100644 --- a/engines/bladerunner/script/scene/ug02.cpp +++ b/engines/bladerunner/script/scene/ug02.cpp @@ -28,7 +28,7 @@ void SceneScriptUG02::InitializeScene() { if (Game_Flag_Query(kFlagHC03toUG02)) { Setup_Scene_Information(-313.0f, 155.73f, -128.0f, 556); } else { - Setup_Scene_Information(-95.0f, 74.78f, -503.0f, 556); + Setup_Scene_Information( -95.0f, 74.78f, -503.0f, 556); } Scene_Exit_Add_2D_Exit(0, 529, 130, 607, 277, 0); Scene_Exit_Add_2D_Exit(1, 305, 36, 335, 192, 0); @@ -190,7 +190,7 @@ bool SceneScriptUG02::ClickedOnExit(int exitId) { } Loop_Actor_Walk_To_XYZ(kActorMcCoy, -304.75f, 155.75f, -171.0f, 0, false, false, 0); Actor_Face_Heading(kActorMcCoy, 14, false); - Loop_Actor_Travel_Ladder(kActorMcCoy, 9, true, 0); + Loop_Actor_Travel_Ladder(kActorMcCoy, 9, true, kAnimationModeIdle); Game_Flag_Set(kFlagUG02toHC03); Game_Flag_Reset(kFlagMcCoyInUnderground); Game_Flag_Set(kFlagMcCoyInHawkersCircle); diff --git a/engines/bladerunner/script/scene/ug04.cpp b/engines/bladerunner/script/scene/ug04.cpp index 82da71bc61..2f71899023 100644 --- a/engines/bladerunner/script/scene/ug04.cpp +++ b/engines/bladerunner/script/scene/ug04.cpp @@ -59,7 +59,7 @@ void SceneScriptUG04::InitializeScene() { Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); - Scene_Loop_Start_Special(0, 0, 0); + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); Scene_Loop_Set_Default(1); } @@ -95,6 +95,7 @@ bool SceneScriptUG04::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.74f, -2400.0f, 0, true, false, 0)) { Game_Flag_Set(kFlagUG04toUG05); @@ -102,6 +103,7 @@ bool SceneScriptUG04::ClickedOnExit(int exitId) { } return true; } + if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 164.0f, 11.87f, -1013.0f, 0, true, false, 0)) { Game_Flag_Set(kFlagUG04toUG06); diff --git a/engines/bladerunner/script/scene/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp index 1c7edb5897..e02a9bd18b 100644 --- a/engines/bladerunner/script/scene/ug05.cpp +++ b/engines/bladerunner/script/scene/ug05.cpp @@ -31,12 +31,13 @@ void SceneScriptUG05::InitializeScene() { ) { Setup_Scene_Information(-356.35f, 132.77f, -1092.36f, 389); } else { - Setup_Scene_Information(-180.0f, 37.28f, -1124.0f, 296); + Setup_Scene_Information( -180.0f, 37.28f, -1124.0f, 296); } } else { Setup_Scene_Information(0.0f, -1.37f, 0.0f, 0); Game_Flag_Reset(kFlagUG04toUG05); } + Scene_Exit_Add_2D_Exit(0, 215, 240, 254, 331, 3); if (!Game_Flag_Query(663)) { Scene_Exit_Add_2D_Exit(1, 303, 422, 639, 479, 2); @@ -46,26 +47,28 @@ void SceneScriptUG05::InitializeScene() { ) { Scene_Exit_Add_2D_Exit(2, 352, 256, 393, 344, 0); } + Ambient_Sounds_Add_Looping_Sound(105, 28, 0, 1); Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1); Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1); - Ambient_Sounds_Add_Sound(234, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(225, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(226, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(227, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(235, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(391, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(368, 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(395, 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(224, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(228, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(392, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(234, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(225, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(226, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(227, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(235, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(391, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(368, 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(395, 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(224, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(228, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(392, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + if (Game_Flag_Query(368)) { Scene_Loop_Set_Default(2); } else { @@ -89,10 +92,13 @@ bool SceneScriptUG05::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptUG05::ClickedOnActor(int actorId) { - if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, actorId, 30, 1, false)) { + if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, actorId, 30, true, false)) { Actor_Face_Actor(kActorMcCoy, actorId, true); int affectionTowardsActor = getAffectionTowardsActor(); - if (actorId == kActorOfficerGrayford && Game_Flag_Query(368) && !Game_Flag_Query(683)) { + if ( actorId == kActorOfficerGrayford + && Game_Flag_Query(368) + && !Game_Flag_Query(683) + ) { Actor_Says(kActorOfficerGrayford, 220, -1); Actor_Says(kActorMcCoy, 5540, 14); Actor_Says(kActorOfficerGrayford, 230, -1); @@ -118,10 +124,10 @@ bool SceneScriptUG05::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG05::ClickedOnExit(int exitId) { if (exitId == 0) { if (Game_Flag_Query(663) && !Game_Flag_Query(368)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -356.35f, 132.77f, -1092.36f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -356.35f, 132.77f, -1092.36f, 0, false, false, 0); Game_Flag_Set(kFlagUG06toHF07); Set_Enter(kSetHF07, kSceneHF07); - } else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -156.72f, 3.03f, -1118.17f, 0, 1, false, 0)) { + } else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -156.72f, 3.03f, -1118.17f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 760, false); Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, kAnimationModeIdle); Game_Flag_Set(kFlagUG06toHF07); @@ -129,16 +135,18 @@ bool SceneScriptUG05::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 4.0f, -11.67f, -4.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 4.0f, -11.67f, -4.0f, 0, true, false, 0)) { Game_Flag_Set(kFlagUG05toUG04); Set_Enter(kSetUG04, kSceneUG04); } return true; } + if (exitId == 2) { if (!Game_Flag_Query(662)) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.37f, -1500.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.37f, -1500.0f, 0, true, false, 0)) { if (!Game_Flag_Query(522)) { Actor_Voice_Over(2600, kActorVoiceOver); Actor_Voice_Over(2610, kActorVoiceOver); @@ -150,9 +158,9 @@ bool SceneScriptUG05::ClickedOnExit(int exitId) { int affectionTowardsActor = getAffectionTowardsActor(); bool v2; if (affectionTowardsActor == -1) { - v2 = Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.37f, -1500.0f, 0, 1, false, 0) != 0; + v2 = Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.37f, -1500.0f, 0, true, false, 0) != 0; } else { - v2 = Loop_Actor_Walk_To_Actor(kActorMcCoy, affectionTowardsActor, 30, 1, false) != 0; + v2 = Loop_Actor_Walk_To_Actor(kActorMcCoy, affectionTowardsActor, 30, true, false) != 0; } if (!v2) { sub_402218(); @@ -204,13 +212,15 @@ void SceneScriptUG05::PlayerWalkedIn() { } } } + if (Game_Flag_Query(kFlagHF07toUG06)) { if (Game_Flag_Query(663) && !Game_Flag_Query(368)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -288.35f, 132.77f, -1092.36f, 0, 1, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -288.35f, 132.77f, -1092.36f, 0, true, false, 0); } else { Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 0, kAnimationModeIdle); } } + if (Game_Flag_Query(663)) { Game_Flag_Query(368); // bug in game? } @@ -251,8 +261,10 @@ void SceneScriptUG05::sub_402218() { Actor_Says(kActorLucy, 670, 17); } } + Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); + if (affectionTowardsActor == kActorLucy) { if (Game_Flag_Query(kFlagLucyIsReplicant)) { if (Global_Variable_Query(kVariableDNAEvidences) > 3) { @@ -277,6 +289,7 @@ void SceneScriptUG05::sub_402218() { Outtake_Play(kOuttakeEnd3, false, -1); } Outtake_Play(kOuttakeEnd2, false, -1); + Game_Over(); } diff --git a/engines/bladerunner/script/scene/ug06.cpp b/engines/bladerunner/script/scene/ug06.cpp index 174ba75972..99ebc54f3c 100644 --- a/engines/bladerunner/script/scene/ug06.cpp +++ b/engines/bladerunner/script/scene/ug06.cpp @@ -132,11 +132,13 @@ void SceneScriptUG06::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.0f, 0.0f, 273.0f, 0, false, false, 0); Game_Flag_Reset(kFlagUG04toUG06); } + if (Game_Flag_Query(kFlagNR01toUG06)) { Loop_Actor_Travel_Stairs(kActorMcCoy, 17, false, kAnimationModeIdle); Loop_Actor_Walk_To_XYZ(kActorMcCoy, 66.0f, 0.0f, -36.91f, 0, false, false, 0); Game_Flag_Reset(kFlagNR01toUG06); } + if ( Global_Variable_Query(kVariableChapter) == 4 && !Game_Flag_Query(524) ) { diff --git a/engines/bladerunner/script/scene/ug07.cpp b/engines/bladerunner/script/scene/ug07.cpp index f31660c7b5..1b0994331d 100644 --- a/engines/bladerunner/script/scene/ug07.cpp +++ b/engines/bladerunner/script/scene/ug07.cpp @@ -25,36 +25,38 @@ namespace BladeRunner { void SceneScriptUG07::InitializeScene() { - if (Game_Flag_Query(428)) { + if (Game_Flag_Query(kFlagUG09ToUG07)) { Setup_Scene_Information(-76.0f, -12.21f, -738.0f, 505); - Game_Flag_Reset(428); - } else if (Game_Flag_Query(426)) { + Game_Flag_Reset(kFlagUG09ToUG07); + } else if (Game_Flag_Query(kFlagUG08toUG07)) { Setup_Scene_Information(110.0f, -12.21f, -276.0f, 605); } else { - Setup_Scene_Information(-10.0f, -12.21f, -58.0f, 0); - Game_Flag_Reset(424); + Setup_Scene_Information(-10.0f, -12.21f, -58.0f, 0); + Game_Flag_Reset(kFlagUG10toUG07); } + if (Game_Flag_Query(623)) { - Scene_Exit_Add_2D_Exit(0, 0, 192, 51, 334, 0); + Scene_Exit_Add_2D_Exit(0, 0, 192, 51, 334, 0); Scene_Exit_Add_2D_Exit(1, 226, 224, 314, 396, 1); } Scene_Exit_Add_2D_Exit(2, 60, 440, 460, 479, 2); + Ambient_Sounds_Add_Looping_Sound(105, 90, -45, 1); Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1); Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1); - Ambient_Sounds_Add_Sound(368, 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(395, 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(291, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(292, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(293, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(294, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(295, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(368, 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(395, 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(291, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(292, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(293, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(294, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(295, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); } void SceneScriptUG07::SceneLoaded() { @@ -97,29 +99,35 @@ bool SceneScriptUG07::ClickedOnExit(int exitId) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -94.0f, -12.21f, -710.0f, 0, 1, false, 0) && Actor_Query_Goal_Number(kActorClovis) != 402) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(427); + Game_Flag_Set(kFlagUG07toUG09); Set_Enter(kSetUG09, kSceneUG09); return true; } } + if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 110.0f, -12.21f, -274.0f, 0, 1, false, 0) && Actor_Query_Goal_Number(kActorClovis) != 402) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(425); + Game_Flag_Set(kFlagUG07toUG08); Set_Enter(kSetUG08, kSceneUG08); return true; } } + if (exitId == 2) { - if (!Game_Flag_Query(607) && Game_Flag_Query(671) && Global_Variable_Query(kVariableChapter) == 4 && !Game_Flag_Query(598)) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 49.0f, -12.21f, -130.0f, 0, 1, false, 0)) { + if (!Game_Flag_Query(607) + && Game_Flag_Query(671) + && Global_Variable_Query(kVariableChapter) == 4 + && !Game_Flag_Query(598) + ) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 49.0f, -12.21f, -130.0f, 0, true, false, 0)) { Game_Flag_Set(598); Actor_Put_In_Set(kActorClovis, kSetUG07); Actor_Set_At_XYZ(kActorClovis, 118.02f, -12.21f, -154.0f, 768); Player_Set_Combat_Mode(true); Actor_Face_Actor(kActorMcCoy, kActorClovis, true); - Loop_Actor_Walk_To_XYZ(kActorClovis, 98.02f, -12.21f, -154.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorClovis, 98.02f, -12.21f, -154.0f, 0, false, false, 0); Actor_Face_Actor(kActorClovis, kActorMcCoy, true); Actor_Set_Goal_Number(kActorMcCoy, 301); Actor_Face_Heading(kActorMcCoy, 0, true); @@ -142,10 +150,12 @@ bool SceneScriptUG07::ClickedOnExit(int exitId) { Actor_Set_Goal_Number(kActorClovis, 401); } } else { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, -21.47f, -58.0f, 0, 1, false, 0) && Actor_Query_Goal_Number(kActorClovis) != 402) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, -21.47f, -58.0f, 0, true, false, 0) + && Actor_Query_Goal_Number(kActorClovis) != 402 + ) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(423); + Game_Flag_Set(kFlagUG07toUG10); Set_Enter(kSetUG10, kSceneUG10); return true; } @@ -165,23 +175,31 @@ void SceneScriptUG07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptUG07::PlayerWalkedIn() { - if (Global_Variable_Query(kVariableChapter) == 4 && !Game_Flag_Query(623)) { + if ( Global_Variable_Query(kVariableChapter) == 4 + && !Game_Flag_Query(623) + ) { Actor_Set_Goal_Number(kActorOfficerLeary, 307); Actor_Set_Goal_Number(kActorOfficerGrayford, 307); } - if (Game_Flag_Query(426)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 62.0f, -12.21f, -274.0f, 0, 0, false, 0); - Game_Flag_Reset(426); + + if (Game_Flag_Query(kFlagUG08toUG07)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 62.0f, -12.21f, -274.0f, 0, false, false, 0); + Game_Flag_Reset(kFlagUG08toUG07); } } void SceneScriptUG07::PlayerWalkedOut() { - if (Global_Variable_Query(kVariableChapter) == 4 && (Actor_Query_Goal_Number(kActorOfficerLeary) == 307 || Actor_Query_Goal_Number(kActorOfficerGrayford) == 307)) { + if (Global_Variable_Query(kVariableChapter) == 4 + && (Actor_Query_Goal_Number(kActorOfficerLeary) == 307 + || Actor_Query_Goal_Number(kActorOfficerGrayford) == 307 + ) + ) { Non_Player_Actor_Combat_Mode_Off(kActorOfficerLeary); Non_Player_Actor_Combat_Mode_Off(kActorOfficerGrayford); Actor_Set_Goal_Number(kActorOfficerLeary, 306); Actor_Set_Goal_Number(kActorOfficerGrayford, 306); } + if (Actor_Query_In_Set(kActorClovis, kSetUG07)) { Actor_Set_Goal_Number(kActorClovis, 400); } diff --git a/engines/bladerunner/script/scene/ug08.cpp b/engines/bladerunner/script/scene/ug08.cpp index 6ae9d73ad2..d3621af467 100644 --- a/engines/bladerunner/script/scene/ug08.cpp +++ b/engines/bladerunner/script/scene/ug08.cpp @@ -25,34 +25,38 @@ namespace BladeRunner { void SceneScriptUG08::InitializeScene() { - if (Game_Flag_Query(430)) { - Setup_Scene_Information(-124.0f, 93.18f, 71.0f, 745); + if (Game_Flag_Query(kFlagUG13toUG08)) { + Setup_Scene_Information(-124.0f, 93.18f, 71.0f, 745); } else { - Setup_Scene_Information(-432.0f, 0.0f, -152.0f, 370); + Setup_Scene_Information(-432.0f, 0.0f, -152.0f, 370); } + Scene_Exit_Add_2D_Exit(0, 125, 220, 157, 303, 3); Scene_Exit_Add_2D_Exit(1, 353, 145, 552, 309, 1); + Ambient_Sounds_Add_Looping_Sound(331, 28, 0, 1); Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1); Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1); - Ambient_Sounds_Add_Sound(368, 2, 120, 11, 12, -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(369, 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(291, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(292, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(293, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(294, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(295, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(368, 2, 120, 11, 12, -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(369, 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(291, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(292, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(293, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(294, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(295, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0); + if (!Game_Flag_Query(610)) { Game_Flag_Set(431); Game_Flag_Set(610); } - if (Game_Flag_Query(430)) { - Scene_Loop_Start_Special(0, 0, 0); + + if (Game_Flag_Query(kFlagUG13toUG08)) { + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); Scene_Loop_Set_Default(1); } else if (Game_Flag_Query(431)) { Scene_Loop_Set_Default(1); @@ -85,25 +89,29 @@ bool SceneScriptUG08::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG08::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -432.0f, 0.0f, -152.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -432.0f, 0.0f, -152.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(426); + Game_Flag_Set(kFlagUG08toUG07); Set_Enter(kSetUG07, kSceneUG07); + return false; } - } else if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -312.0f, -2.0f, 152.0f, 0, 1, false, 0)) { + } + + if (exitId == 1) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -312.0f, -2.0f, 152.0f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 240, false); Footstep_Sound_Override_On(2); - Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 1, kAnimationModeIdle); + Loop_Actor_Travel_Stairs(kActorMcCoy, 11, true, kAnimationModeIdle); Footstep_Sound_Override_Off(); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -118.02f, 93.02f, 52.76f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -118.02f, 93.02f, 52.76f, 0, false, false, 0); Player_Loses_Control(); Actor_Set_Invisible(kActorMcCoy, true); - Game_Flag_Set(429); + Game_Flag_Set(kFlagUG08toUG13); Game_Flag_Reset(431); Set_Enter(kSetUG13, kSceneUG13); - Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, 0); + Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, false); + return false; } } return false; @@ -123,17 +131,17 @@ void SceneScriptUG08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptUG08::PlayerWalkedIn() { - if (Game_Flag_Query(430)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -167.0f, 93.18f, 71.0f, 0, 0, false, 0); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -180.0f, 93.18f, 134.0f, 0, 0, false, 0); + if (Game_Flag_Query(kFlagUG13toUG08)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -167.0f, 93.18f, 71.0f, 0, false, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -180.0f, 93.18f, 134.0f, 0, false, false, 0); Actor_Face_Heading(kActorMcCoy, 745, false); Footstep_Sound_Override_On(2); Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 0, kAnimationModeIdle); Footstep_Sound_Override_Off(); Player_Gains_Control(); } - Game_Flag_Reset(425); - Game_Flag_Reset(430); + Game_Flag_Reset(kFlagUG07toUG08); + Game_Flag_Reset(kFlagUG13toUG08); } void SceneScriptUG08::PlayerWalkedOut() { diff --git a/engines/bladerunner/script/scene/ug09.cpp b/engines/bladerunner/script/scene/ug09.cpp index 91e493ab63..e6613c1d9b 100644 --- a/engines/bladerunner/script/scene/ug09.cpp +++ b/engines/bladerunner/script/scene/ug09.cpp @@ -26,36 +26,38 @@ namespace BladeRunner { void SceneScriptUG09::InitializeScene() { if (Game_Flag_Query(kFlagCT12ToUG09)) { - Setup_Scene_Information(-67.0f, 156.94f, -425.0f, 500); + Setup_Scene_Information(-67.0f, 156.94f, -425.0f, 500); Game_Flag_Reset(kFlagCT12ToUG09); } else { - Setup_Scene_Information(-53.0f, 156.94f, 174.0f, 1000); - Game_Flag_Reset(427); + Setup_Scene_Information(-53.0f, 156.94f, 174.0f, 1000); + Game_Flag_Reset(kFlagUG07toUG09); } + Scene_Exit_Add_2D_Exit(0, 204, 159, 392, 360, 0); - Scene_Exit_Add_2D_Exit(1, 0, 455, 639, 479, 2); + Scene_Exit_Add_2D_Exit(1, 0, 455, 639, 479, 2); + 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(294, 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(295, 2, 20, 25, 33, -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(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(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(294, 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(295, 2, 20, 25, 33, -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(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(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 SceneScriptUG09::SceneLoaded() { @@ -100,7 +102,7 @@ bool SceneScriptUG09::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG09::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -67.0f, 156.94f, -425.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -67.0f, 156.94f, -425.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagUG09toCT12); @@ -108,11 +110,12 @@ bool SceneScriptUG09::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -53.0f, 156.94f, 206.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -53.0f, 156.94f, 206.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(428); + Game_Flag_Set(kFlagUG09ToUG07); Set_Enter(kSetUG07, kSceneUG07); } return true; @@ -132,7 +135,9 @@ void SceneScriptUG09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptUG09::PlayerWalkedIn() { - if (Global_Variable_Query(kVariableChapter) == 4 && Game_Flag_Query(623)) { + if (Global_Variable_Query(kVariableChapter) == 4 + && Game_Flag_Query(623) + ) { Game_Flag_Set(630); } } diff --git a/engines/bladerunner/script/scene/ug10.cpp b/engines/bladerunner/script/scene/ug10.cpp index a33c05fbde..335d71570d 100644 --- a/engines/bladerunner/script/scene/ug10.cpp +++ b/engines/bladerunner/script/scene/ug10.cpp @@ -27,8 +27,8 @@ namespace BladeRunner { void SceneScriptUG10::InitializeScene() { if (Game_Flag_Query(kFlagUG03toUG10)) { Setup_Scene_Information( -92.0f, 81.33f, -652.0f, 520); - } else if (Game_Flag_Query(423)) { - Game_Flag_Reset(423); + } else if (Game_Flag_Query(kFlagUG07toUG10)) { + Game_Flag_Reset(kFlagUG07toUG10); Setup_Scene_Information(-385.12f, 1.15f, 57.44f, 400); } else if (Game_Flag_Query(kFlagUG14toUG10)) { Setup_Scene_Information( 2.5f, 1.15f, 405.0f, 200); @@ -147,8 +147,8 @@ bool SceneScriptUG10::ClickedOnExit(int exitId) { ) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -385.0f, 1.15f, 57.44f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 1001, false); - Loop_Actor_Travel_Ladder(kActorMcCoy, 1, 1, 0); - Game_Flag_Set(424); + Loop_Actor_Travel_Ladder(kActorMcCoy, 1, true, kAnimationModeIdle); + Game_Flag_Set(kFlagUG10toUG07); Set_Enter(kSetUG07, kSceneUG07); return true; } diff --git a/engines/bladerunner/script/scene/ug12.cpp b/engines/bladerunner/script/scene/ug12.cpp index 7f9202381d..f30f56c740 100644 --- a/engines/bladerunner/script/scene/ug12.cpp +++ b/engines/bladerunner/script/scene/ug12.cpp @@ -25,9 +25,9 @@ namespace BladeRunner { void SceneScriptUG12::InitializeScene() { - if (Game_Flag_Query(411)) { + if (Game_Flag_Query(kFlagKP02toUG12)) { Setup_Scene_Information(207.0f, -126.21f, -364.0f, 561); - Game_Flag_Reset(411); + Game_Flag_Reset(kFlagKP02toUG12); } else { Setup_Scene_Information(375.0f, -126.21f, 180.0f, 730); Game_Flag_Reset(kFlagUG14toUG12); @@ -91,11 +91,12 @@ bool SceneScriptUG12::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 207.0f, -126.21f, -364.0f, 0, 1, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(412); + Game_Flag_Set(kFlagUG12toKP02); Set_Enter(kSetKP02, kSceneKP02); } return true; diff --git a/engines/bladerunner/script/scene/ug13.cpp b/engines/bladerunner/script/scene/ug13.cpp index e2a7ae9a1d..d6dfbfa0fc 100644 --- a/engines/bladerunner/script/scene/ug13.cpp +++ b/engines/bladerunner/script/scene/ug13.cpp @@ -25,7 +25,7 @@ namespace BladeRunner { void SceneScriptUG13::InitializeScene() { - if (Game_Flag_Query(435)) { + if (Game_Flag_Query(kFlagUG18toUG13)) { Setup_Scene_Information(-477.0f, 141.9f, -870.0f, 378); } else if (Game_Flag_Query(kFlagUG15toUG13)) { Setup_Scene_Information( 39.0f, 52.94f, -528.0f, 600); @@ -54,10 +54,12 @@ void SceneScriptUG13::InitializeScene() { ) { Actor_Set_Goal_Number(kActorTransient, 390); } + if (Actor_Query_Goal_Number(kActorTransient) == 599) { Actor_Change_Animation_Mode(kActorTransient, 89); } - if (Game_Flag_Query(429)) { + + if (Game_Flag_Query(kFlagUG08toUG13)) { Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(1); } else if (Game_Flag_Query(431)) { @@ -93,21 +95,22 @@ bool SceneScriptUG13::MouseClick(int x, int y) { } bool SceneScriptUG13::ClickedOn3DObject(const char *objectName, bool a2) { - - if (Object_Query_Click("BOLLARD", objectName) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 7.0f, 44.0f, -695.0f, 0, 1, false, 0)) { - Actor_Face_Object(kActorMcCoy, "BOLLARD", true); - if (Game_Flag_Query(431)) { - Scene_Loop_Set_Default(1); - Scene_Loop_Start_Special(kSceneLoopModeOnce, 0, false); - Game_Flag_Reset(431); - Game_Flag_Set(436); - return true; - } else { - Scene_Loop_Set_Default(4); - Scene_Loop_Start_Special(kSceneLoopModeOnce, 3, false); - Game_Flag_Set(431); - Scene_Exit_Remove(0); - return true; + if (Object_Query_Click("BOLLARD", objectName)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 7.0f, 44.0f, -695.0f, 0, true, false, 0)) { + Actor_Face_Object(kActorMcCoy, "BOLLARD", true); + if (Game_Flag_Query(431)) { + Scene_Loop_Set_Default(1); + Scene_Loop_Start_Special(kSceneLoopModeOnce, 0, false); + Game_Flag_Reset(431); + Game_Flag_Set(436); + return true; + } else { + Scene_Loop_Set_Default(4); + Scene_Loop_Start_Special(kSceneLoopModeOnce, 3, false); + Game_Flag_Set(431); + Scene_Exit_Remove(0); + return true; + } } } return false; @@ -148,20 +151,20 @@ bool SceneScriptUG13::ClickedOnActor(int actorId) { } bool SceneScriptUG13::ClickedOnItem(int itemId, bool a2) { - if ( itemId == kItemWeaponsOrderForm - && !Loop_Actor_Walk_To_Item(kActorMcCoy, kItemWeaponsOrderForm, 36, true, false) - ) { - Actor_Face_Item(kActorMcCoy, kItemWeaponsOrderForm, true); - Actor_Clue_Acquire(kActorMcCoy, kClueOriginalRequisitionForm, true, -1); - Item_Remove_From_World(kItemWeaponsOrderForm); - Item_Pickup_Spin_Effect(958, 426, 316); - Actor_Voice_Over(3950, kActorVoiceOver); - Actor_Voice_Over(3960, kActorVoiceOver); - Actor_Voice_Over(3970, kActorVoiceOver); - Actor_Voice_Over(3980, kActorVoiceOver); - Actor_Voice_Over(3990, kActorVoiceOver); - Actor_Voice_Over(4000, kActorVoiceOver); - return true; + if (itemId == kItemWeaponsOrderForm) { + if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemWeaponsOrderForm, 36, true, false)) { + Actor_Face_Item(kActorMcCoy, kItemWeaponsOrderForm, true); + Actor_Clue_Acquire(kActorMcCoy, kClueOriginalRequisitionForm, true, -1); + Item_Remove_From_World(kItemWeaponsOrderForm); + Item_Pickup_Spin_Effect(958, 426, 316); + Actor_Voice_Over(3950, kActorVoiceOver); + Actor_Voice_Over(3960, kActorVoiceOver); + Actor_Voice_Over(3970, kActorVoiceOver); + Actor_Voice_Over(3980, kActorVoiceOver); + Actor_Voice_Over(3990, kActorVoiceOver); + Actor_Voice_Over(4000, kActorVoiceOver); + return true; + } } return false; } @@ -169,36 +172,38 @@ bool SceneScriptUG13::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG13::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -32.0f, 54.63f, -883.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -32.0f, 54.63f, -883.0f, 0, true, false, 0)) { Player_Loses_Control(); - Game_Flag_Set(430); + Game_Flag_Set(kFlagUG13toUG08); Game_Flag_Set(431); Set_Enter(kSetUG08, kSceneUG08); Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, 0); } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 39.0f, 52.94f, -528.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 39.0f, 52.94f, -528.0f, 0, true, false, 0)) { Game_Flag_Set(kFlagUG13toUG15); Set_Enter(kSetUG15, kSceneUG15); } return true; } + if (exitId == 2) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -267.0f, 44.0f, -795.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -267.0f, 44.0f, -795.0f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 830, false); Footstep_Sound_Override_On(3); Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 1, kAnimationModeIdle); Footstep_Sound_Override_Off(); if (!sub_402AD0()) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -477.0f, 141.9f, -870.0f, 0, 0, false, 0); - Game_Flag_Set(434); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -477.0f, 141.9f, -870.0f, 0, false, false, 0); + Game_Flag_Set(kFlagUG13toUG18); Set_Enter(kSetUG18, kSceneUG18); return true; } Actor_Face_Heading(kActorMcCoy, 325, false); - Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 0, kAnimationModeIdle); + Loop_Actor_Travel_Stairs(kActorMcCoy, 11, true, kAnimationModeIdle); } else { return true; } @@ -215,15 +220,25 @@ void SceneScriptUG13::SceneFrameAdvanced(int frame) { if (frame == 94) { Ambient_Sounds_Play_Sound(372, 90, 0, 0, 100); } - if (Game_Flag_Query(436) && frame > 29 && frame < 91) { + + if (Game_Flag_Query(436) + && frame > 29 + && frame < 91 + ) { Scene_Exit_Add_2D_Exit(0, 394, 205, 464, 281, 0); Game_Flag_Reset(436); //return true; return; } - if (Game_Flag_Query(429) && frame < 25) { + + if (Game_Flag_Query(kFlagUG08toUG13) + && frame < 25 + ) { Actor_Set_Invisible(kActorMcCoy, true); - } else if (Game_Flag_Query(430) && frame >= 94 && frame <= 120) { + } else if (Game_Flag_Query(kFlagUG13toUG08) + && frame >= 94 + && frame <= 120 + ) { Actor_Set_Invisible(kActorMcCoy, true); } else { Actor_Set_Invisible(kActorMcCoy, false); @@ -236,29 +251,32 @@ void SceneScriptUG13::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptUG13::PlayerWalkedIn() { - if (Game_Flag_Query(435)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -389.0f, 143.0f, -844.0f, 0, 0, false, 0); + if (Game_Flag_Query(kFlagUG18toUG13)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -389.0f, 143.0f, -844.0f, 0, false, false, 0); Actor_Face_Heading(kActorMcCoy, 325, false); Footstep_Sound_Override_On(3); - Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 0, kAnimationModeIdle); + Loop_Actor_Travel_Stairs(kActorMcCoy, 11, false, kAnimationModeIdle); Footstep_Sound_Override_Off(); - Game_Flag_Reset(435); + Game_Flag_Reset(kFlagUG18toUG13); } else if (Game_Flag_Query(kFlagUG15toUG13)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, 44.0f, -528.0f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, 44.0f, -528.0f, 0, false, false, 0); Game_Flag_Reset(kFlagUG15toUG13); } else { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -60.0f, 55.24f, -816.0f, 0, 0, false, 0); - Game_Flag_Reset(429); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -60.0f, 55.24f, -816.0f, 0, false, false, 0); + Game_Flag_Reset(kFlagUG08toUG13); Player_Gains_Control(); } - if (Actor_Query_Goal_Number(kActorTransient) >= 390 && !Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy)) { + + if ( Actor_Query_Goal_Number(kActorTransient) >= 390 + && !Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy) + ) { if (Game_Flag_Query(553)) { if (Random_Query(1, 3) == 1) { Actor_Set_Goal_Number(kActorTransient, 395); } } else { Game_Flag_Set(553); - Actor_Says(kActorTransient, 50, 3); + Actor_Says(kActorTransient, 50, kAnimationModeTalk); } } //return false; @@ -267,7 +285,7 @@ void SceneScriptUG13::PlayerWalkedIn() { void SceneScriptUG13::PlayerWalkedOut() { Actor_Set_Invisible(kActorMcCoy, false); Ambient_Sounds_Remove_All_Looping_Sounds(1); - if (Game_Flag_Query(430)) { + if (Game_Flag_Query(kFlagUG13toUG08)) { Ambient_Sounds_Remove_Sound(401, false); Ambient_Sounds_Remove_Sound(402, false); Ambient_Sounds_Remove_Sound(369, false); @@ -288,7 +306,7 @@ void SceneScriptUG13::sub_40223C() { Actor_Says_With_Pause(kActorMcCoy, 5565, 3.0f, 18); Actor_Says(kActorTransient, 70, 31); Actor_Says(kActorTransient, 80, 32); - Actor_Says(kActorMcCoy, 5570, 3); + Actor_Says(kActorMcCoy, 5570, kAnimationModeTalk); Actor_Says(kActorTransient, 90, 32); } @@ -352,12 +370,15 @@ void SceneScriptUG13::sub_402AD4() { DM_Add_To_List_Never_Repeat_Once_Selected(1350, 1, 3, 7); } Dialogue_Menu_Add_DONE_To_List(1360); + Dialogue_Menu_Appear(320, 240); int answer = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); + switch (answer) { case 1360: return; + case 1350: Actor_Clue_Acquire(kActorTransient, kClueFlaskOfAbsinthe, false, kActorMcCoy); Actor_Says_With_Pause(kActorMcCoy, 5595, 1.0f, 23); @@ -367,6 +388,7 @@ void SceneScriptUG13::sub_402AD4() { Actor_Clue_Lose(kActorMcCoy, kClueFlaskOfAbsinthe); sub_402E24(); break; + case 1340: Actor_Modify_Friendliness_To_Other(kActorTransient, kActorMcCoy, -10); Actor_Says(kActorMcCoy, 5590, 15); @@ -378,9 +400,11 @@ void SceneScriptUG13::sub_402AD4() { Actor_Says(kActorMcCoy, 5585, 16); sub_4025E0(); break; + case 1320: sub_4023D8(); break; + default: Actor_Face_Actor(kActorMcCoy, kActorTransient, true); Actor_Says(kActorMcCoy, 5600, 14); @@ -398,9 +422,11 @@ void SceneScriptUG13::sub_402E24() { DM_Add_To_List_Never_Repeat_Once_Selected(1370, 1, 1, 8); DM_Add_To_List_Never_Repeat_Once_Selected(1380, 1, 8, 1); DM_Add_To_List_Never_Repeat_Once_Selected(1390, 8, 1, 1); + Dialogue_Menu_Appear(320, 240); int answer = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); + if (answer == 1370) { Actor_Says(kActorMcCoy, 5665, 16); Actor_Says(kActorTransient, 300, 32); diff --git a/engines/bladerunner/script/scene/ug14.cpp b/engines/bladerunner/script/scene/ug14.cpp index ace4b90365..914cf10045 100644 --- a/engines/bladerunner/script/scene/ug14.cpp +++ b/engines/bladerunner/script/scene/ug14.cpp @@ -81,10 +81,9 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) { float x, y, z; Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); bool v1 = y > 57.0f; - if (exitId > 2) { - return false; - } - if (!exitId) { + + + if (!exitId == 0) { if (v1) { if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, 141.47f, 128.92f, -150.16f, 0, true, false, 0)) { return false; @@ -94,6 +93,7 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) { Loop_Actor_Travel_Stairs(kActorMcCoy, 13, false, kAnimationModeIdle); Footstep_Sound_Override_Off(); } + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -278.0f, 12.97f, -152.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -102,6 +102,7 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { if (!v1) { if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, -14.53f, 12.12f, -150.16f, 0, true, false, 0)) { @@ -112,6 +113,7 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) { Loop_Actor_Travel_Stairs(kActorMcCoy, 13, true, kAnimationModeIdle); Footstep_Sound_Override_Off(); } + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -50.0f, 129.0f, -814.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -173,11 +175,12 @@ void SceneScriptUG14::PlayerWalkedIn() { Actor_Face_Heading(kActorMcCoy, 807, false); Game_Flag_Reset(kFlagUG10toUG14); } + if ( Global_Variable_Query(kVariableChapter) == 4 && Game_Flag_Query(kFlagCT04HomelessBodyThrownAway) && !Game_Flag_Query(kFlagUG14DeadHomeless) ) { - Overlay_Play("UG14OVER", 0, 0, 1, 0); + Overlay_Play("UG14OVER", 0, false, true, 0); Delay(1000); Actor_Face_Heading(kActorMcCoy, 609, false); Delay(3000); diff --git a/engines/bladerunner/script/scene/ug15.cpp b/engines/bladerunner/script/scene/ug15.cpp index 13408bbfab..fdd32449ff 100644 --- a/engines/bladerunner/script/scene/ug15.cpp +++ b/engines/bladerunner/script/scene/ug15.cpp @@ -130,7 +130,9 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) { if (exitId == 2) { int v1 = Actor_Query_Goal_Number(kActorFreeSlotA); - if (v1 >= 300 && v1 <= 303) { + if (v1 >= 300 + && v1 <= 303 + ) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -137.61f, 48.07f, 147.12f, 0, 1, false, 0); } 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); @@ -162,7 +164,7 @@ void SceneScriptUG15::SceneFrameAdvanced(int frame) { float x, y, z; Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); if (-160.0f <= x - && z < 220.0f + && 220.0f > z ) { Actor_Set_Goal_Number(kActorFreeSlotA, 301); } @@ -170,11 +172,14 @@ void SceneScriptUG15::SceneFrameAdvanced(int frame) { if (frame == 61) { Ambient_Sounds_Play_Sound(583, 80, 0, 0, 99); } - if (Game_Flag_Query(677) && !Game_Flag_Query(682)) { + + 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 + if ( -180.0f <= x + && 220.0f > z && !Game_Flag_Query(724) ) { Game_Flag_Set(724); @@ -183,6 +188,7 @@ void SceneScriptUG15::SceneFrameAdvanced(int frame) { 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 ) { diff --git a/engines/bladerunner/script/scene/ug16.cpp b/engines/bladerunner/script/scene/ug16.cpp index 858f4d1b8e..6d075abe9a 100644 --- a/engines/bladerunner/script/scene/ug16.cpp +++ b/engines/bladerunner/script/scene/ug16.cpp @@ -25,14 +25,14 @@ namespace BladeRunner { void SceneScriptUG16::InitializeScene() { - if (Game_Flag_Query(552)) { + if (Game_Flag_Query(kFlagDR06toUG16)) { Setup_Scene_Information(-270.76f, -34.88f, -504.02f, 404); - Game_Flag_Reset(552); + Game_Flag_Reset(kFlagDR06toUG16); } else if (Game_Flag_Query(kFlagUG15toUG16a)) { - Setup_Scene_Information(-322.0f, -34.0f, -404.0f, 345); + Setup_Scene_Information(-322.0f, -34.0f, -404.0f, 345); Game_Flag_Reset(kFlagUG15toUG16a); } else { - Setup_Scene_Information(-318.0f, -34.0f, -216.0f, 340); + Setup_Scene_Information(-318.0f, -34.0f, -216.0f, 340); Game_Flag_Reset(kFlagUG15toUG16b); } @@ -78,42 +78,57 @@ bool SceneScriptUG16::MouseClick(int x, int y) { } bool SceneScriptUG16::ClickedOn3DObject(const char *objectName, bool a2) { - if (Object_Query_Click("QUADPATCH05", objectName) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 194.0f, -35.0f, 160.8f, 0, 1, false, 0)) { - Actor_Face_Heading(kActorMcCoy, 870, false); - if (!Game_Flag_Query(597) && Game_Flag_Query(595)) { - Game_Flag_Set(597); - Delay(1000); - Actor_Voice_Over(3480, kActorVoiceOver); - Actor_Change_Animation_Mode(kActorMcCoy, 38); - Sound_Play(339, 100, 0, 0, 50); - Delay(1000); - Item_Pickup_Spin_Effect(948, 460, 287); - Actor_Voice_Over(2740, kActorVoiceOver); - Actor_Voice_Over(2750, kActorVoiceOver); - Actor_Voice_Over(2760, kActorVoiceOver); - Actor_Voice_Over(2770, kActorVoiceOver); - Actor_Clue_Acquire(kActorMcCoy, kClueFolder, true, -1); - } else { - Actor_Says(kActorMcCoy, 8523, 12); - Actor_Says(kActorMcCoy, 8635, 12); + if (Object_Query_Click("QUADPATCH05", objectName)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 194.0f, -35.0f, 160.8f, 0, true, false, 0)) { + Actor_Face_Heading(kActorMcCoy, 870, false); + if (!Game_Flag_Query(597) + && Game_Flag_Query(595) + ) { + Game_Flag_Set(597); + Delay(1000); + Actor_Voice_Over(3480, kActorVoiceOver); + Actor_Change_Animation_Mode(kActorMcCoy, 38); + Sound_Play(339, 100, 0, 0, 50); + Delay(1000); + Item_Pickup_Spin_Effect(948, 460, 287); + Actor_Voice_Over(2740, kActorVoiceOver); + Actor_Voice_Over(2750, kActorVoiceOver); + Actor_Voice_Over(2760, kActorVoiceOver); + Actor_Voice_Over(2770, kActorVoiceOver); + Actor_Clue_Acquire(kActorMcCoy, kClueFolder, true, -1); + } else { + Actor_Says(kActorMcCoy, 8523, 12); + Actor_Says(kActorMcCoy, 8635, 12); + } + return true; } - return true; } - if (Object_Query_Click("SCREEN 01", objectName) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 194.0f, -35.0f, 160.8f, 0, 1, false, 0)) { - Actor_Face_Heading(kActorMcCoy, 870, false); - if ((!Game_Flag_Query(595) && Actor_Query_Is_In_Current_Set(kActorLuther)) || Actor_Clue_Query(kActorMcCoy, kClueDNALutherLance) || Game_Flag_Query(568)) { - Actor_Says(kActorMcCoy, 8525, 12); - Actor_Says(kActorMcCoy, 8526, 12); - return false; + + if (Object_Query_Click("SCREEN 01", objectName)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 194.0f, -35.0f, 160.8f, 0, true, false, 0)) { + + Actor_Face_Heading(kActorMcCoy, 870, false); + + if ((!Game_Flag_Query(595) + && Actor_Query_Is_In_Current_Set(kActorLuther) + ) + || Actor_Clue_Query(kActorMcCoy, kClueDNALutherLance) + || Game_Flag_Query(568) + ) { + Actor_Says(kActorMcCoy, 8525, 12); + Actor_Says(kActorMcCoy, 8526, 12); + return false; + } + + Delay(2000); + Actor_Face_Heading(kActorMcCoy, 1016, false); + Delay(2000); + Actor_Says(kActorMcCoy, 5725, 14); + Delay(1000); + Item_Pickup_Spin_Effect(941, 418, 305); + Actor_Clue_Acquire(kActorMcCoy, kClueDNALutherLance, true, -1); + return true; } - Delay(2000); - Actor_Face_Heading(kActorMcCoy, 1016, false); - Delay(2000); - Actor_Says(kActorMcCoy, 5725, 14); - Delay(1000); - Item_Pickup_Spin_Effect(941, 418, 305); - Actor_Clue_Acquire(kActorMcCoy, kClueDNALutherLance, true, -1); - return true; } return false; } @@ -157,7 +172,7 @@ bool SceneScriptUG16::ClickedOnExit(int exitId) { Loop_Actor_Travel_Stairs(kActorMcCoy, 13, true, kAnimationModeIdle); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(551); + Game_Flag_Set(kFlagUG16toDR06); Set_Enter(kSetDR06, kSceneDR06); } return true; @@ -180,10 +195,14 @@ void SceneScriptUG16::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptUG16::PlayerWalkedIn() { Game_Flag_Set(715); + if (!Game_Flag_Query(595)) { Actor_Set_Goal_Number(kActorLuther, 403); } - if (!Game_Flag_Query(556) && Actor_Query_Is_In_Current_Set(kActorLuther)) { + + if (!Game_Flag_Query(556) + && Actor_Query_Is_In_Current_Set(kActorLuther) + ) { Player_Loses_Control(); Loop_Actor_Walk_To_XYZ(kActorMcCoy, 120.29f, -35.67f, 214.8f, 310, 0, false, 0); Actor_Face_Actor(kActorMcCoy, kActorLuther, true); @@ -219,24 +238,33 @@ void SceneScriptUG16::sub_401D78() { Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(1400, 5, 6, 2); DM_Add_To_List_Never_Repeat_Once_Selected(1410, 5, 4, 8); - if (Game_Flag_Query(600) || Game_Flag_Query(601)) { + if (Game_Flag_Query(600) + || Game_Flag_Query(601) + ) { DM_Add_To_List_Never_Repeat_Once_Selected(1420, 6, 4, 5); DM_Add_To_List_Never_Repeat_Once_Selected(1430, 6, 4, 5); DM_Add_To_List_Never_Repeat_Once_Selected(1440, 6, 4, 5); } - if (Global_Variable_Query(49) > 1 && !Actor_Clue_Query(kActorMcCoy, kClueFolder)) { + if ( Global_Variable_Query(49) > 1 + && !Actor_Clue_Query(kActorMcCoy, kClueFolder) + ) { DM_Add_To_List_Never_Repeat_Once_Selected(1450, 6, 4, 5); } if (Actor_Clue_Query(kActorMcCoy, kClueEnvelope)) { DM_Add_To_List_Never_Repeat_Once_Selected(1460, 6, 4, 5); } - if (Actor_Clue_Query(kActorMcCoy, kClueDNATyrell) && !Actor_Clue_Query(kActorMcCoy, kClueFolder) && Game_Flag_Query(698)) { + if ( Actor_Clue_Query(kActorMcCoy, kClueDNATyrell) + && !Actor_Clue_Query(kActorMcCoy, kClueFolder) + && Game_Flag_Query(698) + ) { DM_Add_To_List_Never_Repeat_Once_Selected(1470, 6, 4, 5); } Dialogue_Menu_Add_DONE_To_List(1480); + Dialogue_Menu_Appear(320, 240); int answer = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); + switch (answer) { case 1400: Actor_Says(kActorMcCoy, 5730, 13); @@ -272,12 +300,14 @@ void SceneScriptUG16::sub_401D78() { Actor_Modify_Friendliness_To_Other(kActorLuther, kActorMcCoy, -10); } break; + case 1410: Actor_Says(kActorMcCoy, 5735, 13); Actor_Face_Actor(kActorMcCoy, kActorLuther, true); Actor_Says(kActorLance, 160, 17); Actor_Says(kActorLuther, 200, 14); break; + case 1420: Actor_Says(kActorMcCoy, 5740, 13); Actor_Face_Actor(kActorMcCoy, kActorLuther, true); @@ -296,6 +326,7 @@ void SceneScriptUG16::sub_401D78() { Actor_Says(kActorLance, 230, 17); Actor_Clue_Acquire(kActorMcCoy, kClueLutherLanceInterview, true, kActorLuther); break; + case 1430: Actor_Says(kActorMcCoy, 5745, 13); Actor_Face_Actor(kActorMcCoy, kActorLuther, true); @@ -305,6 +336,7 @@ void SceneScriptUG16::sub_401D78() { Actor_Says(kActorLuther, 290, 15); Actor_Says(kActorLance, 260, 15); break; + case 1440: Actor_Says(kActorMcCoy, 5750, 13); Actor_Face_Actor(kActorMcCoy, kActorLuther, true); @@ -313,6 +345,7 @@ void SceneScriptUG16::sub_401D78() { Actor_Says(kActorLuther, 310, 15); Actor_Modify_Friendliness_To_Other(kActorLuther, kActorMcCoy, -5); break; + case 1450: Actor_Says(kActorMcCoy, 5755, 13); Actor_Face_Actor(kActorMcCoy, kActorLuther, true); @@ -331,6 +364,7 @@ void SceneScriptUG16::sub_401D78() { Actor_Says(kActorLance, 330, 15); Game_Flag_Set(698); break; + case 1460: Actor_Says(kActorMcCoy, 5760, 13); Actor_Face_Actor(kActorMcCoy, kActorLuther, true); @@ -342,6 +376,7 @@ void SceneScriptUG16::sub_401D78() { Actor_Says(kActorMcCoy, 5840, 13); Actor_Says(kActorLance, 380, 13); break; + case 1470: Actor_Says(kActorMcCoy, 5765, 13); Actor_Face_Actor(kActorMcCoy, kActorLuther, true); @@ -365,6 +400,7 @@ void SceneScriptUG16::sub_401D78() { Game_Flag_Set(597); Actor_Clue_Acquire(kActorMcCoy, kClueFolder, true, kActorLuther); break; + case 1480: Actor_Says(kActorMcCoy, 4595, 14); break; diff --git a/engines/bladerunner/script/scene/ug17.cpp b/engines/bladerunner/script/scene/ug17.cpp index afbe340a39..3d41e2ac74 100644 --- a/engines/bladerunner/script/scene/ug17.cpp +++ b/engines/bladerunner/script/scene/ug17.cpp @@ -25,9 +25,9 @@ namespace BladeRunner { void SceneScriptUG17::InitializeScene() { - if (Game_Flag_Query(447)) { + if (Game_Flag_Query(kFlagTB03toUG17)) { Setup_Scene_Information(1013.0f, 67.96f, -1892.0f, 525); - Game_Flag_Reset(447); + Game_Flag_Reset(kFlagTB03toUG17); } else { Setup_Scene_Information(1000.0f, 67.96f, -1539.0f, 0); } @@ -67,7 +67,7 @@ bool SceneScriptUG17::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG17::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1000.0f, 67.96f, -1539.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1000.0f, 67.96f, -1539.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagUG17toUG15); @@ -75,16 +75,17 @@ bool SceneScriptUG17::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1013.0f, 67.96f, -1892.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1013.0f, 67.96f, -1892.0f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 89, false); if (Global_Variable_Query(kVariableChapter) == 5) { Actor_Says(kActorMcCoy, 8522, 14); } else { - Loop_Actor_Travel_Ladder(kActorMcCoy, 10, 1, 0); + Loop_Actor_Travel_Ladder(kActorMcCoy, 10, true, kAnimationModeIdle); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(448); + Game_Flag_Set(kFlagUG17toTB03); Set_Enter(kSetTB02_TB03, kSceneTB03); } } diff --git a/engines/bladerunner/script/scene/ug18.cpp b/engines/bladerunner/script/scene/ug18.cpp index 5afb87e80a..7d45274d56 100644 --- a/engines/bladerunner/script/scene/ug18.cpp +++ b/engines/bladerunner/script/scene/ug18.cpp @@ -26,36 +26,43 @@ namespace BladeRunner { void SceneScriptUG18::InitializeScene() { Setup_Scene_Information(-684.71f, 0.0f, 171.59f, 0); - Game_Flag_Reset(434); + Game_Flag_Reset(kFlagUG13toUG18); + Scene_Exit_Add_2D_Exit(0, 0, 158, 100, 340, 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(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(368, 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(295, 2, 20, 25, 25, -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(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(368, 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(295, 2, 20, 25, 25, -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); + Scene_Loop_Set_Default(4); - if (Game_Flag_Query(670) && !Game_Flag_Query(671) && Global_Variable_Query(kVariableChapter) == 4) { + + if ( Game_Flag_Query(670) + && !Game_Flag_Query(671) + && Global_Variable_Query(kVariableChapter) == 4 + ) { Actor_Set_Goal_Number(kActorGuzza, 300); Actor_Set_Goal_Number(kActorClovis, 300); Actor_Set_Goal_Number(kActorSadik, 300); @@ -69,15 +76,19 @@ void SceneScriptUG18::SceneLoaded() { Unobstacle_Object("OBSTACLE1", true); Clickable_Object("MACHINE_01"); Unclickable_Object("MACHINE_01"); + if (Game_Flag_Query(671)) { Actor_Put_In_Set(kActorGuzza, kSetFreeSlotI); Actor_Set_At_Waypoint(kActorGuzza, 41, 0); - if (Actor_Query_Which_Set_In(kActorSadik) == 89) { + if (Actor_Query_Which_Set_In(kActorSadik) == kSetUG18) { Actor_Put_In_Set(kActorSadik, kSetFreeSlotA); Actor_Set_At_Waypoint(kActorSadik, 33, 0); } } - if (Game_Flag_Query(670) && !Game_Flag_Query(671) && Global_Variable_Query(kVariableChapter) == 4) { + if ( Game_Flag_Query(670) + && !Game_Flag_Query(671) + && Global_Variable_Query(kVariableChapter) == 4 + ) { Item_Add_To_World(91, 987, 89, -55.21f, 0.0f, -302.17f, 0, 12, 12, false, true, false, true); } } @@ -98,7 +109,7 @@ bool SceneScriptUG18::ClickedOnItem(int itemId, bool combatMode) { if (itemId == 91) { if (combatMode) { Item_Remove_From_World(91); - } else if (!Loop_Actor_Walk_To_Item(kActorMcCoy, 91, 12, 1, false)) { + } else if (!Loop_Actor_Walk_To_Item(kActorMcCoy, 91, 12, true, false)) { Item_Pickup_Spin_Effect(987, 368, 243); Item_Remove_From_World(itemId); Game_Flag_Set(703); @@ -110,10 +121,10 @@ bool SceneScriptUG18::ClickedOnItem(int itemId, bool combatMode) { bool SceneScriptUG18::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -684.71f, 0.0f, 171.59f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -684.71f, 0.0f, 171.59f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Game_Flag_Set(435); + Game_Flag_Set(kFlagUG18toUG13); Set_Enter(kSetUG13, kSceneUG13); } return true; @@ -150,9 +161,14 @@ void SceneScriptUG18::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo Scene_Exits_Enable(); Actor_Set_Goal_Number(kActorGuzza, 306); } - } else if (actorId == kActorSadik) { + return; + } + + if (actorId == kActorSadik) { if (newGoal == 302) { - if (Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy) > 55 && Game_Flag_Query(607)) { + if (Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy) > 55 + && Game_Flag_Query(607) + ) { sub_403588(); } else { Actor_Set_Goal_Number(kActorSadik, 307); @@ -168,14 +184,18 @@ void SceneScriptUG18::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo Actor_Force_Stop_Walking(kActorMcCoy); Actor_Change_Animation_Mode(kActorMcCoy, 48); Player_Loses_Control(); - Actor_Retired_Here(kActorMcCoy, 6, 6, 1, kActorSadik); + Actor_Retired_Here(kActorMcCoy, 6, 6, true, kActorSadik); } } } void SceneScriptUG18::PlayerWalkedIn() { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -488.71f, 0.0f, 123.59f, 0, 0, false, 0); - if (Game_Flag_Query(670) && !Game_Flag_Query(671) && Actor_Query_Is_In_Current_Set(kActorGuzza)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -488.71f, 0.0f, 123.59f, 0, false, false, 0); + + if ( Game_Flag_Query(670) + && !Game_Flag_Query(671) + && Actor_Query_Is_In_Current_Set(kActorGuzza) + ) { Scene_Exits_Disable(); sub_402734(); sub_403278(); @@ -270,12 +290,12 @@ void SceneScriptUG18::sub_402734() { Actor_Says(kActorGuzza, 790, 3); Actor_Says(kActorMcCoy, 5865, 12); Actor_Says(kActorGuzza, 800, 3); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -357.13f, 0.0f, -44.47f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -357.13f, 0.0f, -44.47f, 0, false, false, 0); Actor_Face_Actor(kActorMcCoy, kActorGuzza, true); Actor_Says(kActorMcCoy, 5870, 14); Actor_Face_Actor(kActorGuzza, kActorMcCoy, true); Actor_Start_Speech_Sample(kActorGuzza, 810); - Loop_Actor_Walk_To_XYZ(kActorGuzza, -57.21f, 0.0f, -334.17f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorGuzza, -57.21f, 0.0f, -334.17f, 0, false, false, 0); Actor_Says(kActorMcCoy, 5875, 13); Actor_Says(kActorGuzza, 830, 3); Actor_Says(kActorGuzza, 840, 12); @@ -285,7 +305,7 @@ void SceneScriptUG18::sub_402734() { Actor_Says(kActorMcCoy, 5885, 9); Actor_Says(kActorMcCoy, 5890, 13); Actor_Says(kActorGuzza, 870, 15); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -205.13f, 0.0f, -184.47f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -205.13f, 0.0f, -184.47f, 0, false, false, 0); Actor_Face_Actor(kActorMcCoy, kActorGuzza, true); Actor_Says(kActorMcCoy, 5900, 15); Actor_Says(kActorGuzza, 880, 13); @@ -294,7 +314,7 @@ void SceneScriptUG18::sub_402734() { Actor_Says(kActorMcCoy, 5915, 13); Actor_Says(kActorGuzza, 890, 16); Actor_Says(kActorMcCoy, 5920, 14); - Loop_Actor_Walk_To_XYZ(kActorGuzza, -57.21f, 0.0f, -334.17f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorGuzza, -57.21f, 0.0f, -334.17f, 0, false, false, 0); Actor_Face_Actor(kActorGuzza, kActorMcCoy, true); Actor_Says(kActorGuzza, 900, 15); Actor_Says(kActorGuzza, 910, 12); @@ -308,7 +328,7 @@ void SceneScriptUG18::sub_402734() { if (Game_Flag_Query(607)) { Actor_Modify_Friendliness_To_Other(kActorClovis, kActorMcCoy, 3); Actor_Modify_Friendliness_To_Other(kActorSadik, kActorMcCoy, 5); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -117.13f, 0.0f, -284.47f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -117.13f, 0.0f, -284.47f, 0, false, false, 0); Actor_Face_Actor(kActorMcCoy, kActorGuzza, true); Actor_Says(kActorMcCoy, 5960, 9); Actor_Says(kActorMcCoy, 5965, 14); @@ -342,7 +362,7 @@ void SceneScriptUG18::sub_402DE8() { } void SceneScriptUG18::sub_402F8C() { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -117.13f, 0.0f, -284.47f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -117.13f, 0.0f, -284.47f, 0, false, false, 0); Actor_Face_Actor(kActorMcCoy, kActorGuzza, true); Actor_Says(kActorMcCoy, 5945, 12); Actor_Says(kActorGuzza, 1040, 15); @@ -359,7 +379,7 @@ void SceneScriptUG18::sub_402F8C() { void SceneScriptUG18::sub_403114() { Actor_Modify_Friendliness_To_Other(kActorClovis, kActorMcCoy, 20); Actor_Modify_Friendliness_To_Other(kActorSadik, kActorMcCoy, 10); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -117.13f, 0.0f, -284.47f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -117.13f, 0.0f, -284.47f, 0, false, false, 0); Actor_Face_Actor(kActorMcCoy, kActorGuzza, true); Actor_Says(kActorMcCoy, 5950, 16); Actor_Says(kActorMcCoy, 5955, 14); @@ -374,7 +394,7 @@ void SceneScriptUG18::sub_403278() { ADQ_Flush(); Actor_Start_Speech_Sample(kActorClovis, 590); Delay(500); - Loop_Actor_Walk_To_XYZ(kActorGuzza, 126.79f, 0.0f, -362.17f, 0, 0, false, 0); + Loop_Actor_Walk_To_XYZ(kActorGuzza, 126.79f, 0.0f, -362.17f, 0, false, false, 0); Actor_Face_Heading(kActorGuzza, 729, false); Actor_Set_Goal_Number(kActorGuzza, 301); ADQ_Add(kActorSadik, 350, 13); diff --git a/engines/bladerunner/script/scene/ug19.cpp b/engines/bladerunner/script/scene/ug19.cpp index 40097dee12..d8ae2817b2 100644 --- a/engines/bladerunner/script/scene/ug19.cpp +++ b/engines/bladerunner/script/scene/ug19.cpp @@ -85,10 +85,10 @@ bool SceneScriptUG19::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG19::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 67.03f, 7.29f, -74.97f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 67.03f, 7.29f, -74.97f, 0, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 256, false); Footstep_Sound_Override_On(3); - Loop_Actor_Travel_Ladder(kActorMcCoy, 8, 1, 0); + Loop_Actor_Travel_Ladder(kActorMcCoy, 8, true, kAnimationModeIdle); Footstep_Sound_Override_Off(); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); @@ -97,8 +97,9 @@ bool SceneScriptUG19::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 181.0f, 11.52f, -18.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 181.0f, 11.52f, -18.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagUG19toUG14); @@ -126,7 +127,7 @@ void SceneScriptUG19::PlayerWalkedIn() { } else { Game_Flag_Reset(kFlagMA07toUG19); Footstep_Sound_Override_On(3); - Loop_Actor_Travel_Ladder(kActorMcCoy, 8, false, 0); + Loop_Actor_Travel_Ladder(kActorMcCoy, 8, false, kAnimationModeIdle); Footstep_Sound_Override_Off(); } } |