diff options
-rw-r--r-- | engines/bladerunner/game_constants.h | 13 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/mia.cpp | 16 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/murray.cpp | 30 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf01.cpp | 271 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr01.cpp | 5 | ||||
-rw-r--r-- | engines/bladerunner/script/scene_script.h | 6 |
6 files changed, 202 insertions, 139 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index fc22ea4857..59e638329e 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -809,14 +809,18 @@ enum Flags { kFlagAR02StungByScorpion = 367, kFlagNotUsed370 = 370, // is never checked + // 371 is never used + // 372 is never used kFlagAR02DektoraBoughtScorpions = 374, kFlagBB11SadikPunchedMcCoy = 375, - + // 376 is never used + kFlagHF01MurrayMiaIntro = 377, kFlagDirectorsCut = 378, kFlagCT08toCT51 = 379, // is never checked kFlagCT51toCT08 = 380, - + // 381 is never used + kFlagHF01MurrayMiaTalk = 382, kFlagNotUsed383 = 383, kFlagHC01toHC02 = 384, kFlagHC02toHC01 = 385, @@ -842,7 +846,7 @@ enum Flags { kFlagHC02HawkersBarkeepBraceletTalk = 405, kFlagUnused406 = 406, // is never checked kFlagUnused407 = 407, // is never checked - + // 408 is never used kFlagMA01GaffApproachMcCoy = 409, kFlagBB06AndroidDestroyed = 410, @@ -850,7 +854,6 @@ enum Flags { kFlagCT12ToUG09 = 433, kFlagGenericWalkerWaiting = 443, kFlagIzoShot = 444, - kFlagUG02WeaponsChecked = 449, kFlagTB02ElevatorToTB05 = 450, kFlagTB05Entered = 451, @@ -1093,7 +1096,7 @@ enum Scenes { kSceneHC01 = 31, // Hawker's Circle - Green pawn - Outside kSceneHC02 = 32, // Hawker's Circle - China bar kSceneHC03 = 33, // Hawker's Circle - Green pawn - Inside - kSceneHF01 = 34, + kSceneHF01 = 34, // Hysteria Hall - Iutside kSceneHF02 = 35, kSceneHF03 = 36, kSceneHF04 = 37, diff --git a/engines/bladerunner/script/ai/mia.cpp b/engines/bladerunner/script/ai/mia.cpp index 103b6c4dbb..1655a8c599 100644 --- a/engines/bladerunner/script/ai/mia.cpp +++ b/engines/bladerunner/script/ai/mia.cpp @@ -41,8 +41,11 @@ void AIScriptMia::Initialize() { } bool AIScriptMia::Update() { - if (Global_Variable_Query(kVariableChapter) == 4 && Actor_Query_Goal_Number(kActorMia) != 300) + if (Global_Variable_Query(kVariableChapter) == 4 + && Actor_Query_Goal_Number(kActorMia) != 300 + ) { Actor_Set_Goal_Number(kActorMia, 300); + } return false; } @@ -163,9 +166,6 @@ bool AIScriptMia::UpdateAnimation(int *animation, int *frame) { _animationState = 2; } break; - - default: - break; } *frame = _animationFrame; @@ -176,28 +176,34 @@ bool AIScriptMia::UpdateAnimation(int *animation, int *frame) { bool AIScriptMia::ChangeAnimationMode(int mode) { switch (mode) { case kAnimationModeIdle: - if (_animationState >= 2 && _animationState <= 4) { + if (_animationState >= 2 + && _animationState <= 4 + ) { _flag1 = false; } else { _animationFrame = 0; _animationState = 0; } break; + case kAnimationModeTalk: _animationFrame = 0; _flag1 = false; _animationState = 2; break; + case 12: _animationFrame = 0; _flag1 = false; _animationState = 3; break; + case 13: _animationFrame = 0; _flag1 = false; _animationState = 4; break; + case 23: _animationFrame = 0; _animationState = 1; diff --git a/engines/bladerunner/script/ai/murray.cpp b/engines/bladerunner/script/ai/murray.cpp index f187cad373..f7fdcafb39 100644 --- a/engines/bladerunner/script/ai/murray.cpp +++ b/engines/bladerunner/script/ai/murray.cpp @@ -41,21 +41,26 @@ void AIScriptMurray::Initialize() { } bool AIScriptMurray::Update() { - if (Global_Variable_Query(kVariableChapter) == 4 && Actor_Query_Goal_Number(kActorMurray) != 300) + if (Global_Variable_Query(kVariableChapter) == 4 + && Actor_Query_Goal_Number(kActorMurray) != 300 + ) { Actor_Set_Goal_Number(kActorMurray, 300); + } - if (Player_Query_Current_Set() == kSetHF01) { - if (!Actor_Query_In_Set(kActorMcCoy, kSetHF01) - || !Actor_Query_In_Set(kActorMurray, kSetHF01) - || Actor_Query_Inch_Distance_From_Actor(kActorMcCoy, kActorMurray) >= 48 - || Game_Flag_Query(377)) { - return false; - } + if (Player_Query_Current_Set() != kSetHF01) { + return true; + } + if ( Actor_Query_In_Set(kActorMcCoy, kSetHF01) + && Actor_Query_In_Set(kActorMurray, kSetHF01) + && Actor_Query_Inch_Distance_From_Actor(kActorMcCoy, kActorMurray) < 48 + && !Game_Flag_Query(kFlagHF01MurrayMiaIntro) + ) { Actor_Set_Goal_Number(kActorMurray, 1); + return true; } - return true; + return false; } void AIScriptMurray::TimerExpired(int timer) { @@ -196,7 +201,7 @@ bool AIScriptMurray::UpdateAnimation(int *animation, int *frame) { bool AIScriptMurray::ChangeAnimationMode(int mode) { switch (mode) { - case 0: + case kAnimationModeIdle: if (_animationState > 0 && _animationState <= 5) { _flag = true; } else { @@ -205,7 +210,7 @@ bool AIScriptMurray::ChangeAnimationMode(int mode) { } break; - case 3: + case kAnimationModeTalk: _animationState = 1; _animationFrame = 0; _flag = false; @@ -234,9 +239,6 @@ bool AIScriptMurray::ChangeAnimationMode(int mode) { _animationFrame = 0; _flag = false; break; - - default: - break; } return true; diff --git a/engines/bladerunner/script/scene/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp index 5bb9dce1fc..9e0c0fa497 100644 --- a/engines/bladerunner/script/scene/hf01.cpp +++ b/engines/bladerunner/script/scene/hf01.cpp @@ -24,18 +24,27 @@ namespace BladeRunner { +enum kHF01Loops { + kHF01LoopInshot = 0, + kHF01LoopMainLoopSpinner = 1, + kHF01LoopDoorAnim = 3, + kHF01LoopOutshoot = 4, + kHF01LoopMainLoopNoSpinner = 5 +}; + void SceneScriptHF01::InitializeScene() { if (Game_Flag_Query(617)) { Setup_Scene_Information(243.94f, 8.0f, -341.9f, 342); } else if (Game_Flag_Query(kFlagHF05toHF01)) { Setup_Scene_Information(-202.0f, 0.0f, -619.0f, 407); } else if (Game_Flag_Query(kFlagHF03toHF01)) { - Setup_Scene_Information(124.0f, 8.0f, -880.0f, 455); + Setup_Scene_Information( 124.0f, 8.0f, -880.0f, 455); } else if (Game_Flag_Query(kFlagHF02toHF01)) { - Setup_Scene_Information(406.0f, 8.0f, -813.0f, 455); + Setup_Scene_Information( 406.0f, 8.0f, -813.0f, 455); } else { - Setup_Scene_Information(100.0f, 0.0f, -260.0f, 0); + Setup_Scene_Information( 100.0f, 0.0f, -260.0f, 0); } + Scene_Exit_Add_2D_Exit(0, 81, 226, 169, 321, 0); if (!Game_Flag_Query(663)) { Scene_Exit_Add_2D_Exit(1, 304, 239, 492, 339, 0); @@ -44,35 +53,37 @@ void SceneScriptHF01::InitializeScene() { Scene_Exit_Add_2D_Exit(3, 0, 311, 66, 417, 2); } } - Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1); - Ambient_Sounds_Add_Looping_Sound(340, 25, 0, 1); - Ambient_Sounds_Add_Looping_Sound(81, 60, 100, 1); - Ambient_Sounds_Add_Sound(182, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(184, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(185, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(186, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(188, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(189, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(191, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(192, 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); - Ambient_Sounds_Add_Sound(68, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(69, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(375, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(376, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); - Ambient_Sounds_Add_Sound(377, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); + + Ambient_Sounds_Add_Looping_Sound( 54, 50, 0, 1); + Ambient_Sounds_Add_Looping_Sound(340, 25, 0, 1); + Ambient_Sounds_Add_Looping_Sound( 81, 60, 100, 1); + Ambient_Sounds_Add_Sound(182, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(184, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(185, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(186, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(188, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(189, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(191, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(192, 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); + Ambient_Sounds_Add_Sound( 68, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound( 69, 10, 180, 16, 25, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(375, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(376, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(377, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); + if (Game_Flag_Query(kFlagSpinnerAtHF01)) { if (!Game_Flag_Query(kFlagHF02toHF01) && !Game_Flag_Query(kFlagHF03toHF01) && !Game_Flag_Query(kFlagHF05toHF01) ) { - Scene_Loop_Start_Special(0, 0, 0); + Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kHF01LoopInshot, false); } - Scene_Loop_Set_Default(1); + Scene_Loop_Set_Default(kHF01LoopMainLoopSpinner); } else if (Game_Flag_Query(663)) { - Scene_Loop_Set_Default(1); + Scene_Loop_Set_Default(kHF01LoopMainLoopSpinner); } else { - Scene_Loop_Set_Default(5); + Scene_Loop_Set_Default(kHF01LoopMainLoopNoSpinner); } } @@ -100,13 +111,14 @@ bool SceneScriptHF01::ClickedOnActor(int actorId) { } else { affectionTowardsActor = -1; } - if (actorId == kActorMia || actorId == kActorMurray) { - if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 504.04f, 8.0f, -242.17f, 12, 1, false, 0)) { + + if (actorId == kActorMia + || actorId == kActorMurray + ) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 504.04f, 8.0f, -242.17f, 12, true, false, 0)) { ADQ_Flush(); Actor_Face_Actor(kActorMcCoy, kActorMurray, true); - if (Game_Flag_Query(382)) { - sub_4026B4(); - } else { + if (!Game_Flag_Query(kFlagHF01MurrayMiaTalk)) { Actor_Says(kActorMcCoy, 1455, 15); Actor_Says(kActorMurray, 40, 13); Actor_Says(kActorMcCoy, 1460, 13); @@ -118,22 +130,28 @@ bool SceneScriptHF01::ClickedOnActor(int actorId) { Actor_Face_Actor(kActorMurray, kActorMcCoy, true); Actor_Says(kActorMurray, 70, 13); Actor_Says(kActorMcCoy, 1470, 14); - Actor_Says(kActorMia, 30, 3); + Actor_Says(kActorMia, 30, kAnimationModeTalk); Actor_Says(kActorMurray, 80, 15); - Actor_Says(kActorMia, 50, 3); + Actor_Says(kActorMia, 50, kAnimationModeTalk); Actor_Says(kActorMurray, 110, 14); - Game_Flag_Set(382); + Game_Flag_Set(kFlagHF01MurrayMiaTalk); + } else { + dialogueWithMiaAndMurray(); } return true; } return false; } - if (affectionTowardsActor != -1 && actorId == affectionTowardsActor) { - if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, actorId, 28, 1, false)) { + + if (affectionTowardsActor != -1 + && actorId == affectionTowardsActor + ) { + if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, actorId, 28, true, false)) { if (Actor_Query_Goal_Number(affectionTowardsActor) == 599) { Actor_Says(kActorMcCoy, 8630, 13); return true; } + if (Global_Variable_Query(kVariableChapter) == 5 && (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallDektora1) || Actor_Clue_Query(kActorMcCoy, kCluePhoneCallLucy1) @@ -147,12 +165,12 @@ bool SceneScriptHF01::ClickedOnActor(int actorId) { Actor_Face_Actor(kActorMcCoy, affectionTowardsActor, true); Actor_Face_Actor(affectionTowardsActor, kActorMcCoy, true); if (affectionTowardsActor == kActorDektora) { - sub_4032DC(); + talkWithDektora(); } else if (affectionTowardsActor == kActorLucy) { - sub_403484(); + talkWithLucy(); } Async_Actor_Walk_To_XYZ(affectionTowardsActor, -175.0f, 8.0f, -617.0f, 0, false); - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -137.0f, 8.0f, -577.0f, 0, 0, false, 1); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -137.0f, 8.0f, -577.0f, 0, false, false, 1); Game_Flag_Set(kFlagHF01toHF05); Set_Enter(kSetHF05, kSceneHF05); } @@ -173,6 +191,7 @@ bool SceneScriptHF01::ClickedOnExit(int exitId) { } return true; } + if (exitId == 1) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 124.0f, 8.0f, -724.0f, 0, true, false, 0)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 124.0f, 8.0f, -880.0f, 0, false, false, 0); @@ -181,6 +200,7 @@ bool SceneScriptHF01::ClickedOnExit(int exitId) { } return true; } + if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 406.0f, 8.0f, -717.0f, 0, true, false, 0)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 406.0f, 8.0f, -813.0f, 0, false, false, 0); @@ -189,6 +209,7 @@ bool SceneScriptHF01::ClickedOnExit(int exitId) { } return true; } + if (exitId == 3) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 100.0f, 0.0f, -260.0f, 0, true, false, 0)) { Game_Flag_Reset(kFlagMcCoyInChinaTown); @@ -197,70 +218,70 @@ bool SceneScriptHF01::ClickedOnExit(int exitId) { Game_Flag_Reset(kFlagMcCoyInPoliceStation); Game_Flag_Reset(kFlagMcCoyInBradburyBuilding); Game_Flag_Reset(kFlagMcCoyInHysteriaHall); - int spinnerDest = Spinner_Interface_Choose_Dest(3, false); + int spinnerDest = Spinner_Interface_Choose_Dest(kHF01LoopDoorAnim, false); switch (spinnerDest) { case kSpinnerDestinationPoliceStation: Game_Flag_Set(kFlagMcCoyInPoliceStation); Game_Flag_Reset(kFlagSpinnerAtHF01); Game_Flag_Set(kFlagSpinnerAtPS01); Set_Enter(kSetPS01, kScenePS01); - Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); + Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kHF01LoopOutshoot, true); break; case kSpinnerDestinationMcCoysApartment: Game_Flag_Set(kFlagMcCoyInMcCoyApartment); Game_Flag_Reset(kFlagSpinnerAtHF01); Game_Flag_Set(kFlagSpinnerAtMA01); Set_Enter(kSetMA01, kSceneMA01); - Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); + Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kHF01LoopOutshoot, true); break; case kSpinnerDestinationRuncitersAnimals: Game_Flag_Set(kFlagMcCoyInRunciters); Game_Flag_Reset(kFlagSpinnerAtHF01); Game_Flag_Set(kFlagSpinnerAtRC01); Set_Enter(kSetRC01, kSceneRC01); - Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); + Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kHF01LoopOutshoot, true); break; case kSpinnerDestinationChinatown: Game_Flag_Set(kFlagMcCoyInChinaTown); Game_Flag_Reset(kFlagSpinnerAtHF01); Game_Flag_Set(kFlagSpinnerAtCT01); Set_Enter(kSetCT01_CT12, kSceneCT01); - Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); + Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kHF01LoopOutshoot, true); break; case kSpinnerDestinationAnimoidRow: Game_Flag_Set(kFlagMcCoyInTyrellBuilding); Game_Flag_Reset(kFlagSpinnerAtHF01); Game_Flag_Set(kFlagSpinnerAtTB02); Set_Enter(kSetTB02_TB03, kSceneTB02); - Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); + Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kHF01LoopOutshoot, true); break; case kSpinnerDestinationTyrellBuilding: Game_Flag_Set(kFlagMcCoyInAnimoidRow); Game_Flag_Reset(kFlagSpinnerAtHF01); Game_Flag_Set(kFlagSpinnerAtAR01); Set_Enter(kSetAR01_AR02, kSceneAR01); - Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); + Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kHF01LoopOutshoot, true); break; case kSpinnerDestinationDNARow: Game_Flag_Set(kFlagMcCoyInDNARow); Game_Flag_Reset(kFlagSpinnerAtHF01); Game_Flag_Set(kFlagSpinnerAtDR01); Set_Enter(kSetDR01_DR02_DR04, kSceneDR01); - Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); + Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kHF01LoopOutshoot, true); break; case kSpinnerDestinationBradburyBuilding: Game_Flag_Set(kFlagMcCoyInBradburyBuilding); Game_Flag_Reset(kFlagSpinnerAtHF01); Game_Flag_Set(kFlagSpinnerAtBB01); Set_Enter(kSetBB01, kSceneBB01); - Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); + Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kHF01LoopOutshoot, true); break; case kSpinnerDestinationNightclubRow: Game_Flag_Set(kFlagMcCoyInNightclubRow); Game_Flag_Reset(kFlagSpinnerAtHF01); Game_Flag_Set(kFlagSpinnerAtNR01); Set_Enter(kSetNR01, kSceneNR01); - Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); + Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kHF01LoopOutshoot, true); break; default: Game_Flag_Set(kFlagMcCoyInHysteriaHall); @@ -281,15 +302,23 @@ void SceneScriptHF01::SceneFrameAdvanced(int frame) { if (frame == 10) { Sound_Play(118, 40, 0, 0, 50); } - if (frame == 72 || frame == 193) { + + if (frame == 72 + || frame == 193 + ) { Sound_Play(116, 100, -50, -50, 50); } - if (frame == 88 || frame == 214) { + + if (frame == 88 + || frame == 214 + ) { Sound_Play(119, 100, -50, -50, 50); } + if (frame == 242) { Sound_Play(117, 40, -50, 80, 50); } + if (Actor_Query_Goal_Number(kActorMurray) == 1) { Actor_Set_Goal_Number(kActorMurray, 0); } @@ -301,7 +330,7 @@ void SceneScriptHF01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptHF01::PlayerWalkedIn() { if (Game_Flag_Query(663)) { ADQ_Flush(); - ADQ_Add(kActorOfficerGrayford, 280, 3); + ADQ_Add(kActorOfficerGrayford, 280, kAnimationModeTalk); Actor_Put_In_Set(kActorOfficerLeary, kSetHF01); Actor_Set_At_XYZ(kActorOfficerLeary, 8.2f, 8.0f, -346.67f, 1021); Actor_Put_In_Set(kActorOfficerGrayford, kSetHF01); @@ -309,7 +338,10 @@ void SceneScriptHF01::PlayerWalkedIn() { Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateUncover, true, kActorMcCoy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 0, 100, 300, false); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorMcCoy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 0, 100, 300, false); } - if (!Game_Flag_Query(kFlagCrazylegsArrested) && Actor_Query_Goal_Number(kActorCrazylegs) != 2) { + + if (!Game_Flag_Query(kFlagCrazylegsArrested) + && Actor_Query_Goal_Number(kActorCrazylegs) != 2 + ) { if (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallLucy1) && Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy && Actor_Query_Goal_Number(kActorLucy) != 599 @@ -326,38 +358,44 @@ void SceneScriptHF01::PlayerWalkedIn() { Actor_Set_Targetable(kActorDektora, true); } } + if (Game_Flag_Query(617)) { Actor_Set_Goal_Number(kActorSteele, 280); Game_Flag_Reset(617); //return true; return; } + if (Game_Flag_Query(652)) { Game_Flag_Reset(652); Actor_Voice_Over(950, kActorVoiceOver); Actor_Voice_Over(960, kActorVoiceOver); Actor_Voice_Over(970, kActorVoiceOver); Actor_Voice_Over(980, kActorVoiceOver); - } else if (!Game_Flag_Query(377) && Global_Variable_Query(kVariableChapter) < 4) { + } else if (!Game_Flag_Query(kFlagHF01MurrayMiaIntro) + && Global_Variable_Query(kVariableChapter) < 4 + ) { ADQ_Flush(); ADQ_Add(kActorMurray, 0, 14); - ADQ_Add(kActorMurray, 10, 3); - ADQ_Add(kActorMia, 0, 3); + ADQ_Add(kActorMurray, 10, kAnimationModeTalk); + ADQ_Add(kActorMia, 0, kAnimationModeTalk); Actor_Face_Actor(kActorMurray, kActorMia, true); ADQ_Add(kActorMurray, 20, 13); - ADQ_Add(kActorMia, 10, 3); - ADQ_Add(kActorMurray, 30, 3); - ADQ_Add(kActorMia, 20, 3); + ADQ_Add(kActorMia, 10, kAnimationModeTalk); + ADQ_Add(kActorMurray, 30, kAnimationModeTalk); + ADQ_Add(kActorMia, 20, kAnimationModeTalk); Actor_Face_Heading(kActorMurray, 271, false); - Game_Flag_Set(377); + Game_Flag_Set(kFlagHF01MurrayMiaIntro); } + if (Game_Flag_Query(kFlagHF03toHF01)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 124.0f, 8.0f, -724.0f, 0, 1, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 124.0f, 8.0f, -724.0f, 0, true, false, 0); } else if (Game_Flag_Query(kFlagHF02toHF01)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 406.0f, 8.0f, -717.0f, 0, 1, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 406.0f, 8.0f, -717.0f, 0, true, false, 0); } else if (!Game_Flag_Query(kFlagHF05toHF01)) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, 100.0f, 0.0f, -300.0f, 0, 1, false, 0); + Loop_Actor_Walk_To_XYZ(kActorMcCoy, 100.0f, 0.0f, -300.0f, 0, true, false, 0); } + Game_Flag_Reset(kFlagHF03toHF01); Game_Flag_Reset(kFlagHF02toHF01); Game_Flag_Reset(kFlagHF05toHF01); @@ -367,6 +405,7 @@ void SceneScriptHF01::PlayerWalkedIn() { void SceneScriptHF01::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); + if (!Game_Flag_Query(kFlagHF01toHF05) && !Game_Flag_Query(kFlagHF01toHF02) && !Game_Flag_Query(kFlagHF01toHF03) @@ -378,11 +417,13 @@ void SceneScriptHF01::PlayerWalkedOut() { Outtake_Play(kOuttakeTowards3, true, -1); } Game_Flag_Reset(722); + if (Actor_Query_Goal_Number(kActorLucy) == 450) { Actor_Put_In_Set(kActorLucy, kSetFreeSlotG); Actor_Set_At_Waypoint(kActorLucy, 39, 0); Actor_Set_Goal_Number(kActorLucy, 599); } + if (Actor_Query_Goal_Number(kActorDektora) == 450) { Actor_Put_In_Set(kActorDektora, kSetFreeSlotG); Actor_Set_At_Waypoint(kActorDektora, 39, 0); @@ -393,46 +434,50 @@ void SceneScriptHF01::PlayerWalkedOut() { void SceneScriptHF01::DialogueQueueFlushed(int a1) { } -void SceneScriptHF01::sub_4026B4() { +void SceneScriptHF01::dialogueWithMiaAndMurray() { Dialogue_Menu_Clear_List(); if (Actor_Clue_Query(kActorMcCoy, kClueLucy)) { - DM_Add_To_List_Never_Repeat_Once_Selected(440, 8, 6, 3); + DM_Add_To_List_Never_Repeat_Once_Selected(440, 8, 6, 3); // LUCY PHOTO } if (!Actor_Clue_Query(kActorMcCoy, kClueLucy) && Actor_Clue_Query(kActorMcCoy, kClueRunciterInterviewA) ) { - DM_Add_To_List_Never_Repeat_Once_Selected(450, 7, 6, 3); + DM_Add_To_List_Never_Repeat_Once_Selected(450, 7, 6, 3); // LUCY } if (Actor_Clue_Query(kActorMcCoy, kClueCheese)) { - DM_Add_To_List_Never_Repeat_Once_Selected(460, 3, 5, 6); + DM_Add_To_List_Never_Repeat_Once_Selected(460, 3, 5, 6); // CHEESE } if (Actor_Clue_Query(kActorMcCoy, kClueLichenDogWrapper)) { - DM_Add_To_List_Never_Repeat_Once_Selected(470, -1, 3, 8); + DM_Add_To_List_Never_Repeat_Once_Selected(470, -1, 3, 8); // LICHEN DOG WRAPPER } - Dialogue_Menu_Add_DONE_To_List(480); + Dialogue_Menu_Add_DONE_To_List(480); // DONE + Dialogue_Menu_Appear(320, 240); int answer = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); + switch (answer) { - case 440: + case 440: // LUCY PHOTO Actor_Says(kActorMcCoy, 1480, 15); - Actor_Says(kActorMia, 70, 3); - Actor_Says(kActorMurray, 120, 3); + Actor_Says(kActorMia, 70, kAnimationModeTalk); + Actor_Says(kActorMurray, 120, kAnimationModeTalk); Actor_Says(kActorMcCoy, 1505, 14); - Actor_Says(kActorMia, 80, 3); - Actor_Says(kActorMurray, 130, 3); - Actor_Says(kActorMia, 90, 3); + Actor_Says(kActorMia, 80, kAnimationModeTalk); + Actor_Says(kActorMurray, 130, kAnimationModeTalk); + Actor_Says(kActorMia, 90, kAnimationModeTalk); Actor_Says(kActorMcCoy, 1510, 12); break; - case 450: + + case 450: // LUCY Actor_Says(kActorMcCoy, 1485, 16); - Actor_Says(kActorMia, 100, 3); + Actor_Says(kActorMia, 100, kAnimationModeTalk); Actor_Says(kActorMurray, 140, 12); - Actor_Says(kActorMia, 110, 3); - Actor_Says(kActorMia, 120, 3); + Actor_Says(kActorMia, 110, kAnimationModeTalk); + Actor_Says(kActorMia, 120, kAnimationModeTalk); Actor_Says(kActorMurray, 150, 14); break; - case 460: + + case 460: // CHEESE Actor_Says(kActorMcCoy, 1490, 13); Actor_Says(kActorMurray, 160, 15); Actor_Says(kActorMia, 130, 13); @@ -440,7 +485,7 @@ void SceneScriptHF01::sub_4026B4() { Actor_Says(kActorMurray, 180, 13); Actor_Says(kActorMurray, 190, 14); Actor_Says(kActorMcCoy, 1515, 15); - Actor_Says(kActorMurray, 200, 3); + Actor_Says(kActorMurray, 200, kAnimationModeTalk); Actor_Says(kActorMcCoy, 1520, 15); Actor_Says(kActorMurray, 210, 13); Actor_Says(kActorMurray, 220, 13); @@ -448,51 +493,53 @@ void SceneScriptHF01::sub_4026B4() { Actor_Says(kActorMurray, 230, 13); Actor_Clue_Acquire(kActorMcCoy, kClueSpecialIngredient, false, kActorMurray); break; - case 470: + + case 470: // LICHEN DOG WRAPPER Actor_Says(kActorMcCoy, 1495, 14); Actor_Face_Actor(kActorMurray, kActorMcCoy, true); Actor_Says(kActorMurray, 240, 13); Actor_Face_Actor(kActorMurray, kActorMia, true); break; - case 480: + + case 480: // DONE Actor_Says(kActorMcCoy, 1500, 16); break; } } -void SceneScriptHF01::sub_4032DC() { - Actor_Says(kActorDektora, 0, 3); - Actor_Says(kActorMcCoy, 1400, 3); - Actor_Says(kActorDektora, 10, 3); - Actor_Says(kActorMcCoy, 1405, 3); - Actor_Says(kActorDektora, 20, 3); - Actor_Says(kActorMcCoy, 1410, 3); - Actor_Says(kActorDektora, 30, 3); - Actor_Says(kActorMcCoy, 1415, 3); - Actor_Says(kActorDektora, 40, 3); - Actor_Says(kActorDektora, 50, 3); - Actor_Says(kActorDektora, 60, 3); - Actor_Says(kActorDektora, 70, 3); - Actor_Says(kActorMcCoy, 1420, 3); - Actor_Says(kActorDektora, 80, 3); +void SceneScriptHF01::talkWithDektora() { + Actor_Says(kActorDektora, 0, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1400, kAnimationModeTalk); + Actor_Says(kActorDektora, 10, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1405, kAnimationModeTalk); + Actor_Says(kActorDektora, 20, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1410, kAnimationModeTalk); + Actor_Says(kActorDektora, 30, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1415, kAnimationModeTalk); + Actor_Says(kActorDektora, 40, kAnimationModeTalk); + Actor_Says(kActorDektora, 50, kAnimationModeTalk); + Actor_Says(kActorDektora, 60, kAnimationModeTalk); + Actor_Says(kActorDektora, 70, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1420, kAnimationModeTalk); + Actor_Says(kActorDektora, 80, kAnimationModeTalk); } -void SceneScriptHF01::sub_403484() { - Actor_Says(kActorLucy, 0, 3); - Actor_Says(kActorMcCoy, 1425, 3); - Actor_Says(kActorLucy, 10, 3); - Actor_Says(kActorLucy, 20, 3); - Actor_Says(kActorMcCoy, 1430, 3); - Actor_Says(kActorLucy, 30, 3); - Actor_Says(kActorMcCoy, 1435, 3); - Actor_Says(kActorLucy, 40, 3); - Actor_Says(kActorLucy, 50, 3); - Actor_Says(kActorMcCoy, 1440, 3); - Actor_Says(kActorLucy, 60, 3); - Actor_Says(kActorLucy, 70, 3); - Actor_Says(kActorMcCoy, 1445, 3); - Actor_Says(kActorLucy, 80, 3); - Actor_Says(kActorLucy, 3030, 3); +void SceneScriptHF01::talkWithLucy() { + Actor_Says(kActorLucy, 0, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1425, kAnimationModeTalk); + Actor_Says(kActorLucy, 10, kAnimationModeTalk); + Actor_Says(kActorLucy, 20, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1430, kAnimationModeTalk); + Actor_Says(kActorLucy, 30, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1435, kAnimationModeTalk); + Actor_Says(kActorLucy, 40, kAnimationModeTalk); + Actor_Says(kActorLucy, 50, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1440, kAnimationModeTalk); + Actor_Says(kActorLucy, 60, kAnimationModeTalk); + Actor_Says(kActorLucy, 70, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1445, kAnimationModeTalk); + Actor_Says(kActorLucy, 80, kAnimationModeTalk); + Actor_Says(kActorLucy, 3030, kAnimationModeTalk); } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp index 8823c12884..31486c1c25 100644 --- a/engines/bladerunner/script/scene/nr01.cpp +++ b/engines/bladerunner/script/scene/nr01.cpp @@ -300,6 +300,7 @@ void SceneScriptNR01::PlayerWalkedIn() { ADQ_Add(kActorSteele, 1040, 3); ADQ_Add(kActorGordo, 120, 82); } + if (Game_Flag_Query(604)) { if (Game_Flag_Query(622)) { ADQ_Add(kActorHanoi, 150, 3); @@ -310,12 +311,14 @@ void SceneScriptNR01::PlayerWalkedIn() { //return true; return; } + if (Game_Flag_Query(632)) { Delay(3500); Set_Enter(kSetNR11, kSceneNR11); //return true; return; } + if (Game_Flag_Query(534)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -380.0f, 31.73f, -841.0f, 0, false, false, 0); Game_Flag_Reset(534); @@ -406,6 +409,7 @@ void SceneScriptNR01::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, 48.0f, 23.88f, -189.0f, 0, 0, false, 0); } } + if (Game_Flag_Query(652)) { Game_Flag_Reset(652); Actor_Voice_Over(950, kActorVoiceOver); @@ -413,6 +417,7 @@ void SceneScriptNR01::PlayerWalkedIn() { Actor_Voice_Over(970, kActorVoiceOver); Actor_Voice_Over(980, kActorVoiceOver); } + if (Actor_Query_Goal_Number(kActorGordo) == 240) { Scene_Exits_Disable(); Actor_Set_Goal_Number(kActorGordo, 241); diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h index b5653517a0..f5bd9dcb72 100644 --- a/engines/bladerunner/script/scene_script.h +++ b/engines/bladerunner/script/scene_script.h @@ -197,9 +197,9 @@ DECLARE_SCRIPT(HC04) END_SCRIPT DECLARE_SCRIPT(HF01) - void sub_4026B4(); - void sub_4032DC(); - void sub_403484(); + void dialogueWithMiaAndMurray(); + void talkWithDektora(); + void talkWithLucy(); END_SCRIPT DECLARE_SCRIPT(HF02) |