aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/scene
diff options
context:
space:
mode:
authorThanasis Antoniou2019-05-19 14:33:12 +0300
committerThanasis Antoniou2019-05-19 14:34:01 +0300
commitea3a9f211da74ffd3aa35328147566160a73d680 (patch)
tree0dd73d3e45466cb420c3e8ace2e9ecbc9e76fa8e /engines/bladerunner/script/scene
parent10ac612b9019aa299f3182180745ba6d215e93e5 (diff)
downloadscummvm-rg350-ea3a9f211da74ffd3aa35328147566160a73d680.tar.gz
scummvm-rg350-ea3a9f211da74ffd3aa35328147566160a73d680.tar.bz2
scummvm-rg350-ea3a9f211da74ffd3aa35328147566160a73d680.zip
BLADERUNNER: Cleanup of police AI and fix for rat ai
Diffstat (limited to 'engines/bladerunner/script/scene')
-rw-r--r--engines/bladerunner/script/scene/ct12.cpp8
-rw-r--r--engines/bladerunner/script/scene/dr04.cpp18
-rw-r--r--engines/bladerunner/script/scene/hf05.cpp6
-rw-r--r--engines/bladerunner/script/scene/hf06.cpp4
-rw-r--r--engines/bladerunner/script/scene/ma04.cpp4
-rw-r--r--engines/bladerunner/script/scene/tb03.cpp2
-rw-r--r--engines/bladerunner/script/scene/ug05.cpp2
-rw-r--r--engines/bladerunner/script/scene/ug07.cpp12
8 files changed, 28 insertions, 28 deletions
diff --git a/engines/bladerunner/script/scene/ct12.cpp b/engines/bladerunner/script/scene/ct12.cpp
index 27995a8645..7c69762061 100644
--- a/engines/bladerunner/script/scene/ct12.cpp
+++ b/engines/bladerunner/script/scene/ct12.cpp
@@ -145,7 +145,7 @@ bool SceneScriptCT12::ClickedOnActor(int actorId) {
) {
Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true);
- Actor_Says(kActorMcCoy, 710, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 710, kAnimationModeTalk); // Hold it! I'm not a Replicant, I got proof!
Actor_Says(kActorOfficerGrayford, 20, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 715, kAnimationModeTalk);
Actor_Says(kActorOfficerGrayford, 30, kAnimationModeTalk);
@@ -156,9 +156,9 @@ bool SceneScriptCT12::ClickedOnActor(int actorId) {
Actor_Says(kActorMcCoy, 725, kAnimationModeTalk);
Actor_Says(kActorOfficerGrayford, 70, kAnimationModeTalk);
Actor_Says(kActorOfficerGrayford, 80, kAnimationModeTalk);
- Actor_Says(kActorOfficerGrayford, 90, kAnimationModeTalk);
- Actor_Says(kActorOfficerGrayford, 100, kAnimationModeTalk);
- Actor_Says(kActorOfficerGrayford, 110, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 90, kAnimationModeTalk); // if you are lying...
+ Actor_Says(kActorOfficerGrayford, 100, kAnimationModeTalk); // you gonna wish...
+ Actor_Says(kActorOfficerGrayford, 110, kAnimationModeTalk); // Take him in!
Game_Flag_Set(kFlagUnpauseGenWalkers);
Game_Flag_Set(kFlagMcCoyFreedOfAccusations);
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyStartChapter5);
diff --git a/engines/bladerunner/script/scene/dr04.cpp b/engines/bladerunner/script/scene/dr04.cpp
index a832ea08f8..2c6c632fb6 100644
--- a/engines/bladerunner/script/scene/dr04.cpp
+++ b/engines/bladerunner/script/scene/dr04.cpp
@@ -120,7 +120,7 @@ bool SceneScriptDR04::ClickedOnActor(int actorId) {
Actor_Says(kActorMoraji, 50, kAnimationModeTalk);
Actor_Clue_Acquire(kActorMcCoy, kClueMorajiInterview, true, kActorMoraji);
Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiDie);
- Actor_Set_Goal_Number(kActorOfficerGrayford, 101); // Grayford arrives at scene of Moraji corpse
+ Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordArrivesToDR04); // Grayford arrives at scene of Moraji corpse
return true;
}
}
@@ -128,16 +128,16 @@ bool SceneScriptDR04::ClickedOnActor(int actorId) {
if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiDead) {
if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorMoraji, 36, true, false)) {
#if BLADERUNNER_ORIGINAL_BUGS
- Actor_Set_Goal_Number(kActorOfficerGrayford, 106);
+ Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopPatrolToTalkToMcCoyAtDR04);
#else
// bugfix: original code would result in this conversation repeating multiple times if:
- // Officer Grayford is at 103 goal (asking "What do you know about this?"...
+ // Officer Grayford is at 103 (kGoalOfficerGrayfordTalkToMcCoyAndReportAtDR04) goal (asking "What do you know about this?"...
// and the player skips the conversation fast.
- // So ask about a sheet (goal 106) for Moraji only when Grayford starts patrolling (104, 105 goals)
- if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 104
- || Actor_Query_Goal_Number(kActorOfficerGrayford) == 105
+ // So ask about a sheet (goal 106 (kGoalOfficerGrayfordStopPatrolToTalkToMcCoyAtDR04)) for Moraji only when Grayford starts patrolling (104, 105 goals)
+ if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordPatrolsAtDR04a
+ || Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordPatrolsAtDR04b
) {
- Actor_Set_Goal_Number(kActorOfficerGrayford, 106); // This goal reverts to the previous one after finishing up
+ Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopPatrolToTalkToMcCoyAtDR04); // This goal reverts to the previous goal after finishing up
}
#endif // BLADERUNNER_ORIGINAL_BUGS
return true;
@@ -155,7 +155,7 @@ bool SceneScriptDR04::ClickedOnExit(int exitId) {
if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiLayDown) {
Actor_Force_Stop_Walking(kActorMcCoy);
Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiDie);
- Actor_Set_Goal_Number(kActorOfficerGrayford, 101);
+ Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordArrivesToDR04);
return true;
}
@@ -248,7 +248,7 @@ void SceneScriptDR04::SceneFrameAdvanced(int frame) {
&& Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiLayDown
&& Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiPerished
) {
- Actor_Set_Goal_Number(kActorOfficerGrayford, 101);
+ Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordArrivesToDR04);
}
Scene_Exits_Enable();
break;
diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp
index a724a5bbf1..49e37b2088 100644
--- a/engines/bladerunner/script/scene/hf05.cpp
+++ b/engines/bladerunner/script/scene/hf05.cpp
@@ -97,7 +97,7 @@ bool SceneScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) {
}
Player_Loses_Control();
- Actor_Set_Goal_Number(kActorOfficerLeary, 425);
+ Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyPoliceWait60SecondsToAttackHF05);
Game_Flag_Set(kFlagHF05Hole);
Game_Flag_Set(kFlagHF07Hole);
Obstacle_Object("OBSTACLE_HOLE", true);
@@ -285,7 +285,7 @@ void SceneScriptHF05::SceneFrameAdvanced(int frame) {
void SceneScriptHF05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
if (actorId == kActorOfficerLeary
- && newGoal == 430
+ && newGoal == kGoalOfficerLearyPoliceAboutToAttackHF05
) {
Game_Flag_Set(kFlagHF05PoliceAttacked);
policeAttack();
@@ -325,7 +325,7 @@ void SceneScriptHF05::PlayerWalkedIn() {
Music_Play(kMusicBatl226M, 40, 0, 2, -1, 0, 0);
Actor_Says(kActorOfficerGrayford, 200, kAnimationModeTalk);
Actor_Says(kActorOfficerGrayford, 210, kAnimationModeTalk);
- Actor_Set_Goal_Number(kActorOfficerLeary, 420);
+ Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyPoliceWait120SecondsToAttackHF05);
if (getCompanionActor() == kActorDektora) {
talkWithDektora();
} else if (getCompanionActor() == kActorLucy) {
diff --git a/engines/bladerunner/script/scene/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp
index 7afb3d8821..9a62e39cda 100644
--- a/engines/bladerunner/script/scene/hf06.cpp
+++ b/engines/bladerunner/script/scene/hf06.cpp
@@ -160,8 +160,8 @@ void SceneScriptHF06::SceneFrameAdvanced(int frame) {
void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
if (actorId == kActorSteele
- && oldGoal != 599
- && newGoal == 599
+ && oldGoal != kGoalSteeleGone
+ && newGoal == kGoalSteeleGone
) {
Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 24, false, false);
Actor_Says(kActorSteele, 250, -1);
diff --git a/engines/bladerunner/script/scene/ma04.cpp b/engines/bladerunner/script/scene/ma04.cpp
index b196972457..7af22753c1 100644
--- a/engines/bladerunner/script/scene/ma04.cpp
+++ b/engines/bladerunner/script/scene/ma04.cpp
@@ -294,9 +294,9 @@ void SceneScriptMA04::PlayerWalkedIn() {
Game_Flag_Set(kFlagRC01ChromeDebrisTaken);
Item_Remove_From_World(kItemChromeDebris);
}
- Actor_Set_Goal_Number(kActorOfficerLeary, 99);
+ Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyEndOfAct1);
Actor_Put_In_Set(kActorOfficerLeary, kSetFreeSlotC);
- Actor_Set_At_Waypoint(kActorOfficerLeary, 35, 0);
+ Actor_Set_At_Waypoint(kActorOfficerLeary, 35, 0); // kSetFreeSlotC
Autosave_Game(0);
}
//return false;
diff --git a/engines/bladerunner/script/scene/tb03.cpp b/engines/bladerunner/script/scene/tb03.cpp
index dfb40614f9..cb1964395f 100644
--- a/engines/bladerunner/script/scene/tb03.cpp
+++ b/engines/bladerunner/script/scene/tb03.cpp
@@ -64,7 +64,7 @@ void SceneScriptTB03::InitializeScene() {
int goal = Actor_Query_Goal_Number(kActorTyrellGuard);
if (goal == kGoalTyrellGuardWait) {
Actor_Change_Animation_Mode(kActorTyrellGuard, kAnimationModeIdle);
- Actor_Set_Goal_Number(kActorOfficerGrayford, 399);
+ Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordArrestMcCoyInTB03Act4);
} else if (goal != kGoalTyrellGuardWakeUp) {
Actor_Set_Goal_Number(kActorTyrellGuard, kGoalTyrellGuardSleeping);
}
diff --git a/engines/bladerunner/script/scene/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp
index d58271715e..19bfb001e3 100644
--- a/engines/bladerunner/script/scene/ug05.cpp
+++ b/engines/bladerunner/script/scene/ug05.cpp
@@ -192,7 +192,7 @@ void SceneScriptUG05::PlayerWalkedIn() {
Actor_Put_In_Set(kActorOfficerGrayford, kSetUG05);
Actor_Set_At_XYZ(kActorOfficerGrayford, 4.22f, -1.37f, -925.0f, 750);
- Actor_Set_Goal_Number(kActorOfficerGrayford, 599);
+ Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordDead);
Actor_Retired_Here(kActorOfficerGrayford, 70, 36, true, -1);
int affectionTowardsActor = getAffectionTowardsActor();
diff --git a/engines/bladerunner/script/scene/ug07.cpp b/engines/bladerunner/script/scene/ug07.cpp
index d210400631..e504413e76 100644
--- a/engines/bladerunner/script/scene/ug07.cpp
+++ b/engines/bladerunner/script/scene/ug07.cpp
@@ -178,8 +178,8 @@ void SceneScriptUG07::PlayerWalkedIn() {
if ( Global_Variable_Query(kVariableChapter) == 4
&& !Game_Flag_Query(kFlagUG07Empty)
) {
- Actor_Set_Goal_Number(kActorOfficerLeary, 307);
- Actor_Set_Goal_Number(kActorOfficerGrayford, 307);
+ Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyBlockingUG07);
+ Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordBlockingUG07);
}
if (Game_Flag_Query(kFlagUG08toUG07)) {
@@ -190,14 +190,14 @@ void SceneScriptUG07::PlayerWalkedIn() {
void SceneScriptUG07::PlayerWalkedOut() {
if (Global_Variable_Query(kVariableChapter) == 4
- && (Actor_Query_Goal_Number(kActorOfficerLeary) == 307
- || Actor_Query_Goal_Number(kActorOfficerGrayford) == 307
+ && (Actor_Query_Goal_Number(kActorOfficerLeary) == kGoalOfficerLearyBlockingUG07
+ || Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordBlockingUG07
)
) {
Non_Player_Actor_Combat_Mode_Off(kActorOfficerLeary);
Non_Player_Actor_Combat_Mode_Off(kActorOfficerGrayford);
- Actor_Set_Goal_Number(kActorOfficerLeary, 306);
- Actor_Set_Goal_Number(kActorOfficerGrayford, 306);
+ Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyPrepareToHuntAroundAct4);
+ Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPrepareToHuntAroundAct4);
}
if (Actor_Query_In_Set(kActorClovis, kSetUG07)) {