diff options
author | Thanasis Antoniou | 2019-06-01 02:28:00 +0300 |
---|---|---|
committer | Thanasis Antoniou | 2019-06-01 02:59:03 +0300 |
commit | 127302270b81bbd8f1a66451d90632b7bd764e7f (patch) | |
tree | 341a1196d3365190bc5e22dfeb92ddf2f7f94682 /engines | |
parent | f50492e971e076c59a3928b6afd5c0eaa6919aa5 (diff) | |
download | scummvm-rg350-127302270b81bbd8f1a66451d90632b7bd764e7f.tar.gz scummvm-rg350-127302270b81bbd8f1a66451d90632b7bd764e7f.tar.bz2 scummvm-rg350-127302270b81bbd8f1a66451d90632b7bd764e7f.zip |
BLADERUNNER: DR01, DR02 improved navigation
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bladerunner/script/scene/dr01.cpp | 35 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/dr02.cpp | 29 |
2 files changed, 59 insertions, 5 deletions
diff --git a/engines/bladerunner/script/scene/dr01.cpp b/engines/bladerunner/script/scene/dr01.cpp index 4b609c87bd..ad6f4412b5 100644 --- a/engines/bladerunner/script/scene/dr01.cpp +++ b/engines/bladerunner/script/scene/dr01.cpp @@ -129,11 +129,36 @@ bool SceneScriptDR01::ClickedOnItem(int itemId, bool a2) { bool SceneScriptDR01::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -835.0f, -0.04f, -118.0f, 0, true, false, false)) { - Async_Actor_Walk_To_XYZ(kActorMcCoy, -911.0f, -0.04f, -118.0f, 0, false); - Ambient_Sounds_Adjust_Looping_Sound(kSfxFACTAMB2, 10, -100, 1); - Game_Flag_Set(kFlagDR01toDR02); - Set_Enter(kSetDR01_DR02_DR04, kSceneDR02); + if (_vm->_cutContent) { + float x, y, z; + Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); + bool exitFlag = true; + bool fromFarTop = false; + if (x < -1088) { + fromFarTop = true; + exitFlag = Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1149.80f, 0.56f, -94.45f, 0, true, false, false); + } else if (-1088 < x && x < -642) { + exitFlag = Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1271.89f, 6.71f, -268.63f, 0, true, false, false); + } else { + exitFlag = Loop_Actor_Walk_To_XYZ(kActorMcCoy, -835.0f, -0.04f, -118.0f, 0, true, false, false); + } + if (!exitFlag) { + if (fromFarTop) { + Async_Actor_Walk_To_XYZ(kActorMcCoy, -1066.51f, 0.51f, -110.60f, 0, false); + } else { + Async_Actor_Walk_To_XYZ(kActorMcCoy, -911.0f, -0.04f, -118.0f, 0, false); + } + Ambient_Sounds_Adjust_Looping_Sound(kSfxFACTAMB2, 10, -100, 1); + Game_Flag_Set(kFlagDR01toDR02); + Set_Enter(kSetDR01_DR02_DR04, kSceneDR02); + } + } else { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -835.0f, -0.04f, -118.0f, 0, true, false, false)) { + Async_Actor_Walk_To_XYZ(kActorMcCoy, -911.0f, -0.04f, -118.0f, 0, false); + Ambient_Sounds_Adjust_Looping_Sound(kSfxFACTAMB2, 10, -100, 1); + Game_Flag_Set(kFlagDR01toDR02); + Set_Enter(kSetDR01_DR02_DR04, kSceneDR02); + } } return true; } diff --git a/engines/bladerunner/script/scene/dr02.cpp b/engines/bladerunner/script/scene/dr02.cpp index 08faac03a9..0a07a506f2 100644 --- a/engines/bladerunner/script/scene/dr02.cpp +++ b/engines/bladerunner/script/scene/dr02.cpp @@ -40,6 +40,11 @@ void SceneScriptDR02::InitializeScene() { if (Game_Flag_Query(kFlagBB01Available)) { Scene_Exit_Add_2D_Exit(2, 95, 0, 148, 292, 0); } + if (_vm->_cutContent) { + // improved navigation of this set of scenes + Scene_Exit_Add_2D_Exit(3, 0, 0, 34, 479, 3); + Scene_Exit_Add_2D_Exit(4, 34, 445, 605, 479, 2); + } Ambient_Sounds_Remove_All_Non_Looping_Sounds(false); Ambient_Sounds_Remove_All_Looping_Sounds(0); @@ -72,6 +77,8 @@ void SceneScriptDR02::SceneLoaded() { Obstacle_Object("PARKMETR01", true); Obstacle_Object("Z2ENTRYDR", true); Obstacle_Object("Z2DR2", true); + // there are two objects named "TRASH CAN WITH FIRE" in the scene (but not visible) + // and none of them have to be set clickable Clickable_Object("TRASH CAN WITH FIRE"); Clickable_Object("U2 CHEWDOOR"); Clickable_Object("MMTRASHCAN"); @@ -86,6 +93,9 @@ void SceneScriptDR02::SceneLoaded() { Clickable_Object("TRANSFORMER 01"); Clickable_Object("TRANSFORMER 02"); Clickable_Object("V2CANPIPE02"); + // there are two objects named "TRASH CAN WITH FIRE" in the scene (but not visible) + // and none of them have to be set clickable + // and also reseting them here would only reset one of them - and one remains as clickable Unclickable_Object("TRASH CAN WITH FIRE"); Unclickable_Object("U2 CHEWDOOR"); Unclickable_Object("MMTRASHCAN"); @@ -130,6 +140,25 @@ bool SceneScriptDR02::ClickedOnExit(int exitId) { return true; } + if (_vm->_cutContent + && (exitId == 3 || exitId == 4)) { + if ((exitId == 3 && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1162.45f, 0.78f, -167.45f, 0, true, false, false)) + || (exitId == 4 && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, -975.17f, 0.42f, -120.04f, 0, true, false, false)) + ) { + if (exitId == 3) { + Async_Actor_Walk_To_XYZ(kActorMcCoy, -1176.40f, 0.58f, -86.02f, 0, false); + } else { + Async_Actor_Walk_To_XYZ(kActorMcCoy, -845.00f, 0.37f, -31.60f, 0, false); + } + Game_Flag_Set(kFlagDR02toDR01); + Set_Enter(kSetDR01_DR02_DR04, kSceneDR01); + } + Ambient_Sounds_Adjust_Looping_Sound(kSfxHUMMER3, 12, -101, 1); + Ambient_Sounds_Adjust_Looping_Sound(kSfxBIGFAN2, 14, -101, 1); + return true; + } + + if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1162.0f, 7.18f, -322.0f, 0, true, false, false)) { if (Global_Variable_Query(kVariableChapter) > 2) { |