diff options
author | Peter Kohaut | 2019-01-24 22:57:41 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-01-24 23:05:13 +0100 |
commit | 2cc09b6b1097007b6eeac12882c03475e56e1be0 (patch) | |
tree | 777e076f39c4c7dd246342cfe15b3321076b8c6b /engines/bladerunner/script/scene/ug04.cpp | |
parent | 2fd29c5193a0b9e6d3920f0512ce3ca37b00bf7e (diff) | |
download | scummvm-rg350-2cc09b6b1097007b6eeac12882c03475e56e1be0.tar.gz scummvm-rg350-2cc09b6b1097007b6eeac12882c03475e56e1be0.tar.bz2 scummvm-rg350-2cc09b6b1097007b6eeac12882c03475e56e1be0.zip |
BLADERUNNER: Fixes for game scripts & cleanup
Diffstat (limited to 'engines/bladerunner/script/scene/ug04.cpp')
-rw-r--r-- | engines/bladerunner/script/scene/ug04.cpp | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/engines/bladerunner/script/scene/ug04.cpp b/engines/bladerunner/script/scene/ug04.cpp index 7aa0ad130c..82da71bc61 100644 --- a/engines/bladerunner/script/scene/ug04.cpp +++ b/engines/bladerunner/script/scene/ug04.cpp @@ -25,37 +25,40 @@ namespace BladeRunner { void SceneScriptUG04::InitializeScene() { - if (Game_Flag_Query(339)) { - Setup_Scene_Information(0.0f, -1.74f, -2400.0f, 496); - Game_Flag_Reset(339); - } else if (Game_Flag_Query(341)) { - Setup_Scene_Information(164.0f, 11.87f, -1013.0f, 83); + if (Game_Flag_Query(kFlagUG05toUG04)) { + Setup_Scene_Information( 0.0f, -1.74f, -2400.0f, 496); + Game_Flag_Reset(kFlagUG05toUG04); + } else if (Game_Flag_Query(kFlagUG06toUG04)) { + Setup_Scene_Information( 164.0f, 11.87f, -1013.0f, 83); } else { - Setup_Scene_Information(-172.0f, 16.29f, -735.0f, 380); - Game_Flag_Reset(334); + Setup_Scene_Information(-172.0f, 16.29f, -735.0f, 380); + Game_Flag_Reset(kFlagUG03toUG04); } + Scene_Exit_Add_2D_Exit(0, 123, 308, 159, 413, 3); if (Global_Variable_Query(kVariableChapter) > 3) { Scene_Exit_Add_2D_Exit(1, 256, 333, 290, 373, 0); } Scene_Exit_Add_2D_Exit(2, 344, 298, 451, 390, 1); + Ambient_Sounds_Add_Looping_Sound(331, 25, 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(224, 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(227, 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(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(370, 2, 120, 11, 12, -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(392, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); - Ambient_Sounds_Add_Sound(394, 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(224, 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(227, 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(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(370, 2, 120, 11, 12, -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(392, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0); + Ambient_Sounds_Add_Sound(394, 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); + Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(1); } @@ -86,22 +89,22 @@ bool SceneScriptUG04::ClickedOnItem(int itemId, bool a2) { bool SceneScriptUG04::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -172.0f, 16.29f, -735.0f, 0, 1, false, 0)) { - Game_Flag_Set(335); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -172.0f, 16.29f, -735.0f, 0, true, false, 0)) { + Game_Flag_Set(kFlagUG04toUG03); Set_Enter(kSetUG03, kSceneUG03); } return true; } if (exitId == 1) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.74f, -2400.0f, 0, 1, false, 0)) { - Game_Flag_Set(338); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.74f, -2400.0f, 0, true, false, 0)) { + Game_Flag_Set(kFlagUG04toUG05); Set_Enter(kSetUG05, kSceneUG05); } return true; } if (exitId == 2) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 164.0f, 11.87f, -1013.0f, 0, 1, false, 0)) { - Game_Flag_Set(340); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 164.0f, 11.87f, -1013.0f, 0, true, false, 0)) { + Game_Flag_Set(kFlagUG04toUG06); Set_Enter(kSetUG06, kSceneUG06); } return true; @@ -123,9 +126,9 @@ void SceneScriptUG04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptUG04::PlayerWalkedIn() { - if (Game_Flag_Query(341)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 60.0f, -1.74f, -976.0f, 6, 0, false, 0); - Game_Flag_Reset(341); + if (Game_Flag_Query(kFlagUG06toUG04)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 60.0f, -1.74f, -976.0f, 6, false, false, 0); + Game_Flag_Reset(kFlagUG06toUG04); } } |