diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bladerunner/game_constants.h | 4 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct07.cpp | 5 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct10.cpp | 23 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct11.cpp | 35 | ||||
-rw-r--r-- | engines/bladerunner/script/scene_script.h | 2 |
5 files changed, 41 insertions, 28 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index 996635964b..b2c5beb297 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -892,6 +892,7 @@ enum Flags { kFlagCT07ZubenAttack = 516, kFlagTB06DogCollarTaken = 519, kFlagTB06KitchenBoxTaken = 520, + kFlagCT10Entered = 525, kFlagCT11toDR01 = 531, kFlagCT09Entered = 538, kFlagCT09LeonInterrupted = 539, @@ -904,6 +905,7 @@ enum Flags { kFlagKIAPrivacyAddonIntro = 599, kFlagTB07toTB02 = 608, kFlagTB07RachaelTalk = 612, + kFlagCT11DogWrapperTaken = 645, kFlagMA04McCoySleeping = 647, kFlagMA04PhoneMessageFromClovis = 649, kFlagMA04PhoneMessageFromLucy = 650, @@ -934,6 +936,7 @@ enum Flags { kFlagCT02McCoyFell = 719, kFlagCT02McCoyCombatReady = 720, kFlagZubenBountyPaid = 723, + kFlagCT11DogWrapperAvailable = 725, kFlagAR02Entered = 726, kFlagPS04WeaponsOrderForm = 727 }; @@ -1370,6 +1373,7 @@ enum GameItems { kItemChair = 109, kItemWeaponsCrate = 110, kItemWeaponsOrderForm = 111, + kItemDogWrapper = 115, kItemTyrellSalesPamphlet = 119, kItemMoonbusPhoto = 120, kItemGreenPawnLock = 121, diff --git a/engines/bladerunner/script/scene/ct07.cpp b/engines/bladerunner/script/scene/ct07.cpp index 9c922fe56a..f431085a10 100644 --- a/engines/bladerunner/script/scene/ct07.cpp +++ b/engines/bladerunner/script/scene/ct07.cpp @@ -28,8 +28,9 @@ void SceneScriptCT07::InitializeScene() { Setup_Scene_Information(202.32f, -58.23f, -12.86f, 225); Actor_Put_In_Set(kActorZuben, kSetCT07); Actor_Set_At_XYZ(kActorZuben, -9.68f, -58.23f, 11.14f, 250); - Ambient_Sounds_Add_Looping_Sound( 54, 30, 90, 1); - Ambient_Sounds_Add_Looping_Sound(205, 20, 1, 1); + + Ambient_Sounds_Add_Looping_Sound( 54, 30, 90, 1); + Ambient_Sounds_Add_Looping_Sound(205, 20, 1, 1); Ambient_Sounds_Add_Looping_Sound( 56, 40, 100, 1); Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); diff --git a/engines/bladerunner/script/scene/ct10.cpp b/engines/bladerunner/script/scene/ct10.cpp index 0bbc6c2f50..3052fac9e8 100644 --- a/engines/bladerunner/script/scene/ct10.cpp +++ b/engines/bladerunner/script/scene/ct10.cpp @@ -64,8 +64,8 @@ bool SceneScriptCT10::MouseClick(int x, int y) { return false; } -void SceneScriptCT10::sub_401844() { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 10.6f, 0.0f, -50.5f, 0, 1, false, 0)) { +void SceneScriptCT10::checkCabinet() { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 10.6f, 0.0f, -50.5f, 0, true, false, 0)) { Player_Loses_Control(); Actor_Face_Heading(kActorMcCoy, 0, false); Sound_Play(339, 100, 0, 0, 50); @@ -82,7 +82,7 @@ void SceneScriptCT10::sub_401844() { bool SceneScriptCT10::ClickedOn3DObject(const char *objectName, bool a2) { if (Object_Query_Click("TUB", objectName)) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -41.0f, 0.0f, -106.0f, 0, 1, false, 0)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -41.0f, 0.0f, -106.0f, 0, true, false, 0)) { Player_Loses_Control(); Actor_Face_Heading(kActorMcCoy, 850, false); Actor_Change_Animation_Mode(kActorMcCoy, 38); @@ -101,8 +101,11 @@ bool SceneScriptCT10::ClickedOn3DObject(const char *objectName, bool a2) { } return true; } - if (Object_Query_Click("CABINETTOP", objectName) || Object_Query_Click("CABINETFRONT", objectName)) { - sub_401844(); + + if (Object_Query_Click("CABINETTOP", objectName) + || Object_Query_Click("CABINETFRONT", objectName) + ) { + checkCabinet(); return true; } return false; @@ -118,8 +121,8 @@ bool SceneScriptCT10::ClickedOnItem(int itemId, bool a2) { bool SceneScriptCT10::ClickedOnExit(int exitId) { if (exitId == 0) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -93.0f, 0.0f, -38.0f, 0, 1, false, 0)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -121.0f, 0.0f, -78.0f, 0, 0, false, 0); + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -93.0f, 0.0f, -38.0f, 0, true, false, 0)) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -121.0f, 0.0f, -78.0f, 0, false, false, 0); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Set(kFlagCT10toCT09); @@ -131,7 +134,7 @@ bool SceneScriptCT10::ClickedOnExit(int exitId) { bool SceneScriptCT10::ClickedOn2DRegion(int region) { if (region == 0) { - sub_401844(); + checkCabinet(); } return false; } @@ -145,11 +148,11 @@ void SceneScriptCT10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptCT10::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -93.0f, 0.0f, -38.0f, 0, 0, false, 0); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -49.0f, 0.0f, -38.0f, 0, 0, false, 0); - if (!Game_Flag_Query(525)) { + if (!Game_Flag_Query(kFlagCT10Entered)) { Actor_Voice_Over(450, kActorVoiceOver); Actor_Voice_Over(460, kActorVoiceOver); Actor_Voice_Over(470, kActorVoiceOver); - Game_Flag_Set(525); + Game_Flag_Set(kFlagCT10Entered); } } diff --git a/engines/bladerunner/script/scene/ct11.cpp b/engines/bladerunner/script/scene/ct11.cpp index 758162811d..e5e772df15 100644 --- a/engines/bladerunner/script/scene/ct11.cpp +++ b/engines/bladerunner/script/scene/ct11.cpp @@ -24,6 +24,11 @@ namespace BladeRunner { +enum kCT11Loops { + kCT11LoopMain = 0, + kCT11LoopMainNoCar = 2 +}; + void SceneScriptCT11::InitializeScene() { if (Game_Flag_Query(kFlagCT12toCT11)) { Setup_Scene_Information(-378.0f, 9.68f, -55.0f, 440); @@ -34,8 +39,8 @@ void SceneScriptCT11::InitializeScene() { } Scene_Exit_Add_2D_Exit(0, 257, 240, 364, 330, 1); - Scene_Exit_Add_2D_Exit(1, 97, 0, 155, 324, 0); - Scene_Exit_Add_2D_Exit(2, 0, 0, 20, 479, 3); + Scene_Exit_Add_2D_Exit(1, 97, 0, 155, 324, 0); + Scene_Exit_Add_2D_Exit(2, 0, 0, 20, 479, 3); Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1); Ambient_Sounds_Add_Sound( 67, 5, 80, 16, 25, -100, 100, -101, -101, 0, 0); @@ -45,9 +50,9 @@ void SceneScriptCT11::InitializeScene() { Ambient_Sounds_Add_Sound(380, 5, 80, 50, 100, -100, 100, -101, -101, 0, 0); if (Global_Variable_Query(kVariableChapter) > 3) { - Scene_Loop_Set_Default(2); + Scene_Loop_Set_Default(kCT11LoopMainNoCar); } else { - Scene_Loop_Set_Default(0); + Scene_Loop_Set_Default(kCT11LoopMain); } } @@ -56,19 +61,19 @@ void SceneScriptCT11::SceneLoaded() { Unobstacle_Object("BOX NORTHWEST 1", true); Unobstacle_Object("BOX SOUTH 1", true); if (Global_Variable_Query(kVariableChapter) < 4) { - if (!Game_Flag_Query(645)) { - Item_Add_To_World(115, 951, 33, 640.21f, 30.0f, 470.0f, 512, 12, 12, false, true, false, true); + if (!Game_Flag_Query(kFlagCT11DogWrapperTaken)) { + Item_Add_To_World(kItemDogWrapper, 951, 33, 640.21f, 30.0f, 470.0f, 512, 12, 12, false, true, false, true); Scene_2D_Region_Add(0, 505, 316, 513, 321); - Game_Flag_Set(725); + Game_Flag_Set(kFlagCT11DogWrapperAvailable); } if (!Actor_Clue_Query(kActorMcCoy, kClueCar)) { Scene_2D_Region_Add(1, 412, 258, 552, 358); } } else { - if (Game_Flag_Query(725)) { - Item_Remove_From_World(115); - Game_Flag_Reset(725); - Game_Flag_Set(645); + if (Game_Flag_Query(kFlagCT11DogWrapperAvailable)) { + Item_Remove_From_World(kItemDogWrapper); + Game_Flag_Reset(kFlagCT11DogWrapperAvailable); + Game_Flag_Set(kFlagCT11DogWrapperTaken); } Unobstacle_Object("BRIDGE SUPPORT", true); Unobstacle_Object("BODY", true); @@ -131,14 +136,14 @@ bool SceneScriptCT11::ClickedOnExit(int exitId) { } bool SceneScriptCT11::ClickedOn2DRegion(int region) { - if (region == 0 && Game_Flag_Query(725)) { + if (region == 0 && Game_Flag_Query(kFlagCT11DogWrapperAvailable)) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 686.0f, 0.0f, 658.0f, 12, true, false, 0)) { Actor_Face_Heading(kActorMcCoy, 47, false); - Item_Remove_From_World(115); + Item_Remove_From_World(kItemDogWrapper); Actor_Clue_Acquire(kActorMcCoy, kClueLichenDogWrapper, false, -1); Item_Pickup_Spin_Effect(951, 510, 319); - Game_Flag_Reset(725); - Game_Flag_Set(645); + Game_Flag_Reset(kFlagCT11DogWrapperAvailable); + Game_Flag_Set(kFlagCT11DogWrapperTaken); Actor_Voice_Over(550, kActorVoiceOver); Actor_Voice_Over(560, kActorVoiceOver); Actor_Voice_Over(570, kActorVoiceOver); diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h index cb0b3a4204..b5653517a0 100644 --- a/engines/bladerunner/script/scene_script.h +++ b/engines/bladerunner/script/scene_script.h @@ -149,7 +149,7 @@ DECLARE_SCRIPT(CT09) END_SCRIPT DECLARE_SCRIPT(CT10) - void sub_401844(); + void checkCabinet(); END_SCRIPT DECLARE_SCRIPT(CT11) |