diff options
Diffstat (limited to 'engines/bladerunner')
-rw-r--r-- | engines/bladerunner/game_constants.h | 36 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/early_q.cpp | 5 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/gordo.cpp | 8 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/holloway.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/lucy.cpp | 322 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/steele.cpp | 29 | ||||
-rw-r--r-- | engines/bladerunner/script/ai_script.h | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/init_script.cpp | 10 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf02.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf03.cpp | 25 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf04.cpp | 58 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr01.cpp | 10 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr11.cpp | 2 |
13 files changed, 301 insertions, 216 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index 6ab99e79a5..be779417fa 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -914,6 +914,10 @@ enum Flags { kFlagDR01toCT11 = 558, kFlagHF03toHF04 = 566, // is never checked kFlagHF04toHF03 = 567, + kFlagHF04DoorsClosed = 584, + kFlagHF04CloseDoors = 585, + kFlagHF04OpenDoors = 586, + kFlagLucyRanAway = 593, kFlagKIAPrivacyAddonIntro = 599, kFlagTB07toTB02 = 608, kFlagTB07RachaelTalk = 612, @@ -975,6 +979,7 @@ enum Variables { kVariableWalkLoopActor = 37, kVariableWalkLoopRun = 38, kVariableDR06MannequinHeadOpened = 39, + kVariableBehavior = 40, // 1 dektora is replicant, 2 - ?, 3 - get caught by Baker kVariableMcCoyDrinks = 42, // is never checked kVariableAffectionTowards = 45, // 0 none, 1 steele, 2 dektora, 3 lucy kVariableGunPulledInFrontOfSebastian = 46, @@ -1102,9 +1107,9 @@ enum Scenes { kSceneHC02 = 32, // Hawker's Circle - China bar kSceneHC03 = 33, // Hawker's Circle - Green pawn - Inside kSceneHF01 = 34, // Hysteria Hall - Outside - kSceneHF02 = 35, // Hysteria Hall - Hall of Mirrors - Outside + kSceneHF02 = 35, // Hysteria Hall - Hall of Mirrors - Exit kSceneHF03 = 36, // Hysteria Hall - Arcade - kSceneHF04 = 37, // Hysteria Hall - Hall of Mirrors - Inside + kSceneHF04 = 37, // Hysteria Hall - Hall of Mirrors kSceneHF05 = 38, kSceneHF06 = 39, kSceneHF07 = 40, @@ -1562,6 +1567,33 @@ enum GoalClovis { kGoalClovisBB11TalkToMcCoy = 105 // ends Chapter 2 }; +enum GoalLucy { + kGoalLucyDefault = 0, + kGoalLucyMoveAround = 200, + kGoalLucyWillReturnToHF03 = 201, + kGoalLucyGoToHF03 = 205, + kGoalLucyRunOutPhase1 = 210, + kGoalLucyRunOutPhase2 = 211, + kGoalLucyRunToHF041 = 212, + kGoalLucyRunToHF042 = 213, + kGoalLucyRunAwayWithHelp1 = 214, + kGoalLucyRunAwayWithHelp2 = 215, + kGoalLucyGoToFreeSlotGAG = 220, + kGoalLucyGoToFreeSlotGAHJ = 225, + kGoalLucyHF04Start = 230, + kGoalLucyHF04TalkToMcCoy = 232, + kGoalLucyHF04Run1 = 233, + kGoalLucyHF04Run2 = 234, + kGoalLucyHF04WaitForMcCoy1 = 235, + kGoalLucyHF04Run3 = 236, + kGoalLucyHF04WaitForMcCoy2 = 237, + kGoalLucyHF04Run4 = 238, + kGoalLucyHF04WalkAway = 239, + kGoalLucyReturnToHF03 = 250, + kGoalLucyGoneChapter3 = 299, + kGoalLucyDead = 599 +}; + enum GoalIzo { kGoalIzoDefault = 0, kGoalIzoPrepareCamera = 1, diff --git a/engines/bladerunner/script/ai/early_q.cpp b/engines/bladerunner/script/ai/early_q.cpp index 40cd1b2722..826a339234 100644 --- a/engines/bladerunner/script/ai/early_q.cpp +++ b/engines/bladerunner/script/ai/early_q.cpp @@ -281,7 +281,10 @@ bool AIScriptEarlyQ::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Flush(kActorEarlyQ); Actor_Put_In_Set(kActorEarlyQ, kSetFreeSlotH); Actor_Set_At_Waypoint(kActorEarlyQ, 40, 0); - if (Game_Flag_Query(47) == 1 && Game_Flag_Query(592) && Game_Flag_Query(593)) { + if (Game_Flag_Query(47) == 1 + && Game_Flag_Query(592) + && Game_Flag_Query(kFlagLucyRanAway) + ) { Actor_Set_Goal_Number(kActorEarlyQ, 220); } else if (Game_Flag_Query(47)) { Actor_Set_Goal_Number(kActorEarlyQ, 230); diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp index e5fcebbd3a..5508512546 100644 --- a/engines/bladerunner/script/ai/gordo.cpp +++ b/engines/bladerunner/script/ai/gordo.cpp @@ -176,7 +176,7 @@ void AIScriptGordo::CompletedMovementTrack() { } if (Actor_Query_Goal_Number(kActorGordo) == 222) { if (Game_Flag_Query(kFlagGordoIsReplicant)) { - if (Global_Variable_Query(40) == 2) { + if (Global_Variable_Query(kVariableBehavior) == 2) { Actor_Set_Goal_Number(kActorGordo, 250); } else { Actor_Set_Goal_Number(kActorGordo, 230); @@ -431,8 +431,8 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorGordo); break; case 200: - if (Global_Variable_Query(40) == 2) { - if (Game_Flag_Query(593) + if (Global_Variable_Query(kVariableBehavior) == 2) { + if (Game_Flag_Query(kFlagLucyRanAway) && Game_Flag_Query(591) && Player_Query_Current_Scene() != kSceneNR02 ) { @@ -513,7 +513,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Says(kActorGordo, 850, 12); Actor_Says(kActorGordo, 860, 15); Actor_Says(0, 3910, 16); - if (Global_Variable_Query(40) == 2) { + if (Global_Variable_Query(kVariableBehavior) == 2) { Actor_Says(kActorGordo, 870, 16); Sound_Play(576, 50, 0, 0, 50); Sound_Play(319, 50, 0, 0, 50); diff --git a/engines/bladerunner/script/ai/holloway.cpp b/engines/bladerunner/script/ai/holloway.cpp index dc52107c1c..916706417c 100644 --- a/engines/bladerunner/script/ai/holloway.cpp +++ b/engines/bladerunner/script/ai/holloway.cpp @@ -49,7 +49,7 @@ bool AIScriptHolloway::Update() { void AIScriptHolloway::TimerExpired(int timer) { if (!timer) { AI_Countdown_Timer_Reset(kActorHolloway, 0); - if (Global_Variable_Query(40) == 1) { + if (Global_Variable_Query(kVariableBehavior) == 1) { Player_Gains_Control(); } Actor_Set_Goal_Number(kActorHolloway, 251); @@ -169,7 +169,7 @@ bool AIScriptHolloway::GoalChanged(int currentGoalNumber, int newGoalNumber) { Ambient_Sounds_Remove_All_Looping_Sounds(1); Player_Gains_Control(); Outtake_Play(kOuttakeInterrogation, 0, 1); - if (Global_Variable_Query(40) == 1) { + if (Global_Variable_Query(kVariableBehavior) == 1) { Actor_Set_Goal_Number(kActorDektora, 245); Actor_Change_Animation_Mode(kActorDektora, kAnimationModeIdle); } @@ -180,7 +180,7 @@ bool AIScriptHolloway::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Put_In_Set(kActorHolloway, kSetFreeSlotI); Actor_Set_At_Waypoint(kActorHolloway, 41, 0); Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle); - if (Global_Variable_Query(40) != 1) { + if (Global_Variable_Query(kVariableBehavior) != 1) { Player_Gains_Control(); } Game_Flag_Set(kFlagUG03toUG04); diff --git a/engines/bladerunner/script/ai/lucy.cpp b/engines/bladerunner/script/ai/lucy.cpp index 0f53758b28..087e432237 100644 --- a/engines/bladerunner/script/ai/lucy.cpp +++ b/engines/bladerunner/script/ai/lucy.cpp @@ -36,57 +36,74 @@ void AIScriptLucy::Initialize() { _flag = 0; - Actor_Set_Goal_Number(kActorLucy, 0); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyDefault); } bool AIScriptLucy::Update() { float x, y, z; - if (Global_Variable_Query(kVariableChapter) == 3 && Actor_Query_Goal_Number(kActorLucy) < 200) { - Actor_Set_Goal_Number(kActorLucy, 200); + if (Global_Variable_Query(kVariableChapter) == 3 + && Actor_Query_Goal_Number(kActorLucy) < kGoalLucyMoveAround + ) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyMoveAround); } - if (Actor_Query_Goal_Number(kActorLucy) == 230 && Player_Query_Current_Scene() == 37) { - Actor_Set_Goal_Number(kActorLucy, 233); + + if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04Start + && Player_Query_Current_Scene() == kSceneHF04 + ) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04Run1); } - if (Global_Variable_Query(kVariableChapter) == 4 && Actor_Query_Goal_Number(kActorLucy) < 300) { + + if (Global_Variable_Query(kVariableChapter) == 4 + && Actor_Query_Goal_Number(kActorLucy) < 300 + ) { Actor_Set_Goal_Number(kActorLucy, 300); } + if (Global_Variable_Query(kVariableChapter) == 4 - && Actor_Query_Goal_Number(kActorLucy) == 599 - && Actor_Query_Which_Set_In(kActorLucy) != 99) { + && Actor_Query_Goal_Number(kActorLucy) == kGoalLucyDead + && Actor_Query_Which_Set_In(kActorLucy) != 99 + ) { if (Actor_Query_Which_Set_In(kActorLucy) != Player_Query_Current_Set()) { Actor_Put_In_Set(kActorLucy, kSetFreeSlotI); Actor_Set_At_Waypoint(kActorLucy, 41, 0); } } - if (Game_Flag_Query(616) && Actor_Query_Goal_Number(kActorLucy) == 201) { + + if (Game_Flag_Query(616) + && Actor_Query_Goal_Number(kActorLucy) == kGoalLucyWillReturnToHF03 + ) { Actor_Put_In_Set(kActorLucy, kSetHF03); Actor_Set_At_Waypoint(kActorLucy, 371, 156); - Actor_Set_Goal_Number(kActorLucy, 250); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyReturnToHF03); } - if (Actor_Query_Goal_Number(kActorLucy) > 229 - && Actor_Query_Goal_Number(kActorLucy) < 239 - && Actor_Query_Goal_Number(kActorLucy) != 232 - && Player_Query_Current_Scene() == 37 - && Actor_Query_Which_Set_In(kActorLucy) == 40 - && !Game_Flag_Query(701) - && Actor_Query_Inch_Distance_From_Actor(kActorLucy, kActorMcCoy) < 84 - && !Player_Query_Combat_Mode() - && Actor_Query_Friendliness_To_Other(kActorLucy, kActorMcCoy) > 40) { - Actor_Set_Goal_Number(kActorLucy, 232); + + if ( Actor_Query_Goal_Number(kActorLucy) > 229 + && Actor_Query_Goal_Number(kActorLucy) < 239 + && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyHF04TalkToMcCoy + && Player_Query_Current_Scene() == kSceneHF04 + && Actor_Query_Which_Set_In(kActorLucy) == kSetHF04 + && !Game_Flag_Query(701) + && Actor_Query_Inch_Distance_From_Actor(kActorLucy, kActorMcCoy) < 84 + && !Player_Query_Combat_Mode() + && Actor_Query_Friendliness_To_Other(kActorLucy, kActorMcCoy) > 40 + ) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04TalkToMcCoy); // how can this be triggered? } - if (Actor_Query_Goal_Number(kActorLucy) == 235) { + + if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04WaitForMcCoy1) { Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); - if (z > -875.0f) { - Game_Flag_Set(586); - Actor_Set_Goal_Number(kActorLucy, 236); + if (z < -875.0f) { + Game_Flag_Set(kFlagHF04OpenDoors); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04Run3); } } - if (Actor_Query_Goal_Number(kActorLucy) == 237) { + + if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04WaitForMcCoy2) { Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); if (x > 350.0f) { - Game_Flag_Set(585); - Actor_Set_Goal_Number(kActorLucy, 238); + Game_Flag_Set(kFlagHF04CloseDoors); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04Run4); } } @@ -95,86 +112,93 @@ bool AIScriptLucy::Update() { void AIScriptLucy::TimerExpired(int timer) { AI_Countdown_Timer_Reset(kActorLucy, 0); - if (!timer && Actor_Query_Goal_Number(kActorLucy) == 205) { - if (Player_Query_Current_Scene() == 36) { + if (timer == 0 + && Actor_Query_Goal_Number(kActorLucy) == kGoalLucyGoToHF03 + ) { + if (Player_Query_Current_Scene() == kSceneHF03) { AI_Countdown_Timer_Start(kActorLucy, 0, 20); } else { - Actor_Set_Goal_Number(kActorLucy, 200); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyMoveAround); } } } void AIScriptLucy::CompletedMovementTrack() { switch (Actor_Query_Goal_Number(kActorLucy)) { - case 205: - if (!Game_Flag_Query(616) || Global_Variable_Query(40) != 3) { - AI_Countdown_Timer_Reset(kActorLucy, 0); - AI_Countdown_Timer_Start(kActorLucy, 0, 30); - return; //false; + case kGoalLucyGoToHF03: + if (Game_Flag_Query(616) + && Global_Variable_Query(kVariableBehavior) == 3 + ) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyReturnToHF03); + return; //true; } - Actor_Set_Goal_Number(kActorLucy, 250); - return; //true; + AI_Countdown_Timer_Reset(kActorLucy, 0); + AI_Countdown_Timer_Start(kActorLucy, 0, 30); + break; - case 210: - Actor_Set_Goal_Number(kActorLucy, 211); + case kGoalLucyRunOutPhase1: + Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunOutPhase2); break; - case 211: - Game_Flag_Set(593); - Actor_Set_Goal_Number(kActorLucy, 299); + case kGoalLucyRunOutPhase2: + Game_Flag_Set(kFlagLucyRanAway); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyGoneChapter3); break; - case 212: - Actor_Set_Goal_Number(kActorLucy, 213); + case kGoalLucyRunToHF041: + Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunToHF042); break; - case 213: - if (Actor_Clue_Query(kActorLucy, 219) && Global_Variable_Query(40) != 3) { - Game_Flag_Set(593); + case kGoalLucyRunToHF042: + if (Actor_Clue_Query(kActorLucy, kClueMcCoyHelpedLucy) + && Global_Variable_Query(kVariableBehavior) != 3 + ) { + Game_Flag_Set(kFlagLucyRanAway); } else { - Actor_Set_Goal_Number(kActorLucy, 230); - Game_Flag_Reset(584); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04Start); + Game_Flag_Reset(kFlagHF04DoorsClosed); } break; - case 214: - Actor_Set_Goal_Number(kActorLucy, 215); + case kGoalLucyRunAwayWithHelp1: + Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunAwayWithHelp2); break; - case 215: - Actor_Set_Goal_Number(kActorLucy, 201); + case kGoalLucyRunAwayWithHelp2: + Actor_Set_Goal_Number(kActorLucy, kGoalLucyWillReturnToHF03); break; - case 220: - case 225: - Actor_Set_Goal_Number(kActorLucy, 200); + case kGoalLucyGoToFreeSlotGAG: + case kGoalLucyGoToFreeSlotGAHJ: + Actor_Set_Goal_Number(kActorLucy, kGoalLucyMoveAround); break; - case 233: - Game_Flag_Set(585); - Actor_Set_Goal_Number(kActorLucy, 234); + case kGoalLucyHF04Run1: + Game_Flag_Set(kFlagHF04CloseDoors); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04Run2); break; - case 234: - Actor_Set_Goal_Number(kActorLucy, 235); + case kGoalLucyHF04Run2: + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04WaitForMcCoy1); break; - case 236: - Actor_Set_Goal_Number(kActorLucy, 237); + case kGoalLucyHF04Run3: + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04WaitForMcCoy2); break; - case 238: - Game_Flag_Set(593); + case kGoalLucyHF04Run4: + Game_Flag_Set(kFlagLucyRanAway); Actor_Put_In_Set(kActorLucy, kSetFreeSlotA); Actor_Set_At_Waypoint(kActorLucy, 33, 0); Actor_Set_Health(kActorLucy, 30, 30); - if (Global_Variable_Query(40) == 3) { + + if (Global_Variable_Query(kVariableBehavior) == 3) { Actor_Set_Goal_Number(kActorSteele, 240); } break; - case 239: - Game_Flag_Set(593); + case kGoalLucyHF04WalkAway: + Game_Flag_Set(kFlagLucyRanAway); break; default: @@ -188,9 +212,9 @@ void AIScriptLucy::ReceivedClue(int clueId, int fromActorId) { } void AIScriptLucy::ClickedByPlayer() { - if (Actor_Query_Goal_Number(kActorLucy) == 599) { - Actor_Face_Actor(kActorMcCoy, kActorLucy, 1); - Actor_Says(kActorMcCoy, 8630, 3); + if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyDead) { + Actor_Face_Actor(kActorMcCoy, kActorLucy, true); + Actor_Says(kActorMcCoy, 8630, kAnimationModeTalk); } } @@ -224,15 +248,24 @@ void AIScriptLucy::Retired(int byActorId) { if (byActorId == kActorMcCoy) { Actor_Modify_Friendliness_To_Other(kActorClovis, kActorMcCoy, -6); } - if ((byActorId == kActorSteele || byActorId == kActorMcCoy) - && Actor_Query_In_Set(kActorSteele, kSetHF06) - && Actor_Query_In_Set(kActorMcCoy, kSetHF06)) { + + if ((byActorId == kActorSteele + || byActorId == kActorMcCoy + ) + && Actor_Query_In_Set(kActorSteele, kSetHF06) + && Actor_Query_In_Set(kActorMcCoy, kSetHF06) + ) { Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorMcCoy, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false); } - if (Query_Difficulty_Level() && byActorId == kActorMcCoy && Game_Flag_Query(46)) { - Global_Variable_Increment(2, 200); + + if (Query_Difficulty_Level() != 0 + && byActorId == kActorMcCoy + && Game_Flag_Query(kFlagLucyIsReplicant) + ) { + Global_Variable_Increment(kVariableChinyen, 200); } - Actor_Set_Goal_Number(kActorLucy, 599); + + Actor_Set_Goal_Number(kActorLucy, kGoalLucyDead); } int AIScriptLucy::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) { @@ -240,94 +273,95 @@ int AIScriptLucy::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId } bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { - if (!newGoalNumber) { + if (newGoalNumber == kGoalLucyDefault) { Actor_Put_In_Set(kActorLucy, kSetFreeSlotA); return false; } switch (newGoalNumber) { - case 200: - if (Global_Variable_Query(40) == 3) { - if (Game_Flag_Query(591) && Game_Flag_Query(592) && Player_Query_Current_Scene() != 36) { - Actor_Set_Goal_Number(kActorLucy, 205); + case kGoalLucyMoveAround: + if (Global_Variable_Query(kVariableBehavior) == 3) { + if (Game_Flag_Query(591) + && Game_Flag_Query(592) + && Player_Query_Current_Scene() != kSceneHF03 + ) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyGoToHF03); } else { - if (Random_Query(1, 2) - 1) { - Actor_Set_Goal_Number(kActorLucy, 225); + if (Random_Query(0, 1) == 1) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyGoToFreeSlotGAHJ); } else { - Actor_Set_Goal_Number(kActorLucy, 220); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyGoToFreeSlotGAG); } } } else { - int rnd = Random_Query(1, 4) - 1; - - if (rnd) { - if (rnd == 1) { - Actor_Set_Goal_Number(kActorLucy, 225); - } else if (Player_Query_Current_Scene() == 36) { - Actor_Set_Goal_Number(kActorLucy, 220); - } else { - Actor_Set_Goal_Number(kActorLucy, 205); - } + int rnd = Random_Query(0, 3); + + if (rnd == 0) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyGoToFreeSlotGAG); + } else if (rnd == 1) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyGoToFreeSlotGAHJ); + } else if (Player_Query_Current_Scene() == kSceneHF03) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyGoToFreeSlotGAG); } else { - Actor_Set_Goal_Number(kActorLucy, 220); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyGoToHF03); } } break; - case 205: + case kGoalLucyGoToHF03: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_With_Facing(kActorLucy, 371, 0, 156); AI_Movement_Track_Repeat(kActorLucy); break; - case 210: - Actor_Set_Immunity_To_Obstacles(kActorLucy, 1); + case kGoalLucyRunOutPhase1: + Actor_Set_Immunity_To_Obstacles(kActorLucy, true); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 377, 0); AI_Movement_Track_Repeat(kActorLucy); break; - case 211: - Actor_Set_Immunity_To_Obstacles(kActorLucy, 0); + case kGoalLucyRunOutPhase2: + Actor_Set_Immunity_To_Obstacles(kActorLucy, false); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 372, 0); AI_Movement_Track_Append(kActorLucy, 33, 0); AI_Movement_Track_Repeat(kActorLucy); break; - case 212: - Actor_Set_Immunity_To_Obstacles(kActorLucy, 1); + case kGoalLucyRunToHF041: + Actor_Set_Immunity_To_Obstacles(kActorLucy, true); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 378, 0); AI_Movement_Track_Repeat(kActorLucy); break; - case 213: - Actor_Set_Immunity_To_Obstacles(kActorLucy, 0); + case kGoalLucyRunToHF042: + Actor_Set_Immunity_To_Obstacles(kActorLucy, false); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 373, 0); AI_Movement_Track_Append(kActorLucy, 33, 0); AI_Movement_Track_Repeat(kActorLucy); break; - case 214: + case kGoalLucyRunAwayWithHelp1: Actor_Says(kActorLucy, 320, 16); Actor_Set_Goal_Number(kActorHolloway, 242); - Actor_Set_Immunity_To_Obstacles(6, 1); + Actor_Set_Immunity_To_Obstacles(kActorLucy, true); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append(kActorLucy, 378, 0); AI_Movement_Track_Repeat(kActorLucy); break; - case 215: - Actor_Set_Immunity_To_Obstacles(kActorLucy, 0); + case kGoalLucyRunAwayWithHelp2: + Actor_Set_Immunity_To_Obstacles(kActorLucy, false); AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 373, 0); AI_Movement_Track_Append(kActorLucy, 33, 30); AI_Movement_Track_Repeat(kActorLucy); break; - case 220: + case kGoalLucyGoToFreeSlotGAG: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append(kActorLucy, 39, Random_Query(5, 10)); AI_Movement_Track_Append(kActorLucy, 33, Random_Query(5, 10)); @@ -335,7 +369,7 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorLucy); break; - case 225: + case kGoalLucyGoToFreeSlotGAHJ: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append(kActorLucy, 39, Random_Query(5, 15)); AI_Movement_Track_Append(kActorLucy, 33, Random_Query(10, 30)); @@ -344,26 +378,26 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorLucy); break; - case 230: + case kGoalLucyHF04Start: AI_Movement_Track_Flush(kActorLucy); Actor_Put_In_Set(kActorLucy, kSetHF04); Actor_Set_At_Waypoint(kActorLucy, 518, 0); - Actor_Set_Targetable(kActorLucy, 1); + Actor_Set_Targetable(kActorLucy, true); Actor_Set_Health(kActorLucy, 5, 5); break; - case 232: + case kGoalLucyHF04TalkToMcCoy: Player_Loses_Control(); Actor_Says(kActorMcCoy, 1700, 16); AI_Movement_Track_Flush(kActorLucy); - Actor_Face_Actor(kActorLucy, 0, 1); - Actor_Face_Actor(kActorMcCoy, kActorLucy, 1); + Actor_Face_Actor(kActorLucy, kActorMcCoy, true); + Actor_Face_Actor(kActorMcCoy, kActorLucy, true); Actor_Says(kActorLucy, 350, 13); Actor_Says(kActorMcCoy, 1705, 13); Actor_Says(kActorLucy, 360, 13); Actor_Says(kActorMcCoy, 1710, 13); - if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy) { + if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy) { // how to trigger this? Actor_Says(kActorLucy, 940, 13); Actor_Says(kActorMcCoy, 6780, 12); Actor_Says(kActorLucy, 950, 12); @@ -390,40 +424,42 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Says(kActorLucy, 1050, 12); } Actor_Says(kActorLucy, 370, 14); - Actor_Set_Goal_Number(kActorLucy, 239); - if (Global_Variable_Query(40) == 3) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04WalkAway); + + if (Global_Variable_Query(kVariableBehavior) == 3) { Actor_Set_Goal_Number(kActorSteele, 243); - Game_Flag_Set(593); + Game_Flag_Set(kFlagLucyRanAway); } + Player_Gains_Control(); break; - case 233: + case kGoalLucyHF04Run1: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 519, 0); AI_Movement_Track_Repeat(kActorLucy); Actor_Set_Health(kActorLucy, 5, 5); break; - case 234: + case kGoalLucyHF04Run2: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 520, 0); AI_Movement_Track_Repeat(kActorLucy); break; - case 236: + case kGoalLucyHF04Run3: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 521, 0); AI_Movement_Track_Repeat(kActorLucy); break; - case 238: + case kGoalLucyHF04Run4: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 522, 0); AI_Movement_Track_Repeat(kActorLucy); break; - case 239: + case kGoalLucyHF04WalkAway: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append_Run(kActorLucy, 523, 0); AI_Movement_Track_Append(kActorLucy, 33, 0); @@ -432,17 +468,17 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Set_Health(kActorLucy, 30, 30); break; - case 240: - if (Global_Variable_Query(40) == 3) { - Actor_Set_Goal_Number(kActorLucy, 599); + case 240: // not used anywhere + if (Global_Variable_Query(kVariableBehavior) == 3) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyDead); Actor_Set_Goal_Number(kActorSteele, 240); } else { - Actor_Set_Goal_Number(kActorLucy, 299); - Game_Flag_Set(593); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyGoneChapter3); + Game_Flag_Set(kFlagLucyRanAway); } break; - case 250: + case kGoalLucyReturnToHF03: AI_Movement_Track_Flush(kActorLucy); AI_Movement_Track_Append(kActorLucy, 372, 0); AI_Movement_Track_Append_With_Facing(kActorLucy, 371, 0, 156); @@ -463,7 +499,7 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { break; case 311: - voightKempTest(); + voightKampffTest(); break; case 312: @@ -473,8 +509,8 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorLucy); break; - case 599: - Game_Flag_Set(593); + case kGoalLucyDead: + Game_Flag_Set(kFlagLucyRanAway); break; } @@ -787,27 +823,29 @@ bool AIScriptLucy::ReachedMovementTrackWaypoint(int waypointId) { } void AIScriptLucy::FledCombat() { - if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorLucy) == 450) { + if (Global_Variable_Query(kVariableChapter) == 5 + && 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); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyDead); } return; //true; } -void AIScriptLucy::voightKempTest() { +void AIScriptLucy::voightKampffTest() { Player_Loses_Control(); - Actor_Face_Actor(kActorMcCoy, kActorLucy, 1); + Actor_Face_Actor(kActorMcCoy, kActorLucy, true); Actor_Says(kActorMcCoy, 6815, 11); - Actor_Face_Actor(kActorLucy, kActorMcCoy, 1); + Actor_Face_Actor(kActorLucy, kActorMcCoy, true); Actor_Says(kActorLucy, 1060, 16); Actor_Says(kActorLucy, 1070, 17); Delay(1000); Actor_Says(kActorLucy, 1080, 14); Actor_Says(kActorMcCoy, 6820, 16); Actor_Says(kActorLucy, 1090, 13); - if (!Game_Flag_Query(378)) { + if (!Game_Flag_Query(kFlagDirectorsCut)) { Actor_Says(kActorMcCoy, 6825, 13); } Actor_Says(kActorMcCoy, 6830, 12); @@ -825,7 +863,9 @@ void AIScriptLucy::voightKempTest() { Actor_Says(kActorLucy, 1130, 14); Music_Stop(2); Player_Gains_Control(); - Voight_Kampff_Activate(6, 40); + + Voight_Kampff_Activate(kActorLucy, 40); + Player_Loses_Control(); if (Actor_Clue_Query(kActorMcCoy, 271)) { Actor_Says(kActorMcCoy, 6865, 13); diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp index 4a4489dbe4..ff50d04e06 100644 --- a/engines/bladerunner/script/ai/steele.cpp +++ b/engines/bladerunner/script/ai/steele.cpp @@ -815,7 +815,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Scene_Exits_Enable(); return true; - case 126: + case 126: // not used anywhere return true; case kGoalSteeleLeaveRC03: @@ -943,6 +943,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Set_At_XYZ(kActorSteele, 291.0f, 47.76f, -892.0f, 453); Set_Enter(kSetHF03, kSceneHF03); return true; + case 234: AI_Movement_Track_Flush(kActorSteele); AI_Movement_Track_Append_Run(kActorSteele, 372, 0); @@ -972,17 +973,17 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 241: - Actor_Change_Animation_Mode(kActorSteele, 6); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack); Delay(500); - Actor_Change_Animation_Mode(kActorLucy, 48); - Actor_Set_Targetable(kActorLucy, 0); + Actor_Change_Animation_Mode(kActorLucy, kAnimationModeDie); + Actor_Set_Targetable(kActorLucy, false); Actor_Retired_Here(kActorLucy, 36, 18, 1, -1); Delay(1000); AI_Movement_Track_Flush(kActorSteele); AI_Movement_Track_Append_Run(kActorSteele, 380, 0); AI_Movement_Track_Repeat(kActorSteele); Delay(500); - ADQ_Add(6, 340, 48); + ADQ_Add(kActorLucy, 340, 48); return true; case 242: @@ -990,36 +991,36 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Player_Loses_Control(); Delay(500); Actor_Says(kActorSteele, 0, 14); - Actor_Face_Actor(kActorMcCoy, kActorSteele, 1); + Actor_Face_Actor(kActorMcCoy, kActorSteele, true); Actor_Says(kActorMcCoy, 1540, 16); Actor_Says(kActorSteele, 10, 13); Actor_Says(kActorSteele, 20, 18); Actor_Says(kActorMcCoy, 1545, 13); - Actor_Face_Actor(kActorSteele, kActorMcCoy, 1); + Actor_Face_Actor(kActorSteele, kActorMcCoy, true); Actor_Says(kActorSteele, 30, 18); Actor_Says(kActorSteele, 40, 18); Actor_Says(kActorMcCoy, 1550, 13); - Actor_Face_Actor(kActorSteele, kActorLucy, 1); + Actor_Face_Actor(kActorSteele, kActorLucy, true); Actor_Says(kActorSteele, 50, 12); Actor_Says(kActorMcCoy, 1555, 13); Actor_Says(kActorSteele, 60, 12); - Actor_Face_Actor(kActorSteele, kActorMcCoy, 1); + Actor_Face_Actor(kActorSteele, kActorMcCoy, true); Actor_Says(kActorSteele, 80, 16); Actor_Says(kActorMcCoy, 1560, 13); Delay(500); Game_Flag_Set(617); Player_Gains_Control(); - if (Game_Flag_Query(255)) { + if (Game_Flag_Query(kFlagSpinnerAtNR01)) { Actor_Put_In_Set(kActorSteele, kSetNR01); Actor_Set_At_XYZ(kActorSteele, 12.17f, 23.88f, -533.37f, 674); - Game_Flag_Reset(255); - Game_Flag_Reset(256); + Game_Flag_Reset(kFlagSpinnerAtNR01); + Game_Flag_Reset(kFlagSpinnerAtHF01); Set_Enter(kSetNR01, kSceneNR01); } else { Actor_Put_In_Set(kActorSteele, kSetHF01); Actor_Set_At_XYZ(kActorSteele, 324.32f, 8.0f, -465.87f, 674); - Game_Flag_Reset(255); - Game_Flag_Reset(256); + Game_Flag_Reset(kFlagSpinnerAtNR01); + Game_Flag_Reset(kFlagSpinnerAtHF01); Set_Enter(kSetHF01, kSceneHF04); } return true; diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h index 691a9cf978..ac16b706a3 100644 --- a/engines/bladerunner/script/ai_script.h +++ b/engines/bladerunner/script/ai_script.h @@ -174,7 +174,7 @@ END_SCRIPT DECLARE_SCRIPT(Lucy) bool _flag; - void voightKempTest(); + void voightKampffTest(); void checkCombat(); END_SCRIPT diff --git a/engines/bladerunner/script/init_script.cpp b/engines/bladerunner/script/init_script.cpp index 9244c775e2..9364df886e 100644 --- a/engines/bladerunner/script/init_script.cpp +++ b/engines/bladerunner/script/init_script.cpp @@ -108,19 +108,19 @@ void InitScript::Init_Game_Flags() { } if (Game_Flag_Query(kFlagDektoraIsReplicant)) { - Global_Variable_Set(40, 1); + Global_Variable_Set(kVariableBehavior, 1); } else if ( Game_Flag_Query(kFlagGordoIsReplicant) && !Game_Flag_Query(kFlagLucyIsReplicant) ) { - Global_Variable_Set(40, 2); + Global_Variable_Set(kVariableBehavior, 2); } else if (!Game_Flag_Query(kFlagGordoIsReplicant) && Game_Flag_Query(kFlagLucyIsReplicant) ) { - Global_Variable_Set(40, 3); + Global_Variable_Set(kVariableBehavior, 3); } else if (Random_Query(1, 2) == 1) { - Global_Variable_Set(40, 2); + Global_Variable_Set(kVariableBehavior, 2); } else { - Global_Variable_Set(40, 3); + Global_Variable_Set(kVariableBehavior, 3); } Game_Flag_Set(kFlagMcCoyInRunciters); diff --git a/engines/bladerunner/script/scene/hf02.cpp b/engines/bladerunner/script/scene/hf02.cpp index 936b11fd2f..117851794b 100644 --- a/engines/bladerunner/script/scene/hf02.cpp +++ b/engines/bladerunner/script/scene/hf02.cpp @@ -59,7 +59,7 @@ void SceneScriptHF02::SceneLoaded() { Obstacle_Object("BARD_NEON", true); Unclickable_Object("BARD_NEON"); if (Actor_Query_Goal_Number(kActorSteele) == 234) { - if (Game_Flag_Query(593)) { + if (Game_Flag_Query(kFlagLucyRanAway)) { Actor_Set_Goal_Number(kActorSteele, 243); } else { Actor_Set_Goal_Number(kActorSteele, 240); @@ -132,7 +132,7 @@ void SceneScriptHF02::PlayerWalkedIn() { } if (Actor_Query_Goal_Number(kActorSteele) == 243) { - if (Actor_Query_Goal_Number(kActorLucy) == 599) { + if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyDead) { Actor_Set_Goal_Number(kActorSteele, 244); } else { Actor_Set_Goal_Number(kActorSteele, 245); diff --git a/engines/bladerunner/script/scene/hf03.cpp b/engines/bladerunner/script/scene/hf03.cpp index 591861c715..f54f8baa8c 100644 --- a/engines/bladerunner/script/scene/hf03.cpp +++ b/engines/bladerunner/script/scene/hf03.cpp @@ -78,13 +78,13 @@ void SceneScriptHF03::dialogueWithLucy() { switch (answer) { case 840: // VOIGT-KAMPFF Actor_Says(kActorMcCoy, 1630, 15); - if (Global_Variable_Query(40) == 3) { - Actor_Set_Goal_Number(kActorLucy, 214); + if (Global_Variable_Query(kVariableBehavior) == 3) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunAwayWithHelp1); } else if (Game_Flag_Query(kFlagLucyIsReplicant)) { - Actor_Set_Goal_Number(kActorLucy, 212); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunToHF041); } else { - Actor_Set_Goal_Number(kActorLucy, 210); - Game_Flag_Set(593); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunOutPhase1); + Game_Flag_Set(kFlagLucyRanAway); } break; @@ -96,8 +96,8 @@ void SceneScriptHF03::dialogueWithLucy() { case 860: // CRYSTAL Actor_Says(kActorMcCoy, 1640, 12); - if (Global_Variable_Query(40) == 3) { - Actor_Set_Goal_Number(kActorLucy, 214); + if (Global_Variable_Query(kVariableBehavior) == 3) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunAwayWithHelp1); } else { Actor_Says(kActorLucy, 210, 13); Actor_Says(kActorMcCoy, 1655, 15); @@ -128,10 +128,11 @@ void SceneScriptHF03::dialogueWithLucy() { Actor_Says(kActorMcCoy, 1660, 15); Actor_Says(kActorLucy, 230, 14); Actor_Clue_Acquire(kActorLucy, kClueMcCoyHelpedLucy, true, kActorMcCoy); + if (Game_Flag_Query(kFlagLucyIsReplicant)) { - Actor_Set_Goal_Number(kActorLucy, 212); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunToHF041); } else { - Actor_Set_Goal_Number(kActorLucy, 210); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunOutPhase1); } } break; @@ -160,7 +161,7 @@ void SceneScriptHF03::dialogueWithLucy() { bool SceneScriptHF03::ClickedOnActor(int actorId) { if (actorId == kActorLucy - && Actor_Query_Goal_Number(kActorLucy) == 205 + && Actor_Query_Goal_Number(kActorLucy) == kGoalLucyGoToHF03 ) { if (Game_Flag_Query(kFlagLucyIsReplicant) ? !Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 377, 0, true, false) @@ -248,8 +249,8 @@ void SceneScriptHF03::PlayerWalkedIn() { Game_Flag_Reset(kFlagHF01toHF03); } - if (Actor_Query_Goal_Number(kActorLucy) == 250) { - Actor_Set_Goal_Number(kActorLucy, 212); + if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyReturnToHF03) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunToHF041); Actor_Says(kActorSteele, 210, 13); Actor_Face_Actor(kActorMcCoy, kActorSteele, true); Actor_Says(kActorMcCoy, 1680, 15); diff --git a/engines/bladerunner/script/scene/hf04.cpp b/engines/bladerunner/script/scene/hf04.cpp index 9dde7ac4f3..14cad2f76a 100644 --- a/engines/bladerunner/script/scene/hf04.cpp +++ b/engines/bladerunner/script/scene/hf04.cpp @@ -24,6 +24,13 @@ namespace BladeRunner { +enum kHF04Loops { + kHF04LoopMain = 0, + kHF04LoopDoorsClosing = 2, + kHF04LoopMainDoorsClosed = 3, + kHF04LoopDoorsOpening = 5 +}; + void SceneScriptHF04::InitializeScene() { Setup_Scene_Information(-33.85f, -0.31f, 395.0f, 0); Game_Flag_Reset(kFlagHF03toHF04); @@ -39,15 +46,15 @@ void SceneScriptHF04::InitializeScene() { Ambient_Sounds_Add_Sound(304, 5, 70, 33, 50, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(305, 5, 70, 33, 50, -100, 100, -101, -101, 0, 0); - if (Game_Flag_Query(584)) { - Scene_Loop_Set_Default(3); + if (Game_Flag_Query(kFlagHF04DoorsClosed)) { + Scene_Loop_Set_Default(kHF04LoopMainDoorsClosed); } else { - Scene_Loop_Set_Default(0); + Scene_Loop_Set_Default(kHF04LoopMain); } } void SceneScriptHF04::SceneLoaded() { - if (Game_Flag_Query(584)) { + if (Game_Flag_Query(kFlagHF04DoorsClosed)) { Unobstacle_Object("PIVOT_WALL#1", true); Unobstacle_Object("PIVOT_WALL#02", true); Unobstacle_Object("PIVOT_WALL#03", true); @@ -55,14 +62,15 @@ void SceneScriptHF04::SceneLoaded() { Unobstacle_Object("HIDE_WALL_A", true); Unobstacle_Object("HIDE_WALL_B", true); } - if (Actor_Query_Goal_Number(kActorLucy) == 213) { + + if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyRunToHF042) { if (Actor_Clue_Query(kActorLucy, kClueMcCoyHelpedLucy) - && Global_Variable_Query(40) != 3 + && Global_Variable_Query(kVariableBehavior) != 3 ) { - Game_Flag_Set(593); + Game_Flag_Set(kFlagLucyRanAway); } else { - Actor_Set_Goal_Number(kActorLucy, 230); - Game_Flag_Reset(584); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04Start); + Game_Flag_Reset(kFlagHF04DoorsClosed); } } } @@ -110,28 +118,28 @@ void SceneScriptHF04::SceneFrameAdvanced(int frame) { } if (frame == 179 - && Actor_Query_Goal_Number(kActorLucy) == 235 + && Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04WaitForMcCoy1 ) { - Actor_Set_Goal_Number(kActorLucy, 236); + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04Run3); } - if (Game_Flag_Query(585)) { - Game_Flag_Reset(585); - Scene_Loop_Set_Default(3); - Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true); + if (Game_Flag_Query(kFlagHF04CloseDoors)) { + Game_Flag_Reset(kFlagHF04CloseDoors); + Scene_Loop_Set_Default(kHF04LoopMainDoorsClosed); + Scene_Loop_Start_Special(kSceneLoopModeOnce, kHF04LoopDoorsClosing, true); //return true; return; } - if (Game_Flag_Query(586)) { - Game_Flag_Reset(586); - Scene_Loop_Set_Default(0); - Scene_Loop_Start_Special(kSceneLoopModeOnce, 5, true); + if (Game_Flag_Query(kFlagHF04OpenDoors)) { + Game_Flag_Reset(kFlagHF04OpenDoors); + Scene_Loop_Set_Default(kHF04LoopMain); + Scene_Loop_Start_Special(kSceneLoopModeOnce, kHF04LoopDoorsOpening, true); return; // true; } if (frame == 89) { - Game_Flag_Set(584); + Game_Flag_Set(kFlagHF04DoorsClosed); Obstacle_Object("HIDE_WALL_A", false); Obstacle_Object("HIDE_WALL_B", false); Unobstacle_Object("PIVOT_WALL#1", false); @@ -146,9 +154,9 @@ void SceneScriptHF04::SceneFrameAdvanced(int frame) { Obstacle_Object("PIVOT_WALL#1", false); Obstacle_Object("PIVOT_WALL#02", false); Obstacle_Object("PIVOT_WALL#03", true); - Game_Flag_Reset(584); - if (Actor_Query_Goal_Number(kActorLucy) == 234) { - Actor_Set_Goal_Number(kActorLucy, 235); + Game_Flag_Reset(kFlagHF04DoorsClosed); + if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04Run2) { + Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04WaitForMcCoy1); } return; // true; } @@ -159,8 +167,8 @@ void SceneScriptHF04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptHF04::PlayerWalkedIn() { - if (Actor_Query_Goal_Number(kActorLucy) == 230 - || Actor_Query_Goal_Number(kActorLucy) == 233 + if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04Start + || Actor_Query_Goal_Number(kActorLucy) == kGoalLucyHF04Run1 ) { Player_Set_Combat_Mode(true); Music_Play(1, 60, 0, 2, -1, 0, 0); diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp index 31486c1c25..5bc76d948d 100644 --- a/engines/bladerunner/script/scene/nr01.cpp +++ b/engines/bladerunner/script/scene/nr01.cpp @@ -331,7 +331,7 @@ void SceneScriptNR01::PlayerWalkedIn() { Actor_Says(kActorSteele, 1440, 13); Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 48, false, true); Actor_Says(kActorMcCoy, 3145, 13); - if (Global_Variable_Query(40) != 3) { + if (Global_Variable_Query(kVariableBehavior) != 3) { Actor_Says(kActorSteele, 1450, 12); Actor_Says(kActorSteele, 1460, 13); } @@ -360,14 +360,14 @@ void SceneScriptNR01::PlayerWalkedIn() { Actor_Says(kActorSteele, 1430, 12); Actor_Set_Goal_Number(kActorSteele, 285); } else { - int v0 = Global_Variable_Query(40) - 1; - if (!v0) { + int v0 = Global_Variable_Query(kVariableBehavior); + if (v0 == 1) { Actor_Says(kActorSteele, 1510, 15); Actor_Says(kActorSteele, 1520, 14); Actor_Says(kActorSteele, 1530, 13); Actor_Says(kActorMcCoy, 3170, 13); Actor_Set_Goal_Number(kActorSteele, 231); - } else if (v0 == 1) { + } else if (v0 == 2) { Actor_Says(kActorSteele, 1590, 15); Actor_Says(kActorMcCoy, 3195, 14); Actor_Says(kActorSteele, 1600, 16); @@ -377,7 +377,7 @@ void SceneScriptNR01::PlayerWalkedIn() { Actor_Says(kActorSteele, 1630, 14); Actor_Says(kActorMcCoy, 3205, 12); Actor_Set_Goal_Number(kActorSteele, 232); - } else if (v0 == 2) { + } else if (v0 == 3) { Actor_Says(kActorSteele, 1540, 15); Actor_Says(kActorMcCoy, 3175, 13); Actor_Says(kActorSteele, 1550, 13); diff --git a/engines/bladerunner/script/scene/nr11.cpp b/engines/bladerunner/script/scene/nr11.cpp index f97cc4c8f0..cf8143ef26 100644 --- a/engines/bladerunner/script/scene/nr11.cpp +++ b/engines/bladerunner/script/scene/nr11.cpp @@ -180,7 +180,7 @@ bool SceneScriptNR11::ClickedOn3DObject(const char *objectName, bool combatMode) Actor_Says(kActorDektora, 1090, 17); Music_Stop(4); Actor_Set_Goal_Number(kActorDektora, 260); - if (Global_Variable_Query(40) == 1) { + if (Global_Variable_Query(kVariableBehavior) == 1) { Actor_Set_Goal_Number(kActorSteele, 236); } Game_Flag_Set(591); |