diff options
author | Peter Kohaut | 2019-02-03 20:35:28 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-02-05 21:54:50 +0100 |
commit | 92774be0aed37273be7579a1cdd81d8ccf9a112c (patch) | |
tree | 6c4462a0be3ccbe8fcbe13a66942a5bbea35f41a /engines | |
parent | 6222fa443de8557e5af05e4dffbf53df9e54d8eb (diff) | |
download | scummvm-rg350-92774be0aed37273be7579a1cdd81d8ccf9a112c.tar.gz scummvm-rg350-92774be0aed37273be7579a1cdd81d8ccf9a112c.tar.bz2 scummvm-rg350-92774be0aed37273be7579a1cdd81d8ccf9a112c.zip |
BLADERUNNER: Cleanup Steele scripts for ending
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bladerunner/game_constants.h | 11 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/clovis.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/maggie.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/steele.cpp | 33 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/kp03.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/kp05.cpp | 5 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/kp06.cpp | 51 |
7 files changed, 62 insertions, 50 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index 2f872f61d0..0d8d46df95 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -1813,9 +1813,14 @@ enum GoalSteele { kGoalSteeleImmediatelyStartChapter4 = 285, kGoalSteeleNR01StartChapter4 = 290, kGoalSteeleHF01StartChapter4 = 291, + // chapter 4 + kGoalSteeleStartChapter4 = 300, // chapter 5 + kGoalSteeleStartChapter5 = 400, // kGoalSteeleKP03WillShootMcCoy = 410, kGoalSteeleKP03Walk = 411, + kGoalSteeleKP03StopWalking = 412, + kGoalSteeleKP03Leave = 413, kGoalSteeleKP03Exploded = 415, kGoalSteeleKP03Dying = 416, kGoalSteeleKP03ShootMcCoy = 418, @@ -1824,7 +1829,11 @@ enum GoalSteele { kGoalSteeleKP01TalkToMcCoy = 421, kGoalSteeleKP01Leave = 422, kGoalSteeleKP01Left = 423, - + kGoalSteeleKP05Enter = 430, + kGoalSteeleKP05Leave = 431, + kGoalSteeleKP06Enter = 432, + kGoalSteeleKP06Leave = 433, + kGoalSteeleWaitingForEnd = 499, kGoalSteeleGone = 599 }; diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp index 26d545e5f1..1ab80abc07 100644 --- a/engines/bladerunner/script/ai/clovis.cpp +++ b/engines/bladerunner/script/ai/clovis.cpp @@ -149,7 +149,9 @@ void AIScriptClovis::OtherAgentExitedThisScene(int otherActorId) { } void AIScriptClovis::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) { - if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants) && Actor_Query_In_Set(kActorMcCoy, kSetKP07)) { + if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants) + && Actor_Query_In_Set(kActorMcCoy, kSetKP07) + ) { Game_Flag_Set(697); Game_Flag_Set(714); // return true; diff --git a/engines/bladerunner/script/ai/maggie.cpp b/engines/bladerunner/script/ai/maggie.cpp index 4feb740059..2667918a36 100644 --- a/engines/bladerunner/script/ai/maggie.cpp +++ b/engines/bladerunner/script/ai/maggie.cpp @@ -327,7 +327,7 @@ bool AIScriptMaggie::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Says(kActorMcCoy, 2235, 12); if (Actor_Query_Is_In_Current_Set(kActorSteele)) { Actor_Says(kActorSteele, 1530, 58); - Actor_Set_Goal_Number(kActorSteele, 431); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP05Leave); } Delay(2000); Actor_Says(kActorMcCoy, 2390, 13); diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp index 2b2e1f223c..94351950ca 100644 --- a/engines/bladerunner/script/ai/steele.cpp +++ b/engines/bladerunner/script/ai/steele.cpp @@ -158,17 +158,17 @@ bool AIScriptSteele::Update() { break; case 4: - if (Actor_Query_Goal_Number(kActorSteele) < 300) { - Actor_Set_Goal_Number(kActorSteele, 300); + if (Actor_Query_Goal_Number(kActorSteele) < kGoalSteeleStartChapter4) { + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleStartChapter4); } break; case 5: if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants) - && Actor_Query_Goal_Number(kActorSteele) < 400 + && Actor_Query_Goal_Number(kActorSteele) < kGoalSteeleStartChapter5 ) { - Actor_Set_Goal_Number(kActorSteele, 400); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleStartChapter5); return true; } @@ -313,7 +313,7 @@ void AIScriptSteele::CompletedMovementTrack() { Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP01Left); break; - case 432: + case kGoalSteeleKP06Enter: Player_Set_Combat_Mode(kActorMcCoy); Actor_Face_Actor(kActorMcCoy, kActorSteele, true); Actor_Says(kActorMcCoy, 2265, 11); @@ -324,7 +324,7 @@ void AIScriptSteele::CompletedMovementTrack() { Actor_Says(kActorMcCoy, 2280, 15); Actor_Says(kActorSteele, 660, 60); Actor_Says(kActorSteele, 670, 59); - Actor_Set_Goal_Number(kActorSteele, 433); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP06Leave); Player_Set_Combat_Mode(kActorSteele); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -731.0f, 8.26f, -657.0f, 0, false, false, 0); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); @@ -332,9 +332,6 @@ void AIScriptSteele::CompletedMovementTrack() { Game_Flag_Set(kFlagKP06toKP07); Set_Enter(kSetKP07, kSceneKP07); break; - - default: - break; } return; //true; } @@ -1297,7 +1294,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Chapter_Enter(4, kSetUG06, kSceneUG06); return true; - case 300: + case kGoalSteeleStartChapter4: if (Query_Score(kActorMcCoy) > Query_Score(kActorSteele) && Query_Score(kActorMcCoy) < 75) { Set_Score(kActorSteele, Random_Query(2, 5) + Query_Score(kActorMcCoy)); } @@ -1312,7 +1309,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Set_At_Waypoint(kActorSteele, 35, 0); return true; - case 400: + case kGoalSteeleStartChapter5: case 401: case kGoalSteeleKP01Left: return true; @@ -1335,11 +1332,11 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, false); return true; - case 412: + case kGoalSteeleKP03StopWalking: Actor_Force_Stop_Walking(kActorSteele); return true; - case 413: + case kGoalSteeleKP03Leave: Async_Actor_Walk_To_XYZ(kActorSteele, 1.0, -36.55f, 111.0f, 0, false); return true; @@ -1410,26 +1407,26 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorSteele); return true; - case 430: + case kGoalSteeleKP05Enter: Actor_Put_In_Set(kActorSteele, kSetKP05_KP06); Actor_Set_At_XYZ(kActorSteele, -1110.0f, 0.0f, 952.0f, 155); - Actor_Change_Animation_Mode(kActorSteele, 4); + Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle); return true; - case 431: + case kGoalSteeleKP05Leave: AI_Movement_Track_Flush(kActorSteele); AI_Movement_Track_Append_Run(kActorSteele, 541, 0); AI_Movement_Track_Repeat(kActorSteele); return true; - case 432: + case kGoalSteeleKP06Enter: Actor_Set_At_Waypoint(kActorSteele, 542, 0); AI_Movement_Track_Flush(kActorSteele); AI_Movement_Track_Append_Run(kActorSteele, 543, 0); AI_Movement_Track_Repeat(kActorSteele); return true; - case 433: + case kGoalSteeleKP06Leave: AI_Movement_Track_Flush(kActorSteele); AI_Movement_Track_Append_Run(kActorSteele, 542, 0); AI_Movement_Track_Repeat(kActorSteele); diff --git a/engines/bladerunner/script/scene/kp03.cpp b/engines/bladerunner/script/scene/kp03.cpp index fe2746cda0..9f223237bb 100644 --- a/engines/bladerunner/script/scene/kp03.cpp +++ b/engines/bladerunner/script/scene/kp03.cpp @@ -291,7 +291,7 @@ void SceneScriptKP03::DialogueQueueFlushed(int a1) { void SceneScriptKP03::saveSteele() { Player_Loses_Control(); Actor_Says(kActorMcCoy, 2180, 14); - Actor_Set_Goal_Number(kActorSteele, 412); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP03StopWalking); Actor_Says(kActorSteele, 480, 60); Actor_Face_Object(kActorMcCoy, "BRACK MID", true); Actor_Says(kActorMcCoy, 2185, 14); @@ -306,11 +306,11 @@ void SceneScriptKP03::saveSteele() { Game_Flag_Reset(kFlagKP03BombActive); Scene_Loop_Set_Default(kKP03MainLoopBombNoWire); Scene_Loop_Start_Special(kSceneLoopModeOnce, kKP03MainLoopBombNoWire, false); - Actor_Set_Goal_Number(kActorSteele, 413); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP03Leave); Actor_Says(kActorMcCoy, 2195, 14); Ambient_Sounds_Play_Sound(151, 40, -60, -60, 0); Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1.0f, -36.55f, 111.0f, 0, false, false, 0); - Actor_Set_Goal_Number(kActorSteele, 430); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP05Enter); Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Game_Flag_Reset(kFlagKP01toKP03); diff --git a/engines/bladerunner/script/scene/kp05.cpp b/engines/bladerunner/script/scene/kp05.cpp index ff3bb0843b..2a30cd47b2 100644 --- a/engines/bladerunner/script/scene/kp05.cpp +++ b/engines/bladerunner/script/scene/kp05.cpp @@ -55,7 +55,10 @@ void SceneScriptKP05::SceneLoaded() { Unobstacle_Object("OBSTACLEBOX20", true); Clickable_Object("BRIDGE02"); Unclickable_Object("BRIDGE02"); - if (!Actor_Clue_Query(kActorMcCoy, kCluePowerSource) && Game_Flag_Query(kFlagMcCoyIsHelpingReplicants)) { + + if (!Actor_Clue_Query(kActorMcCoy, kCluePowerSource) + && Game_Flag_Query(kFlagMcCoyIsHelpingReplicants) + ) { Item_Add_To_World(118, 960, 9, -1095.0f, 0.0f, 770.0f, 256, 24, 24, false, true, false, true); } } diff --git a/engines/bladerunner/script/scene/kp06.cpp b/engines/bladerunner/script/scene/kp06.cpp index ab1dbed84f..5087e33e44 100644 --- a/engines/bladerunner/script/scene/kp06.cpp +++ b/engines/bladerunner/script/scene/kp06.cpp @@ -75,12 +75,14 @@ bool SceneScriptKP06::ClickedOn3DObject(const char *objectName, bool a2) { } bool SceneScriptKP06::ClickedOnActor(int actorId) { - if (actorId == kActorSadik && !Game_Flag_Query(714)) { + if ( actorId == kActorSadik + && !Game_Flag_Query(714) + ) { if (Actor_Clue_Query(kActorSadik, kCluePowerSource)) { Actor_Face_Actor(kActorMcCoy, kActorSadik, true); Actor_Says(kActorMcCoy, 8610, 15); Actor_Says(kActorSadik, 290, kAnimationModeTalk); - } else if (Actor_Clue_Query(kActorMcCoy, kCluePowerSource) ) { + } else if (Actor_Clue_Query(kActorMcCoy, kCluePowerSource)) { Actor_Says(kActorSadik, 280, kAnimationModeTalk); Actor_Says(kActorSadik, 290, kAnimationModeTalk); Actor_Clue_Acquire(kActorSadik, kCluePowerSource, true, kActorMcCoy); @@ -110,14 +112,16 @@ bool SceneScriptKP06::ClickedOnExit(int exitId) { } if (exitId == 1) { - if (Actor_Clue_Query(kActorSadik, kCluePowerSource) || Actor_Query_Goal_Number(kActorSadik) != 416) { + if (Actor_Clue_Query(kActorSadik, kCluePowerSource) + || Actor_Query_Goal_Number(kActorSadik) != 416 + ) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -731.0f, 8.26f, -657.0f, 0, 1, false, 0)) { if (Game_Flag_Query(kFlagMcCoyIsHelpingReplicants)) { if (!Game_Flag_Query(714)) { Player_Set_Combat_Mode(false); } - } else if (Actor_Query_Goal_Number(kActorSteele) == 433) { - Actor_Set_Goal_Number(kActorSteele, 499); + } else if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleKP06Leave) { + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleWaitingForEnd); } else { Actor_Set_Goal_Number(kActorGaff, kGoalGaffGone); } @@ -156,11 +160,12 @@ void SceneScriptKP06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptKP06::PlayerWalkedIn() { if (!Game_Flag_Query(kFlagMcCoyIsHelpingReplicants) - && Game_Flag_Query(kFlagKP07toKP06) + && Game_Flag_Query(kFlagKP07toKP06) ) { Game_Flag_Reset(kFlagKP07toKP06); - if (Actor_Query_Goal_Number(kActorSteele) == 499) { + // Ending - leave with Steele + if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleWaitingForEnd) { Actor_Face_Actor(kActorSteele, kActorMcCoy, true); Actor_Says(kActorSteele, 2530, 13); Actor_Face_Actor(kActorMcCoy, kActorSteele, true); @@ -184,9 +189,7 @@ void SceneScriptKP06::PlayerWalkedIn() { Ambient_Sounds_Remove_All_Looping_Sounds(1); Outtake_Play(kOuttakeEnd6, false, -1); Game_Over(); - //return true; - return; - } else { + } else { // Ending - talk with Gaff and leaving alone Actor_Set_Goal_Number(kActorGaff, kGoalGaffGone); Actor_Face_Actor(kActorGaff, kActorMcCoy, true); Actor_Says(kActorGaff, 220, 13); @@ -215,28 +218,26 @@ void SceneScriptKP06::PlayerWalkedIn() { Delay(3000); Outtake_Play(kOuttakeEnd7, false, -1); Game_Over(); - //return true; - return; - } - } else { - if (Actor_Query_Goal_Number(kActorSadik) == 414) { - Loop_Actor_Walk_To_XYZ(kActorMcCoy, -809.0f, 8.26f, -619.0f, 0, 0, false, 0); - Actor_Face_Actor(kActorMcCoy, kActorSadik, true); - Actor_Set_Goal_Number(kActorSadik, 415); } - if (Actor_Query_Goal_Number(kActorSteele) == 431) { - Actor_Set_Goal_Number(kActorSteele, 432); - } - //return false; - return; + return; // true; + } + + if (Actor_Query_Goal_Number(kActorSadik) == 414) { + Loop_Actor_Walk_To_XYZ(kActorMcCoy, -809.0f, 8.26f, -619.0f, 0, 0, false, 0); + Actor_Face_Actor(kActorMcCoy, kActorSadik, true); + Actor_Set_Goal_Number(kActorSadik, 415); + } + + if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleKP05Leave) { + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP06Enter); } } void SceneScriptKP06::PlayerWalkedOut() { if (Game_Flag_Query(kFlagKP06toKP07) - && Actor_Query_Goal_Number(kActorSteele) == 433 + && Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleKP06Leave ) { - Actor_Set_Goal_Number(kActorSteele, 499); + Actor_Set_Goal_Number(kActorSteele, kGoalSteeleWaitingForEnd); } } |