aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kohaut2019-01-28 19:28:46 +0100
committerPeter Kohaut2019-01-28 20:45:48 +0100
commit578d98ee1265eacfe79a4154225e8120b564ae0e (patch)
tree0afcb590c95f46c32961f7922bae1f2de470c015
parent77adb67664cc4aa4c348709504d68e21a8c9791e (diff)
downloadscummvm-rg350-578d98ee1265eacfe79a4154225e8120b564ae0e.tar.gz
scummvm-rg350-578d98ee1265eacfe79a4154225e8120b564ae0e.tar.bz2
scummvm-rg350-578d98ee1265eacfe79a4154225e8120b564ae0e.zip
BLADERUNNER: Cleanup of scripts for Gordo chase
-rw-r--r--engines/bladerunner/game_constants.h87
-rw-r--r--engines/bladerunner/script/ai/bullet_bob.cpp3
-rw-r--r--engines/bladerunner/script/ai/clovis.cpp6
-rw-r--r--engines/bladerunner/script/ai/early_q.cpp2
-rw-r--r--engines/bladerunner/script/ai/gordo.cpp269
-rw-r--r--engines/bladerunner/script/ai/holloway.cpp6
-rw-r--r--engines/bladerunner/script/ai/lucy.cpp14
-rw-r--r--engines/bladerunner/script/ai/mccoy.cpp6
-rw-r--r--engines/bladerunner/script/ai/steele.cpp285
-rw-r--r--engines/bladerunner/script/ai/zuben.cpp4
-rw-r--r--engines/bladerunner/script/ai_script.h2
-rw-r--r--engines/bladerunner/script/init_script.cpp10
-rw-r--r--engines/bladerunner/script/scene/ct05.cpp4
-rw-r--r--engines/bladerunner/script/scene/hf01.cpp4
-rw-r--r--engines/bladerunner/script/scene/hf03.cpp4
-rw-r--r--engines/bladerunner/script/scene/hf04.cpp2
-rw-r--r--engines/bladerunner/script/scene/hf05.cpp6
-rw-r--r--engines/bladerunner/script/scene/hf06.cpp8
-rw-r--r--engines/bladerunner/script/scene/hf07.cpp2
-rw-r--r--engines/bladerunner/script/scene/kp07.cpp21
-rw-r--r--engines/bladerunner/script/scene/nr01.cpp192
-rw-r--r--engines/bladerunner/script/scene/nr02.cpp65
-rw-r--r--engines/bladerunner/script/scene/nr08.cpp4
-rw-r--r--engines/bladerunner/script/scene/nr11.cpp2
-rw-r--r--engines/bladerunner/script/scene/rc03.cpp10
-rw-r--r--engines/bladerunner/script/scene/ug05.cpp2
26 files changed, 593 insertions, 427 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index d447b126c6..b26d5d5895 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -910,7 +910,6 @@ enum Flags {
kFlagNR02toNR01 = 533,
kFlagNR03toNR01 = 534,
kFlagNR01toNR03 = 535,
-
kFlagCT09Entered = 538,
kFlagCT09LeonInterrupted = 539,
kFlagCT09DeskClerkTalk = 540,
@@ -920,6 +919,7 @@ enum Flags {
kFlagDR06MannequinHeadOpen = 548,
kFlagMcCoyTiedDown = 550,
kFlagDR01toCT11 = 558,
+ kFlagNR02GordoLeaveLighter = 561,
kFlagHF05CrazyLegsTalk1 = 562,
kFlagHF05CrazyLegsTalk2 = 563,
kFlagHF03toHF04 = 566, // is never checked
@@ -927,15 +927,20 @@ enum Flags {
kFlagHF04DoorsClosed = 584,
kFlagHF04CloseDoors = 585,
kFlagHF04OpenDoors = 586,
+ kFlagGordoRanWay = 592,
kFlagLucyRanAway = 593,
+ kFlagNR02GordoJumpDown = 594,
kFlagKIAPrivacyAddonIntro = 599,
+ kFlagSteeleAimingAtGordo = 603,
kFlagTB07toTB02 = 608,
kFlagTB07RachaelTalk = 612,
kFlagHF03LucyTalk = 613,
kFlagMcCoyCapturedByHolloway = 616,
kFlagSpinnerMissing = 617,
kFlagTB07TyrellMeeting = 625,
+ kFlagSteeleKnowsBulletBobIsDead = 643,
kFlagCT11DogWrapperTaken = 645,
+ kFlagSteeleDead = 646, // is never checked
kFlagMA04McCoySleeping = 647,
kFlagMA04PhoneMessageFromClovis = 649,
kFlagMA04PhoneMessageFromLucy = 650,
@@ -956,7 +961,7 @@ enum Flags {
kFlagPS05TV4 = 692,
kFlagUG03DeadHomeless = 693,
kFlagUG14DeadHomeless = 694,
- kFlagRC04Locked = 702,
+ kFlagBulletBobDead = 702,
kFlagTB06PhotographTalk1 = 707,
kFlagUG02AmmoTaken = 708,
kFlagRC51Discovered = 709,
@@ -993,7 +998,8 @@ enum Variables {
kVariableWalkLoopActor = 37,
kVariableWalkLoopRun = 38,
kVariableDR06MannequinHeadOpened = 39,
- kVariableBehavior = 40, // 1 dektora is replicant, 2 - ?, 3 - get caught by Holloway & Baker at HF03
+ kVariableHollowayArrest = 40, // 1 dektora, 2 gordo, 3 lucy
+ kVariableGordosJoke = 41,
kVariableMcCoyDrinks = 42, // is never checked
kVariableAffectionTowards = 45, // 0 none, 1 steele, 2 dektora, 3 lucy
kVariableGunPulledInFrontOfSebastian = 46,
@@ -1058,9 +1064,10 @@ enum AnimationModes {
kAnimationModeCombatAttack = 6,
kAnimationModeCombatWalk = 7,
kAnimationModeCombatRun = 8,
- // 12 - 17 various talk modes
+ // 12 - 19 various talk modes
kAnimationModeHit = 21,
kAnimationModeCombatHit = 22,
+ // 23 - give / take away
kAnimationModeSpinnerGetIn = 41,
kAnimationModeSpinnerGetOut = 42,
// 43 - taking photo/using cellphone
@@ -1394,6 +1401,8 @@ enum GameItems {
kItemDogCollar = 84,
kItemRagDoll = 85,
kItemRadiationGoogles = 88,
+ kItemGordosLighter1 = 89,
+ kItemGordosLighter2 = 90,
kItemToyDog = 98,
kItemShellCasingA = 100,
kItemShellCasingB = 101,
@@ -1537,8 +1546,11 @@ enum GoalSteele {
kGoalSteeleLeaveRC03 = 130,
kGoalSteeleWalkAroundRestart = 190,
// chapter 3
+ kGoalSteeleStartChapter3 = 205,
kGoalSteeleNR01WaitForMcCoy = 230,
- kGoalSteeleHF03ApproachLucy = 233,
+ kGoalSteeleNR01GoToNR08 = 231,
+ kGoalSteeleNR01GoToNR02 = 232,
+ kGoalSteeleNR01GoToHF03 = 233,
kGoalSteeleHF03McCoyChasingLucy = 234,
kGoalSteeleHF02ConfrontLucy = 240,
kGoalSteeleHF02ShootLucy = 241,
@@ -1547,9 +1559,22 @@ enum GoalSteele {
kGoalSteeleHF02LucyShotByMcCoy = 244,
kGoalSteeleHF02LucyLostByMcCoy = 245,
kGoalSteeleGoToMcCoysSpinner = 246,
+ kGoalSteeleNR01ConfrontGordo = 250,
+ kGoalSteeleNR01TalkToGordo = 251,
+ kGoalSteeleNR01ShootGordo = 252,
+ kGoalSteeleNR01ShootMcCoy = 255,
+ kGoalSteeleNR01McCoyShotGordo = 258,
+ kGoalSteeleNR01McCoyShotGun = 260,
+ kGoalSteeleNR01PrepareTalkAboutShotGun = 261,
+ kGoalSteeleNR01TalkAboutShotGun = 262,
+ kGoalSteeleNR01ShotByMcCoy = 270,
+ kGoalSteeleNR01PrepareShotByMcCoy = 271,
kGoalSteeleTalkAboutMissingSpinner = 280,
+ kGoalSteeleImmediatelyStartChapter4 = 285,
kGoalSteeleNR01StartChapter4 = 290,
- kGoalSteeleHF01StartChapter4 = 291
+ kGoalSteeleHF01StartChapter4 = 291,
+
+ kGoalSteeleDead = 599
};
enum GoalDektora {
@@ -1563,15 +1588,15 @@ enum GoalDektora {
enum GoalGordo {
// chapter 1
kGoalGordoDefault = 0,
- kGoalGordoLeaveCT01 = 1,
- kGoalGordoLeftCT01 = 2,
- kGoalGordoWalkThroughCT05 = 3,
- kGoalGordoLeaveCT05 = 4,
- kGoalGordoLeftCT05 = 5,
- kGoalGordoGetUpCT01 = 90,
- kGoalGordoWalkOutFromCT01 = 91,
- kGoalGordoBidFarewellToHowieLee = 92,
- kGoalGordoWalkToHowieLee = 93,
+ kGoalGordoCT01Leave = 1,
+ kGoalGordoCT01Left = 2,
+ kGoalGordoCT05WalkThrough = 3,
+ kGoalGordoCT05Leave = 4,
+ kGoalGordoCT05Left = 5,
+ kGoalGordoCT01StandUp = 90,
+ kGoalGordoCT01WalkAway = 91,
+ kGoalGordoCT01BidFarewellToHowieLee = 92,
+ kGoalGordoCT01WalkToHowieLee = 93,
// chapter 2
kGoalGordoWalkAround = 100,
kGoalGordoGoToDNARow = 101,
@@ -1580,9 +1605,35 @@ enum GoalGordo {
kGoalGordoGoToFreeSlotAH = 104,
// chapter 3
kGoalGordoStartChapter3 = 200,
- kGoalGordoWaitAtNR02 = 201,
- kGoalGordoTalkToMcCoyAtNR02 = 215
+ kGoalGordoNR02WaitAtBar = 201,
+ kGoalGordoNR02GoToPodium = 202,
+ kGoalGordoNR02WaitForMcCoy = 204,
+ kGoalGordoNR02NextAct = 205,
+ kGoalGordoNR02TellJoke1 = 206,
+ kGoalGordoNR02TellJoke2 = 207,
+ kGoalGordoNR02TellJoke3 = 208,
+ kGoalGordoNR02TalkAboutMcCoy = 210,
+ kGoalGordoNR02WaitAtPodium = 211,
+ kGoalGordoNR02TalkToMcCoy = 215,
+ kGoalGordoNR02RunAway1 = 220,
+ kGoalGordoNR02RunAway2 = 221,
+ kGoalGordoNR02RunAway3 = 222,
+ kGoalGordoGoToFreeSlotGAG = 225,
+ kGoalGordoNR01WaitAndAttack = 230,
+ kGoalGordoNR01Attack = 231,
+ kGoalGordoNR01WaitAndGiveUp = 240,
+ kGoalGordoNR01GiveUp = 241,
+ kGoalGordoNR01TalkToMcCoy = 242,
+ kGoalGordoNR01RunAway = 243,
+ kGoalGordoNR01WaitAndTakeHostage = 250,
+ kGoalGordoNR01ReleaseHostage = 251,
+ kGoalGordoNR01HostageShot = 254,
+ kGoalGordoNR01HostageDie = 255,
+ kGoalGordoNR01Arrested = 260,
+ kGoalGordoNR01RanAway = 280,
+ kGoalGordoNR01Die = 299,
+ kGoalGordoDead = 599
};
enum GoalGuzza {
@@ -1599,7 +1650,7 @@ enum GoalClovis {
kGoalClovisBB11WalkToMcCoy = 101,
kGoalClovisBB11StopSadik = 102,
kGoalClovisBB11TalkWithSadik = 103,
- kGoalClovisBB11PrepareToTalkToMcCoy = 104, // bug? this is not triggered when player skips dialogue
+ kGoalClovisBB11PrepareTalkToMcCoy = 104, // bug? this is not triggered when player skips dialogue
kGoalClovisBB11TalkToMcCoy = 105 // ends Chapter 2
};
diff --git a/engines/bladerunner/script/ai/bullet_bob.cpp b/engines/bladerunner/script/ai/bullet_bob.cpp
index 1c1730c7d5..1a97a826cd 100644
--- a/engines/bladerunner/script/ai/bullet_bob.cpp
+++ b/engines/bladerunner/script/ai/bullet_bob.cpp
@@ -425,9 +425,6 @@ bool AIScriptBulletBob::UpdateAnimation(int *animation, int *frame) {
*animation = 510;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(510) - 1;
break;
-
- default:
- break;
}
*frame = _animationFrame;
diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp
index 4702c35326..312ea08d04 100644
--- a/engines/bladerunner/script/ai/clovis.cpp
+++ b/engines/bladerunner/script/ai/clovis.cpp
@@ -50,7 +50,7 @@ void AIScriptClovis::Initialize() {
}
bool AIScriptClovis::Update() {
- if (Actor_Query_Goal_Number(kActorClovis) == kGoalClovisBB11PrepareToTalkToMcCoy) {
+ if (Actor_Query_Goal_Number(kActorClovis) == kGoalClovisBB11PrepareTalkToMcCoy) {
Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11TalkToMcCoy);
return true;
}
@@ -449,7 +449,7 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case 517:
if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorLucy, kSetKP07)) {
- Actor_Set_Goal_Number(kActorLucy, 599);
+ Actor_Set_Goal_Number(kActorLucy, kGoalLucyDead);
Global_Variable_Decrement(kVariableReplicants, 1);
}
if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_In_Set(kActorLuther, kSetKP07)) {
@@ -616,7 +616,7 @@ bool AIScriptClovis::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
*animation = 238;
if (Actor_Query_Goal_Number(kActorClovis) == kGoalClovisBB11TalkWithSadik) {
- Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11PrepareToTalkToMcCoy);
+ Actor_Set_Goal_Number(kActorClovis, kGoalClovisBB11PrepareTalkToMcCoy);
}
}
break;
diff --git a/engines/bladerunner/script/ai/early_q.cpp b/engines/bladerunner/script/ai/early_q.cpp
index 826a339234..2e45ffeb6d 100644
--- a/engines/bladerunner/script/ai/early_q.cpp
+++ b/engines/bladerunner/script/ai/early_q.cpp
@@ -282,7 +282,7 @@ bool AIScriptEarlyQ::GoalChanged(int currentGoalNumber, int newGoalNumber) {
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(kFlagGordoRanWay)
&& Game_Flag_Query(kFlagLucyRanAway)
) {
Actor_Set_Goal_Number(kActorEarlyQ, 220);
diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp
index e16ca05601..463960ca65 100644
--- a/engines/bladerunner/script/ai/gordo.cpp
+++ b/engines/bladerunner/script/ai/gordo.cpp
@@ -54,13 +54,13 @@ bool AIScriptGordo::Update() {
&& Actor_Query_Friendliness_To_Other(kActorGordo, kActorMcCoy) < 48
&& Actor_Query_Is_In_Current_Set(kActorGordo)
) {
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoGetUpCT01);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01StandUp);
return true;
}
if (Actor_Query_Which_Set_In(kActorMcCoy) == kSetCT03_CT04
&& Actor_Query_Which_Set_In(kActorGordo) == kSetCT01_CT12
) {
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoWalkOutFromCT01);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01WalkAway);
return true;
}
}
@@ -75,17 +75,17 @@ bool AIScriptGordo::Update() {
if (Actor_Query_Goal_Number(kActorGordo) < kGoalGordoStartChapter3) {
Actor_Set_Goal_Number(kActorGordo, kGoalGordoStartChapter3);
}
- if (Actor_Query_Goal_Number(kActorGordo) == 254) {
- Actor_Set_Goal_Number(kActorGordo, 255);
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01HostageShot) {
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01HostageDie);
}
}
if (Global_Variable_Query(kVariableChapter) == 4) {
if (Actor_Query_Goal_Number(kActorGordo) < 300
- && Actor_Query_Goal_Number(kActorGordo) != 260
+ && Actor_Query_Goal_Number(kActorGordo) != kGoalGordoNR01Arrested
) {
Actor_Set_Goal_Number(kActorGordo, 300);
- } else if (Actor_Query_Goal_Number(kActorGordo) == 599) {
+ } else if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoDead) {
Actor_Put_In_Set(kActorGordo, kSetFreeSlotI);
Actor_Set_At_Waypoint(kActorGordo, 41, 0);
}
@@ -104,23 +104,23 @@ void AIScriptGordo::TimerExpired(int timer) {
if (timer == 0) {
AI_Countdown_Timer_Reset(kActorGordo, 0);
if (Player_Query_Combat_Mode()) {
- Actor_Set_Goal_Number(kActorGordo, 243);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01RunAway);
} else {
- Actor_Set_Goal_Number(kActorGordo, 242);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01TalkToMcCoy);
}
}
//return false;
}
void AIScriptGordo::CompletedMovementTrack() {
- if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoLeaveCT01
- || Actor_Query_Goal_Number(kActorGordo) == kGoalGordoWalkOutFromCT01
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT01Leave
+ || Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT01WalkAway
) {
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoLeftCT01);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01Left);
return;// true;
}
- if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoWalkThroughCT05) {
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT05WalkThrough) {
if (Player_Query_Current_Set() == kSetCT05) {
Actor_Force_Stop_Walking(kActorMcCoy);
Player_Loses_Control();
@@ -135,19 +135,19 @@ void AIScriptGordo::CompletedMovementTrack() {
Player_Gains_Control();
}
Actor_Clue_Acquire(kActorGordo, kClueMcCoyRetiredZuben, true, -1);
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoLeaveCT05);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT05Leave);
return;// true;
}
- if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoLeaveCT05) {
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoLeftCT05);
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT05Leave) {
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT05Left);
return;// true;
}
- if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoWalkToHowieLee) {
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT01WalkToHowieLee) {
Actor_Set_Immunity_To_Obstacles(kActorGordo, false);
Player_Gains_Control();
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoBidFarewellToHowieLee);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01BidFarewellToHowieLee);
return;// true;
}
@@ -158,7 +158,7 @@ void AIScriptGordo::CompletedMovementTrack() {
return;// true;
}
- if (Actor_Query_Goal_Number(kActorGordo) == 202) {
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02GoToPodium) {
if (Player_Query_Current_Set() == kSetNR02) {
Ambient_Sounds_Play_Sound(581, 58, 0, 0, 0);
Actor_Face_Heading(kActorGordo, 0, false);
@@ -168,34 +168,34 @@ void AIScriptGordo::CompletedMovementTrack() {
} else {
Actor_Set_At_Waypoint(kActorGordo, 357, 506);
}
- Actor_Set_Goal_Number(kActorGordo, 205);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02NextAct);
}
- if (Actor_Query_Goal_Number(kActorGordo) == 220) {
- Game_Flag_Set(594);
- Actor_Set_Goal_Number(kActorGordo, 221);
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02RunAway1) {
+ Game_Flag_Set(kFlagNR02GordoJumpDown);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02RunAway2);
}
- if (Actor_Query_Goal_Number(kActorGordo) == 222) {
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02RunAway3) {
if (Game_Flag_Query(kFlagGordoIsReplicant)) {
- if (Global_Variable_Query(kVariableBehavior) == 2) {
- Actor_Set_Goal_Number(kActorGordo, 250);
+ if (Global_Variable_Query(kVariableHollowayArrest) == 2) {
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01WaitAndTakeHostage);
} else {
- Actor_Set_Goal_Number(kActorGordo, 230);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01WaitAndAttack);
}
} else {
- Actor_Set_Goal_Number(kActorGordo, 240);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01WaitAndGiveUp);
}
Scene_Exits_Enable();
}
- if (Actor_Query_Goal_Number(kActorGordo) == 225) {
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoGoToFreeSlotGAG) {
Actor_Set_Goal_Number(kActorGordo, kGoalGordoStartChapter3);
}
- if (Actor_Query_Goal_Number(kActorGordo) == 243) {
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01RunAway) {
Music_Stop(2);
- Actor_Set_Goal_Number(kActorGordo, 280);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01RanAway);
}
// return false;
}
@@ -209,13 +209,13 @@ void AIScriptGordo::ClickedByPlayer() {
if (goal == kGoalGordoGoToDNARow
|| goal == kGoalGordoGoToChinaTown
) {
- McCoyTalkWithGordo();
- } else if (goal == 260) {
+ talkToMcCoyInCity();
+ } else if (goal == kGoalGordoNR01Arrested) {
Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
Actor_Says(kActorMcCoy, 8600, 11);
Actor_Face_Actor(kActorGordo, kActorMcCoy, true);
Actor_Says(kActorGordo, 1390, 16);
- } else if (goal == 599) {
+ } else if (goal == kGoalGordoDead) {
Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
Actor_Says(kActorMcCoy, 8665, 14);
}
@@ -243,30 +243,38 @@ void AIScriptGordo::ShotAtAndMissed() {
}
bool AIScriptGordo::ShotAtAndHit() {
- if (Actor_Query_Goal_Number(kActorGordo) > 219 && Actor_Query_Goal_Number(kActorGordo) < 223) {
+ // Running from NR02
+ if (Actor_Query_Goal_Number(kActorGordo) > 219
+ && Actor_Query_Goal_Number(kActorGordo) < 223
+ ) {
Actor_Set_Health(kActorGordo, 50, 50);
return true;
}
- if (Actor_Query_Goal_Number(kActorGordo) > 239 && Actor_Query_Goal_Number(kActorGordo) < 245) {
- Actor_Set_Goal_Number(kActorGordo, 299);
+
+ // Shot as a human
+ if (Actor_Query_Goal_Number(kActorGordo) > 239
+ && Actor_Query_Goal_Number(kActorGordo) < 245)
+ {
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01Die);
Delay(1500);
Actor_Voice_Over(2410, kActorVoiceOver);
Actor_Voice_Over(2420, kActorVoiceOver);
Game_Flag_Set(kFlagNR01toNR02);
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
}
- if (Actor_Query_Goal_Number(kActorGordo) == 250) {
- Actor_Set_Goal_Number(kActorGordo, 254);
+
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01WaitAndTakeHostage) {
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01HostageShot);
return true;
}
return false;
}
void AIScriptGordo::Retired(int byActorId) {
- if (Actor_Query_Goal_Number(kActorGordo) == 231) {
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01Attack) {
Player_Loses_Control();
- Game_Flag_Set(592);
- Actor_Set_Goal_Number(kActorGordo, 599);
+ Game_Flag_Set(kFlagGordoRanWay);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoDead);
Delay(2000);
Player_Set_Combat_Mode(false);
Actor_Voice_Over(1410, kActorVoiceOver);
@@ -278,9 +286,10 @@ void AIScriptGordo::Retired(int byActorId) {
Player_Gains_Control();
Scene_Exits_Enable();
}
+
if (Actor_Query_In_Set(kActorGordo, kSetKP07)) {
Global_Variable_Decrement(kVariableReplicants, 1);
- Actor_Set_Goal_Number(kActorGordo, 599);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoDead);
if (Global_Variable_Query(kVariableReplicants) == 0) {
Player_Loses_Control();
Delay(2000);
@@ -295,7 +304,8 @@ void AIScriptGordo::Retired(int byActorId) {
return;// true;
}
}
- Actor_Set_Goal_Number(kActorGordo, 599);
+
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoDead);
//return false;
}
@@ -316,42 +326,42 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Change_Animation_Mode(kActorGordo, 53);
break;
- case kGoalGordoWalkThroughCT05:
+ case kGoalGordoCT05WalkThrough:
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append(kActorGordo, 119, 0);
AI_Movement_Track_Append(kActorGordo, 118, 0);
AI_Movement_Track_Repeat(kActorGordo);
break;
- case kGoalGordoLeaveCT05:
+ case kGoalGordoCT05Leave:
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append(kActorGordo, 119, 0);
AI_Movement_Track_Append(kActorGordo, 33, 1);
AI_Movement_Track_Repeat(kActorGordo);
break;
- case kGoalGordoGetUpCT01:
+ case kGoalGordoCT01StandUp:
Game_Flag_Set(kFlagCT01GordoTalk);
Actor_Set_Goal_Number(kActorGordo, 99);
Actor_Change_Animation_Mode(kActorGordo, 29);
break;
- case kGoalGordoWalkOutFromCT01:
+ case kGoalGordoCT01WalkAway:
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append(kActorGordo, 43, 0);
AI_Movement_Track_Append(kActorGordo, 33, 1);
AI_Movement_Track_Repeat(kActorGordo);
break;
- case kGoalGordoBidFarewellToHowieLee:
+ case kGoalGordoCT01BidFarewellToHowieLee:
Actor_Face_Actor(kActorGordo, kActorHowieLee, true);
Actor_Says(kActorGordo, 0, 13);
Actor_Says(kActorGordo, 10, 16);
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoWalkOutFromCT01);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01WalkAway);
Player_Gains_Control();
break;
- case kGoalGordoWalkToHowieLee:
+ case kGoalGordoCT01WalkToHowieLee:
Player_Loses_Control();
Actor_Set_Immunity_To_Obstacles(kActorGordo, true);
AI_Movement_Track_Flush(kActorGordo);
@@ -454,70 +464,77 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
// chapter 3
case kGoalGordoStartChapter3:
- if (Global_Variable_Query(kVariableBehavior) == 2) {
+ if (Global_Variable_Query(kVariableHollowayArrest) == 2) {
if (Game_Flag_Query(kFlagLucyRanAway)
&& Game_Flag_Query(591)
&& Player_Query_Current_Scene() != kSceneNR02
) {
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoWaitAtNR02);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02WaitAtBar);
} else {
- Actor_Set_Goal_Number(kActorGordo, 225);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoGoToFreeSlotGAG);
}
} else {
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoWaitAtNR02);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02WaitAtBar);
}
break;
- case kGoalGordoWaitAtNR02:
+
+ case kGoalGordoNR02WaitAtBar:
AI_Movement_Track_Flush(kActorGordo);
Actor_Put_In_Set(kActorGordo, kSetNR02);
Actor_Set_At_XYZ(kActorGordo, 148.12f, -24.0f, 456.04f, 506);
break;
- case 202:
+
+ case kGoalGordoNR02GoToPodium:
Player_Gains_Control();
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append(kActorGordo, 356, 0);
AI_Movement_Track_Repeat(kActorGordo);
break;
- case 205:
- switch(Global_Variable_Query(41)) {
+
+ case kGoalGordoNR02NextAct:
+ switch(Global_Variable_Query(kVariableGordosJoke)) {
case 0:
- Global_Variable_Increment(41, 1);
- Actor_Set_Goal_Number(kActorGordo, 206);
+ Global_Variable_Increment(kVariableGordosJoke, 1);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TellJoke1);
break;
case 1:
- Global_Variable_Increment(41, 1);
- Actor_Set_Goal_Number(kActorGordo, 207);
+ Global_Variable_Increment(kVariableGordosJoke, 1);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TellJoke2);
break;
case 2:
- Global_Variable_Increment(41, 1);
- Actor_Set_Goal_Number(kActorGordo, 208);
+ Global_Variable_Increment(kVariableGordosJoke, 1);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TellJoke3);
break;
case 3:
- Global_Variable_Increment(41, 1);
- Actor_Set_Goal_Number(kActorGordo, 210);
+ Global_Variable_Increment(kVariableGordosJoke, 1);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TalkAboutMcCoy);
break;
}
break;
- case 206:
+
+ case kGoalGordoNR02TellJoke1:
ADQ_Add_Pause(5000);
ADQ_Add(kActorGordo, 630, 15);
ADQ_Add(kActorGordo, 640, 16);
ADQ_Add_Pause(1000);
ADQ_Add(kActorGordo, 650, 14);
break;
- case 207:
+
+ case kGoalGordoNR02TellJoke2:
ADQ_Add_Pause(1000);
ADQ_Add(kActorGordo, 660, 16);
ADQ_Add(kActorGordo, 670, 14);
ADQ_Add(kActorGordo, 680, 13);
ADQ_Add(kActorGordo, 690, 17);
break;
- case 208:
+
+ case kGoalGordoNR02TellJoke3:
ADQ_Add_Pause(1000);
ADQ_Add(kActorGordo, 700, 15);
ADQ_Add(kActorGordo, 710, 13);
break;
- case 210:
+
+ case kGoalGordoNR02TalkAboutMcCoy:
Actor_Force_Stop_Walking(0);
Actor_Face_Actor(kActorGordo, kActorMcCoy, true);
Actor_Says(kActorGordo, 720, 16);
@@ -535,17 +552,17 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
if (Game_Flag_Query(kFlagGordoIsReplicant)) {
Actor_Says(kActorGordo, 850, 12);
Actor_Says(kActorGordo, 860, 15);
- Actor_Says(0, 3910, 16);
- if (Global_Variable_Query(kVariableBehavior) == 2) {
+ Actor_Says(kActorMcCoy, 3910, 16);
+ if (Global_Variable_Query(kVariableHollowayArrest) == 2) {
Actor_Says(kActorGordo, 870, 16);
Sound_Play(576, 50, 0, 0, 50);
Sound_Play(319, 50, 0, 0, 50);
Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayGoToNR02);
Actor_Says(kActorGordo, 880, 17);
- Actor_Set_Goal_Number(kActorGordo, 211);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02WaitAtPodium);
Player_Loses_Control();
} else {
- Actor_Set_Goal_Number(kActorGordo, 220);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02RunAway1);
}
} else {
Actor_Says(kActorGordo, 790, 12);
@@ -562,15 +579,15 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorGordo, 840, 13);
Sound_Play(578, 50, 0, 0, 50);
Sound_Play(321, 50, 0, 0, 50);
- Actor_Set_Goal_Number(kActorGordo, 220);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02RunAway1);
}
break;
- case kGoalGordoTalkToMcCoyAtNR02:
+ case kGoalGordoNR02TalkToMcCoy:
talkToMcCoyAtNR02();
break;
- case 220:
+ case kGoalGordoNR02RunAway1:
Actor_Set_Targetable(kActorGordo, true);
Scene_Exits_Disable();
AI_Movement_Track_Flush(kActorGordo);
@@ -579,18 +596,18 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Music_Play(1, 50, 0, 2, -1, 0, 0);
break;
- case 221:
+ case kGoalGordoNR02RunAway2:
Actor_Set_At_XYZ(kActorGordo, -90.91f, -24.0f, -14.71f, 708);
Actor_Change_Animation_Mode(kActorGordo, 26);
break;
- case 222:
+ case kGoalGordoNR02RunAway3:
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append_Run(kActorGordo, 367, 0);
AI_Movement_Track_Repeat(kActorGordo);
break;
- case 225:
+ case kGoalGordoGoToFreeSlotGAG:
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append(kActorGordo, 39, 10);
AI_Movement_Track_Append(kActorGordo, 33, Random_Query(5, 30));
@@ -598,28 +615,28 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorGordo);
break;
- case 230:
+ case kGoalGordoNR01WaitAndAttack:
Actor_Put_In_Set(kActorGordo, kSetNR01);
Actor_Set_At_XYZ(kActorGordo, -194.24f, 23.88f, -851.98f, 343);
break;
- case 240:
+ case kGoalGordoNR01WaitAndGiveUp:
Actor_Put_In_Set(kActorGordo, kSetNR01);
Actor_Set_At_XYZ(kActorGordo, -194.24f, 23.88f, -851.98f, 343);
break;
- case 241:
+ case kGoalGordoNR01GiveUp:
ADQ_Add(kActorGordo, 170, 18);
AI_Countdown_Timer_Start(kActorGordo, 0, 10);
break;
- case 242:
+ case kGoalGordoNR01TalkToMcCoy:
Actor_Face_Actor(kActorGordo, kActorMcCoy, true);
Actor_Says(kActorGordo, 180, 13);
Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
Actor_Says(kActorMcCoy, 3075, 13);
Actor_Says(kActorGordo, 190, 15);
- Loop_Actor_Walk_To_Actor(kActorGordo, 0, 60, false, true);
+ Loop_Actor_Walk_To_Actor(kActorGordo, kActorMcCoy, 60, false, true);
Actor_Face_Actor(kActorGordo, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
Actor_Says(kActorMcCoy, 3080, 15);
@@ -628,7 +645,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
dialogue2();
break;
- case 243:
+ case kGoalGordoNR01RunAway:
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append_Run(kActorGordo, 369, 0);
AI_Movement_Track_Append_Run(kActorGordo, 370, 0);
@@ -636,14 +653,14 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorGordo);
break;
- case 250:
+ case kGoalGordoNR01WaitAndTakeHostage:
Actor_Put_In_Set(kActorGordo, kSetNR01);
Actor_Set_At_XYZ(kActorGordo, -194.24f, 23.88f, -851.98f, 343);
Actor_Change_Animation_Mode(kActorGordo, 80);
- Actor_Set_Goal_Number(kActorSteele, 250);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01ConfrontGordo);
break;
- case 251:
+ case kGoalGordoNR01ReleaseHostage:
Actor_Change_Animation_Mode(kActorGordo, 83);
break;
@@ -651,24 +668,24 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
ADQ_Flush();
Actor_Change_Animation_Mode(kActorGordo, 83);
Player_Loses_Control();
- Game_Flag_Reset(603);
+ Game_Flag_Reset(kFlagSteeleAimingAtGordo);
Actor_Set_Targetable(kActorSteele, false);
Delay(3000);
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
break;
- case 260:
+ case kGoalGordoNR01Arrested:
Actor_Set_Targetable(kActorGordo, false);
break;
- case 280:
+ case kGoalGordoNR01RanAway:
Scene_Exits_Enable();
- Game_Flag_Set(592);
+ Game_Flag_Set(kFlagGordoRanWay);
Actor_Put_In_Set(kActorGordo, kSetFreeSlotA);
Actor_Set_At_Waypoint(kActorGordo, 33, 0);
break;
- case 299:
+ case kGoalGordoNR01Die:
Music_Stop(2);
AI_Countdown_Timer_Reset(kActorGordo, 0);
ADQ_Flush();
@@ -678,7 +695,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
} else {
Actor_Change_Animation_Mode(kActorGordo, kAnimationModeDie);
}
- Actor_Set_Goal_Number(kActorGordo, 599);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoDead);
Actor_Retired_Here(kActorGordo, 36, 18, true, -1);
break;
@@ -814,7 +831,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 0;
_animationFrame = 0;
Actor_Change_Animation_Mode(kActorGordo, kAnimationModeIdle);
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoWalkToHowieLee);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01WalkToHowieLee);
}
break;
@@ -1097,9 +1114,9 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 16;
_animationFrame = 0;
Actor_Change_Animation_Mode(kActorGordo, kAnimationModeCombatIdle);
- if (Game_Flag_Query(594)) {
- Actor_Set_Goal_Number(kActorGordo, 222);
- Game_Flag_Set(592);
+ if (Game_Flag_Query(kFlagNR02GordoJumpDown)) {
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02RunAway3);
+ Game_Flag_Set(kFlagGordoRanWay);
}
}
break;
@@ -1108,14 +1125,14 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
*animation = 119;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(119)) {
- if (Game_Flag_Query(561)) {
- Game_Flag_Reset(561);
+ if (Game_Flag_Query(kFlagNR02GordoLeaveLighter)) {
+ Game_Flag_Reset(kFlagNR02GordoLeaveLighter);
if (Game_Flag_Query(kFlagGordoIsReplicant)) {
- Item_Add_To_World(89, 953, kSetNR02, 148.94f, 22.19f, 476.1f, 0, 6, 6, false, true, false, false);
+ Item_Add_To_World(kItemGordosLighter1, 953, kSetNR02, 148.94f, 22.19f, 476.1f, 0, 6, 6, false, true, false, false);
} else {
- Item_Add_To_World(90, 954, kSetNR02, 148.94f, 22.19f, 476.1f, 0, 6, 6, false, true, false, false);
+ Item_Add_To_World(kItemGordosLighter2, 954, kSetNR02, 148.94f, 22.19f, 476.1f, 0, 6, 6, false, true, false, false);
}
- Actor_Set_Goal_Number(kActorGordo, 202);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02GoToPodium);
}
*animation = 116;
_animationState = 0;
@@ -1164,7 +1181,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
*animation = 131;
_animationFrame++;
if (_animationFrame == 7) {
- if (Actor_Query_Goal_Number(kActorGordo) == 255) {
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01HostageDie) {
Actor_Set_Goal_Number(kActorTaffyPatron, 255);
} else {
Actor_Set_Goal_Number(kActorTaffyPatron, 250);
@@ -1174,7 +1191,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
Actor_Change_Animation_Mode(kActorGordo, kAnimationModeCombatIdle);
*animation = 93;
_animationFrame = 0;
- Actor_Set_Goal_Number(kActorGordo, 243);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01RunAway);
}
break;
@@ -1376,7 +1393,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
var_45B078 = 0;
break;
- case 21:
+ case kAnimationModeHit:
switch (_animationState) {
case 14:
case 16:
@@ -1405,7 +1422,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
break;
- case 22:
+ case kAnimationModeCombatHit:
if (Random_Query(0, 1)) {
_animationState = 21;
} else {
@@ -1434,27 +1451,27 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
_animationFrame = 0;
break;
- case 44:
+ case kAnimationModeWalkUp:
_animationState = 29;
_animationFrame = 0;
break;
- case 45:
+ case kAnimationModeWalkDown:
_animationState = 30;
_animationFrame = 0;
break;
- case 46:
+ case kAnimationModeCombatWalkUp:
_animationState = 31;
_animationFrame = 0;
break;
- case 47:
+ case kAnimationModeCombatWalkDown:
_animationState = 32;
_animationFrame = 0;
break;
- case 48:
+ case kAnimationModeDie:
switch (_animationState) {
case 14:
case 16:
@@ -1474,7 +1491,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
break;
- case 49:
+ case kAnimationModeCombatDie:
_animationState = 24;
_animationFrame = 0;
break;
@@ -1535,12 +1552,12 @@ bool AIScriptGordo::ReachedMovementTrackWaypoint(int waypointId) {
void AIScriptGordo::FledCombat() {
Scene_Exits_Enable();
if (Global_Variable_Query(kVariableChapter) == 3) {
- Actor_Set_Goal_Number(kActorGordo, 280);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01RanAway);
}
// return false;
}
-void AIScriptGordo::McCoyTalkWithGordo() {
+void AIScriptGordo::talkToMcCoyInCity() {
Player_Loses_Control();
Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
if (!Game_Flag_Query(kFlagGordoTalk1)) {
@@ -1639,7 +1656,7 @@ void AIScriptGordo::talkToMcCoyAtNR02() {
Player_Gains_Control();
dialogue1();
Player_Loses_Control();
- Game_Flag_Set(561);
+ Game_Flag_Set(kFlagNR02GordoLeaveLighter);
Actor_Face_Heading(kActorGordo, 506, false);
Actor_Change_Animation_Mode(kActorGordo, 23);
}
@@ -1654,24 +1671,24 @@ void AIScriptGordo::dialogue2() {
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
- if (answer == 820) {
+ if (answer == 820) { // ARREST
Actor_Says(kActorMcCoy, 3090, 16);
Actor_Says(kActorMcCoy, 3095, 15);
Actor_Says(kActorGordo, 210, 17);
Actor_Says(kActorGordo, 220, 14);
Actor_Says(kActorGordo, 230, 15);
- Actor_Set_Goal_Number(kActorGordo, 260);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01Arrested);
Actor_Put_In_Set(kActorGordo, kSetPS09);
Actor_Set_At_XYZ(kActorGordo, -479.15f, 0.0f, -197.84f, 547);
- Game_Flag_Reset(255);
- Game_Flag_Reset(256);
- Game_Flag_Set(251);
- Game_Flag_Set(592);
+ Game_Flag_Reset(kFlagSpinnerAtNR01);
+ Game_Flag_Reset(kFlagSpinnerAtHF01);
+ Game_Flag_Set(kFlagSpinnerAtPS01);
+ Game_Flag_Set(kFlagGordoRanWay);
Scene_Exits_Enable();
Game_Flag_Reset(kFlagMcCoyInNightclubRow);
Game_Flag_Set(kFlagMcCoyInPoliceStation);
Set_Enter(kSetPS09, kScenePS09);
- } else if (answer == 830) {
+ } else if (answer == 830) { // LET GO
Actor_Says(kActorMcCoy, 3100, 16);
Actor_Says(kActorGordo, 240, 14);
if (Actor_Clue_Query(0, 102)) {
@@ -1686,9 +1703,9 @@ void AIScriptGordo::dialogue2() {
Delay(1000);
Actor_Says(kActorGordo, 570, 13);
}
- Game_Flag_Set(592);
+ Game_Flag_Set(kFlagGordoRanWay);
Scene_Exits_Enable();
- Actor_Set_Goal_Number(kActorGordo, 243);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01RunAway);
}
}
diff --git a/engines/bladerunner/script/ai/holloway.cpp b/engines/bladerunner/script/ai/holloway.cpp
index a64183b7c1..3b3724492c 100644
--- a/engines/bladerunner/script/ai/holloway.cpp
+++ b/engines/bladerunner/script/ai/holloway.cpp
@@ -50,7 +50,7 @@ bool AIScriptHolloway::Update() {
void AIScriptHolloway::TimerExpired(int timer) {
if (timer == 0) {
AI_Countdown_Timer_Reset(kActorHolloway, 0);
- if (Global_Variable_Query(kVariableBehavior) == 1) {
+ if (Global_Variable_Query(kVariableHollowayArrest) == 1) {
Player_Gains_Control();
}
Actor_Set_Goal_Number(kActorHolloway, kGoalHollowayTalkToMcCoy);
@@ -176,7 +176,7 @@ bool AIScriptHolloway::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Outtake_Play(kOuttakeInterrogation, 0, 1);
- if (Global_Variable_Query(kVariableBehavior) == 1) {
+ if (Global_Variable_Query(kVariableHollowayArrest) == 1) {
Actor_Set_Goal_Number(kActorDektora, 245);
Actor_Change_Animation_Mode(kActorDektora, kAnimationModeIdle);
}
@@ -187,7 +187,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(kVariableBehavior) != 1) {
+ if (Global_Variable_Query(kVariableHollowayArrest) != 1) {
Player_Gains_Control();
}
diff --git a/engines/bladerunner/script/ai/lucy.cpp b/engines/bladerunner/script/ai/lucy.cpp
index 0e69ea6947..f735415851 100644
--- a/engines/bladerunner/script/ai/lucy.cpp
+++ b/engines/bladerunner/script/ai/lucy.cpp
@@ -127,7 +127,7 @@ void AIScriptLucy::CompletedMovementTrack() {
switch (Actor_Query_Goal_Number(kActorLucy)) {
case kGoalLucyGoToHF03:
if (Game_Flag_Query(kFlagMcCoyCapturedByHolloway)
- && Global_Variable_Query(kVariableBehavior) == 3
+ && Global_Variable_Query(kVariableHollowayArrest) == 3
) {
Actor_Set_Goal_Number(kActorLucy, kGoalLucyReturnToHF03);
return; //true;
@@ -151,7 +151,7 @@ void AIScriptLucy::CompletedMovementTrack() {
case kGoalLucyRunToHF042:
if (Actor_Clue_Query(kActorLucy, kClueMcCoyHelpedLucy)
- && Global_Variable_Query(kVariableBehavior) != 3
+ && Global_Variable_Query(kVariableHollowayArrest) != 3
) {
Game_Flag_Set(kFlagLucyRanAway);
} else {
@@ -192,7 +192,7 @@ void AIScriptLucy::CompletedMovementTrack() {
Actor_Set_At_Waypoint(kActorLucy, 33, 0);
Actor_Set_Health(kActorLucy, 30, 30);
- if (Global_Variable_Query(kVariableBehavior) == 3) {
+ if (Global_Variable_Query(kVariableHollowayArrest) == 3) {
Actor_Set_Goal_Number(kActorSteele, kGoalSteeleHF02ConfrontLucy);
}
break;
@@ -280,9 +280,9 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
switch (newGoalNumber) {
case kGoalLucyMoveAround:
- if (Global_Variable_Query(kVariableBehavior) == 3) {
+ if (Global_Variable_Query(kVariableHollowayArrest) == 3) {
if (Game_Flag_Query(591)
- && Game_Flag_Query(592)
+ && Game_Flag_Query(kFlagGordoRanWay)
&& Player_Query_Current_Scene() != kSceneHF03
) {
Actor_Set_Goal_Number(kActorLucy, kGoalLucyGoToHF03);
@@ -426,7 +426,7 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorLucy, 370, 14);
Actor_Set_Goal_Number(kActorLucy, kGoalLucyHF04WalkAway);
- if (Global_Variable_Query(kVariableBehavior) == 3) {
+ if (Global_Variable_Query(kVariableHollowayArrest) == 3) {
Actor_Set_Goal_Number(kActorSteele, kGoalSteeleHF02LucyRanAway);
Game_Flag_Set(kFlagLucyRanAway);
}
@@ -469,7 +469,7 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
case 240: // not used anywhere
- if (Global_Variable_Query(kVariableBehavior) == 3) {
+ if (Global_Variable_Query(kVariableHollowayArrest) == 3) {
Actor_Set_Goal_Number(kActorLucy, kGoalLucyDead);
Actor_Set_Goal_Number(kActorSteele, kGoalSteeleHF02ConfrontLucy);
} else {
diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp
index 120d322195..b532088f5a 100644
--- a/engines/bladerunner/script/ai/mccoy.cpp
+++ b/engines/bladerunner/script/ai/mccoy.cpp
@@ -271,7 +271,7 @@ void AIScriptMcCoy::Retired(int byActorId) {
if (byActorId == kActorSteele && Actor_Query_In_Set(kActorSteele, kSetHF06)) {
if (Actor_Query_In_Set(kActorDektora, kSetHF06) && Actor_Query_Goal_Number(kActorDektora) != 599) {
Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorDektora, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false);
- } else if (Actor_Query_In_Set(kActorLucy, kSetHF06) && Actor_Query_Goal_Number(kActorLucy) != 599) {
+ } else if (Actor_Query_In_Set(kActorLucy, kSetHF06) && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead) {
Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, kActorLucy, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false);
}
}
@@ -284,11 +284,11 @@ void AIScriptMcCoy::Retired(int byActorId) {
Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorDektora, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false);
}
- if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerLeary, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != 599) {
+ if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerLeary, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead) {
Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, kActorCombatStateUncover, true, kActorLucy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false);
}
- if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerGrayford, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != 599) {
+ if (Actor_Query_In_Set(kActorMcCoy, kSetHF05) && Actor_Query_In_Set(kActorOfficerGrayford, kSetHF05) && Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead) {
Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateUncover, true, kActorLucy, 4, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 25, 300, false);
}
}
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index a690c74c44..3d9e0e17b8 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -129,15 +129,15 @@ bool AIScriptSteele::Update() {
break;
}
- if (Actor_Query_Goal_Number(kActorSteele) < 205) {
- Actor_Set_Goal_Number(kActorSteele, 205);
+ if (Actor_Query_Goal_Number(kActorSteele) < kGoalSteeleStartChapter3) {
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleStartChapter3);
}
- if (Actor_Query_Goal_Number(kActorSteele) == 251
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01TalkToGordo
&& Player_Query_Current_Scene() == kSceneNR01
&& Actor_Query_In_Between_Two_Actors(kActorMcCoy, kActorSteele, kActorGordo)
) {
- Actor_Set_Goal_Number(kActorSteele, 255);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01ShootMcCoy);
}
if (Actor_Query_Goal_Number(kActorSteele) == 213) {
@@ -145,13 +145,13 @@ bool AIScriptSteele::Update() {
return true;
}
- if (Actor_Query_Goal_Number(kActorSteele) == 261) {
- Actor_Set_Goal_Number(kActorSteele, 262);
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01PrepareTalkAboutShotGun) {
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01TalkAboutShotGun);
return true;
}
- if (Actor_Query_Goal_Number(kActorSteele) == 271) {
- Actor_Set_Goal_Number(kActorSteele, 270);
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01PrepareShotByMcCoy) {
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01ShotByMcCoy);
return true;
}
@@ -178,7 +178,7 @@ bool AIScriptSteele::Update() {
break;
}
- if ( Actor_Query_Goal_Number(kActorSteele) == 599
+ if ( Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleDead
&& !Actor_Query_In_Set(kActorSteele, kSetFreeSlotI)
) {
if (Actor_Query_Which_Set_In(kActorMcCoy) != Actor_Query_Which_Set_In(kActorSteele)) {
@@ -355,7 +355,7 @@ void AIScriptSteele::ReceivedClue(int clueId, int fromActorId) {
void AIScriptSteele::ClickedByPlayer() {
int goal = Actor_Query_Goal_Number(kActorSteele);
- if (goal == 599) {
+ if (goal == kGoalSteeleDead) {
Actor_Face_Actor(kActorMcCoy, kActorSteele, true);
Actor_Says(kActorMcCoy, 8630, 14);
return; //true;
@@ -373,7 +373,7 @@ void AIScriptSteele::ClickedByPlayer() {
return; //true;
}
- if (goal == 250) {
+ if (goal == kGoalSteeleNR01ConfrontGordo) {
return; //true;
}
}
@@ -477,8 +477,8 @@ void AIScriptSteele::ShotAtAndMissed() {
}
bool AIScriptSteele::ShotAtAndHit() {
- if (Actor_Query_Goal_Number(kActorSteele) == 251) {
- Actor_Set_Goal_Number(kActorSteele, 271);
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01TalkToGordo) {
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01PrepareShotByMcCoy);
}
if (/* !a1 && */ Actor_Query_In_Set(kActorSteele, kSetHF06))
@@ -488,16 +488,16 @@ bool AIScriptSteele::ShotAtAndHit() {
}
void AIScriptSteele::Retired(int byActorId) {
- Game_Flag_Set(646);
+ Game_Flag_Set(kFlagSteeleDead);
if (Actor_Query_Goal_Number(kActorSteele) == 450) {
Scene_Exits_Enable();
Game_Flag_Set(484);
}
- if (Actor_Query_Goal_Number(kActorSteele) != 599) {
- Actor_Change_Animation_Mode(kActorSteele, 49);
- Actor_Set_Goal_Number(kActorSteele, 599);
+ if (Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleDead) {
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatDie);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleDead);
}
}
@@ -556,7 +556,7 @@ double AIScriptSteele::comp_distance(int actorId, float a5, float a6, int a1, fl
}
bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
- if (currentGoalNumber == 599)
+ if (currentGoalNumber == kGoalSteeleDead)
return false;
switch (newGoalNumber) {
@@ -835,15 +835,15 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Flush(kActorSteele);
return true;
- case 205:
+ case kGoalSteeleStartChapter3:
if (Query_Score(kActorMcCoy) > Query_Score(kActorSteele)
&& Query_Score(kActorMcCoy) < 75
) {
Set_Score(kActorSteele, Random_Query(2, 5) + Query_Score(kActorMcCoy));
}
- if (Game_Flag_Query(kFlagRC04Locked)) {
- Game_Flag_Set(643);
+ if (Game_Flag_Query(kFlagBulletBobDead)) {
+ Game_Flag_Set(kFlagSteeleKnowsBulletBobIsDead);
}
AI_Movement_Track_Flush(kActorSteele);
@@ -866,7 +866,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Countdown_Timer_Reset(kActorSteele, 0);
Player_Loses_Control();
- if (Actor_Query_Goal_Number(kActorDektora) == 250) {
+ if (Actor_Query_Goal_Number(kActorDektora) == kGoalSteeleNR01ConfrontGordo) {
Async_Actor_Walk_To_XYZ(kActorMcCoy, -15.53f, 0.33f, 73.49f, 0, 0);
}
Actor_Put_In_Set(kActorSteele, kSetNR11);
@@ -922,17 +922,17 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case 215:
Game_Flag_Set(635);
- Actor_Change_Animation_Mode(kActorSteele, 6);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack);
Scene_Exits_Disable();
return true;
- case 230:
+ case kGoalSteeleNR01WaitForMcCoy:
AI_Movement_Track_Flush(kActorSteele);
Actor_Put_In_Set(kActorSteele, kSetNR01);
Actor_Set_At_XYZ(kActorSteele, 94.03f, 23.88f, -794.46f, 685);
return true;
- case 231:
+ case kGoalSteeleNR01GoToNR08:
AI_Movement_Track_Flush(kActorSteele);
Actor_Put_In_Set(kActorSteele, kSetNR05_NR08);
Actor_Set_At_XYZ(kActorSteele, -1034.09f, 0.32f, 224.77f, 440);
@@ -940,12 +940,12 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Set_Enter(kSetNR05_NR08, kSceneNR08);
return true;
- case 232:
+ case kGoalSteeleNR01GoToNR02:
Game_Flag_Set(kFlagNR01toNR02);
Set_Enter(kSetNR02, kSceneNR02);
return true;
- case kGoalSteeleHF03ApproachLucy:
+ case kGoalSteeleNR01GoToHF03:
Game_Flag_Set(kFlagHF01toHF03);
Game_Flag_Reset(kFlagMcCoyInNightclubRow);
Game_Flag_Set(kFlagMcCoyInHysteriaHall);
@@ -1089,7 +1089,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
return true;
- case 250:
+ case kGoalSteeleNR01ConfrontGordo:
AI_Movement_Track_Flush(kActorSteele);
Actor_Put_In_Set(kActorSteele, kSetNR01);
Actor_Set_At_XYZ(kActorSteele, 94.03f, 23.88f, -794.46f, 685);
@@ -1097,22 +1097,22 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagSpinnerAtHF01);
}
- Game_Flag_Set(603);
+ Game_Flag_Set(kFlagSteeleAimingAtGordo);
Actor_Change_Animation_Mode(kActorSteele, kAnimationModeIdle);
_var1 = 3;
return true;
- case 251:
+ case kGoalSteeleNR01TalkToGordo:
Actor_Set_Targetable(kActorSteele, true);
return true;
- case 252:
+ case kGoalSteeleNR01ShootGordo:
Player_Loses_Control();
Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack);
Sound_Play(27, 100, 0, 0, 50);
- Game_Flag_Reset(603);
+ Game_Flag_Reset(kFlagSteeleAimingAtGordo);
Actor_Set_Targetable(kActorSteele, false);
- Actor_Set_Goal_Number(kActorGordo, 299);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01Die);
Delay(1500);
Player_Set_Combat_Mode(false);
Actor_Says(kActorSteele, 1070, 14);
@@ -1123,7 +1123,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorMcCoy, 3065, 18);
Actor_Says(kActorSteele, 1280, 13);
Actor_Says(kActorSteele, 1290, 13);
- Game_Flag_Set(592);
+ Game_Flag_Set(kFlagGordoRanWay);
Player_Gains_Control();
if (Game_Flag_Query(kFlagSpinnerAtHF01)) {
Actor_Put_In_Set(kActorSteele, kSetHF01);
@@ -1137,21 +1137,21 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
return true;
- case 255:
+ case kGoalSteeleNR01ShootMcCoy:
ADQ_Flush();
Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack);
Sound_Play(27, 100, 0, 0, 50);
Actor_Force_Stop_Walking(kActorMcCoy);
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
- Actor_Retired_Here(kActorMcCoy, 12, 12, 1, -1);
- Actor_Set_Goal_Number(kActorGordo, 251);
+ Actor_Retired_Here(kActorMcCoy, 12, 12, true, -1);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01ReleaseHostage);
Actor_Says(kActorSteele, 1250, kAnimationModeTalk);
return true;
- case 258:
- Game_Flag_Reset(603);
+ case kGoalSteeleNR01McCoyShotGordo:
+ Game_Flag_Reset(kFlagSteeleAimingAtGordo);
ADQ_Flush();
- Game_Flag_Set(592);
+ Game_Flag_Set(kFlagGordoRanWay);
Actor_Set_Targetable(kActorSteele, false);
Delay(1000);
Player_Set_Combat_Mode(false);
@@ -1177,20 +1177,20 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Goal_Number(kActorSteele, kGoalSteeleTalkAboutMissingSpinner);
return true;
- case 260:
+ case kGoalSteeleNR01McCoyShotGun:
ADQ_Flush();
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAttack);
Sound_Play(27, 100, 0, 0, 50);
_animationState = 38;
_animationFrame = 0;
- Actor_Set_Goal_Number(kActorGordo, 251);
- Game_Flag_Reset(603);
- Game_Flag_Set(592);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01ReleaseHostage);
+ Game_Flag_Reset(kFlagSteeleAimingAtGordo);
+ Game_Flag_Set(kFlagGordoRanWay);
Actor_Set_Targetable(kActorSteele, false);
Player_Loses_Control();
return true;
- case 262:
+ case kGoalSteeleNR01TalkAboutShotGun:
Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
Actor_Says(kActorSteele, 1160, 15);
Actor_Face_Actor(kActorMcCoy, kActorSteele, true);
@@ -1212,14 +1212,14 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Goal_Number(kActorSteele, kGoalSteeleTalkAboutMissingSpinner);
return true;
- case 270:
+ case kGoalSteeleNR01ShotByMcCoy:
ADQ_Flush();
Player_Loses_Control();
- Game_Flag_Reset(603);
- Actor_Set_Targetable(kActorSteele, 0);
- Actor_Set_Goal_Number(kActorGordo, 251);
+ Game_Flag_Reset(kFlagSteeleAimingAtGordo);
+ Actor_Set_Targetable(kActorSteele, false);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01ReleaseHostage);
Actor_Start_Speech_Sample(kActorSteele, 1150);
- Actor_Change_Animation_Mode(kActorSteele, 49);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatDie);
Delay(5000);
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
return true;
@@ -1279,7 +1279,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
return true;
- case 285:
+ case kGoalSteeleImmediatelyStartChapter4:
Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01StartChapter4);
return true;
@@ -1332,7 +1332,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Change_Animation_Mode(kActorSteele, 4);
Actor_Face_Actor(kActorMcCoy, kActorSteele, 1);
Delay(3000);
- Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, 0);
+ Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, false);
return true;
case 411:
@@ -1340,7 +1340,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorSteele, 430, 14);
Actor_Change_Animation_Mode(kActorSteele, 4);
Delay(4000);
- Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, 0);
+ Async_Actor_Walk_To_XYZ(kActorSteele, -109.0f, -36.55f, 26.0f, 0, false);
return true;
case 412:
@@ -1348,7 +1348,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case 413:
- Async_Actor_Walk_To_XYZ(kActorSteele, 1.0, -36.55f, 111.0f, 0, 0);
+ Async_Actor_Walk_To_XYZ(kActorSteele, 1.0, -36.55f, 111.0f, 0, false);
return true;
case 415:
@@ -1359,8 +1359,8 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case 416:
Actor_Set_At_XYZ(kActorSteele, -48.83f, -36.55f, 69.98f, 280);
- Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 36, 0, 1);
- Actor_Face_Actor(kActorMcCoy, kActorSteele, 1);
+ Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 36, false, true);
+ Actor_Face_Actor(kActorMcCoy, kActorSteele, true);
if (Game_Flag_Query(653) == 1) {
Actor_Says(kActorSteele, 400, 3);
Actor_Says(kActorMcCoy, 2165, 14);
@@ -1378,17 +1378,17 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case 418:
- Actor_Face_Actor(kActorSteele, kActorMcCoy, 1);
- Actor_Change_Animation_Mode(kActorSteele, 6);
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
- Actor_Retired_Here(kActorMcCoy, 72, 18, 1, -1);
+ Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
+ Actor_Retired_Here(kActorMcCoy, 72, 18, true, -1);
return true;
case 419:
- Actor_Set_Targetable(kActorSteele, 0);
- Game_Flag_Set(646);
- Actor_Set_Goal_Number(kActorSteele, 599);
- Actor_Retired_Here(kActorSteele, 60, 12, 1, -1);
+ Actor_Set_Targetable(kActorSteele, false);
+ Game_Flag_Set(kFlagSteeleDead);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleDead);
+ Actor_Retired_Here(kActorSteele, 60, 12, true, -1);
return true;
case 420:
@@ -1402,7 +1402,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Delay(2000);
Actor_Face_Actor(kActorSteele, kActorMcCoy, 1);
Actor_Says(kActorSteele, 360, -1);
- Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 48, 0, 0);
+ Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 48, false, false);
Actor_Says(kActorMcCoy, 2150, 14);
Actor_Says(kActorSteele, 370, 15);
Actor_Says(kActorMcCoy, 2155, 12);
@@ -1480,7 +1480,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(74)) {
_animationFrame = 0;
- if (Game_Flag_Query(482) == 1) {
+ if (Game_Flag_Query(482)) {
_animationState = 41;
_var1 = 1;
_var2 = 0;
@@ -1489,23 +1489,27 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 1:
_animationFrame = 0;
*animation = _animationNext;
_animationState = _animationStateNext;
break;
+
case 2:
*animation = 67;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(67))
_animationFrame = 0;
break;
+
case 3:
*animation = 68;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(68))
_animationFrame = 0;
break;
+
case 4:
*animation = 59;
_animationFrame++;
@@ -1513,6 +1517,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 5:
*animation = 60;
_animationFrame++;
@@ -1520,6 +1525,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 6:
*animation = 69;
_animationFrame++;
@@ -1527,6 +1533,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 7:
*animation = 70;
_animationFrame++;
@@ -1534,6 +1541,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 8:
*animation = 62;
_animationFrame++;
@@ -1541,6 +1549,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 9:
*animation = 63;
_animationFrame++;
@@ -1548,11 +1557,12 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 10:
*animation = 83;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(83)) {
- Actor_Change_Animation_Mode(kActorSteele, 0);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeIdle);
*animation = 74;
_animationFrame = 0;
_animationState = 0;
@@ -1561,6 +1571,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 11:
*animation = 84;
_animationFrame++;
@@ -1568,6 +1579,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 12:
*animation = 85;
_animationFrame++;
@@ -1575,6 +1587,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 13:
*animation = 86;
_animationFrame++;
@@ -1583,6 +1596,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationState = 0;
}
break;
+
case 14:
*animation = 77;
if (!_animationFrame && _flag) {
@@ -1597,6 +1611,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 15:
*animation = 78;
_animationFrame++;
@@ -1606,6 +1621,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
*animation = 77;
}
break;
+
case 16:
*animation = 79;
_animationFrame++;
@@ -1615,6 +1631,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
*animation = 77;
}
break;
+
case 17:
*animation = 80;
_animationFrame++;
@@ -1624,6 +1641,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
*animation = 77;
}
break;
+
case 18:
*animation = 81;
_animationFrame++;
@@ -1633,6 +1651,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
*animation = 77;
}
break;
+
case 19:
*animation = 81;
_animationFrame++;
@@ -1642,13 +1661,14 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
*animation = 77;
}
break;
+
case 20:
*animation = 82;
if (!_animationFrame && _flag) {
_animationFrame = 0;
_animationState = 23;
*animation = 66;
- Actor_Change_Animation_Mode(kActorSteele, 4);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle);
_flag = 0;
} else {
_animationFrame++;
@@ -1657,6 +1677,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 21:
*animation = 82;
_animationFrame++;
@@ -1666,6 +1687,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
*animation = 82;
}
break;
+
case 22:
*animation = 82;
_animationFrame++;
@@ -1675,6 +1697,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
*animation = 82;
}
break;
+
case 23:
*animation = 54;
_animationFrame++;
@@ -1682,6 +1705,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 24:
*animation = 65;
_animationFrame++;
@@ -1691,6 +1715,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationState = 0;
}
break;
+
case 25:
*animation = 64;
_animationFrame++;
@@ -1700,6 +1725,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
*animation = 54;
}
break;
+
case 26:
*animation = 66;
_animationFrame++;
@@ -1720,15 +1746,16 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 23;
*animation = 54;
- Actor_Change_Animation_Mode(kActorSteele, 4);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle);
if (Actor_Query_Goal_Number(kActorSteele) == 215) {
- Actor_Change_Animation_Mode(kActorSteele, 6);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack);
_animationState = 26;
_animationFrame = 0;
*animation = 66;
}
}
break;
+
case 27:
*animation = 55;
_animationFrame++;
@@ -1736,9 +1763,10 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 23;
*animation = 54;
- Actor_Change_Animation_Mode(kActorSteele, 4);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle);
}
break;
+
case 28:
*animation = 56;
_animationFrame++;
@@ -1746,9 +1774,10 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 23;
*animation = 54;
- Actor_Change_Animation_Mode(kActorSteele, 4);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle);
}
break;
+
case 29:
*animation = 57;
_animationFrame++;
@@ -1756,9 +1785,10 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 23;
*animation = 54;
- Actor_Change_Animation_Mode(kActorSteele, 4);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle);
}
break;
+
case 30:
*animation = 58;
_animationFrame++;
@@ -1766,9 +1796,10 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 23;
*animation = 54;
- Actor_Change_Animation_Mode(kActorSteele, 4);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle);
}
break;
+
case 31:
*animation = 71;
_animationFrame++;
@@ -1776,9 +1807,10 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
*animation = 74;
_animationFrame = 0;
_animationState = 0;
- Actor_Change_Animation_Mode(kActorSteele, 0);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeIdle);
}
break;
+
case 32:
*animation = 72;
_animationFrame++;
@@ -1786,24 +1818,28 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
*animation = 74;
_animationFrame = 0;
_animationState = 0;
- Actor_Change_Animation_Mode(kActorSteele, 0);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeIdle);
}
break;
+
case 33:
*animation = 61;
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(61) - 1)
_animationFrame++;
break;
+
case 34:
*animation = 73;
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(73) - 1)
_animationFrame++;
break;
+
case 35:
*animation = 61;
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(61) - 1)
_animationFrame++;
break;
+
case 36:
*animation = 88;
_animationFrame++;
@@ -1811,6 +1847,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 37:
if (!_animationFrame && _flag) {
_animationFrame = 0;
@@ -1826,17 +1863,19 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 38:
*animation = 90;
_animationFrame++;
if (_animationFrame > 5) {
- Actor_Change_Animation_Mode(kActorSteele, 0);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeIdle);
_animationState = 0;
_animationFrame = 0;
*animation = 74;
- Actor_Set_Goal_Number(kActorSteele, 261);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01PrepareTalkAboutShotGun);
}
break;
+
case 39:
*animation = 92;
_animationFrame++;
@@ -1846,6 +1885,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
*animation = 88;
}
break;
+
case 40:
*animation = 91;
_animationFrame++;
@@ -1856,6 +1896,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_var1 = 0;
}
break;
+
case 41:
if (_var1 > 3) {
break;
@@ -1906,6 +1947,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
default:
*animation = 406;
_animationFrame = 0;
@@ -1919,7 +1961,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
bool AIScriptSteele::ChangeAnimationMode(int mode) {
switch (mode) {
case kGoalSteeleDefault:
- if (Game_Flag_Query(603)) {
+ if (Game_Flag_Query(kFlagSteeleAimingAtGordo)) {
_var1 = 3;
} else {
_var1 = 0;
@@ -1967,9 +2009,15 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
break;
}
break;
- case 1:
- if ((_animationState != 4 && _animationState != 23 && _animationState != 25 && _animationState != 26)
- || _animationState > 26) {
+
+ case kAnimationModeWalk:
+ if ((_animationState != 4
+ && _animationState != 23
+ && _animationState != 25
+ && _animationState != 26
+ )
+ || _animationState > 26
+ ) {
if (Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleApprehendIzo
&& Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleArrestIzo
) {
@@ -1984,7 +2032,8 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
- case 2:
+
+ case kAnimationModeRun:
if (Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleApprehendIzo
&& Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleArrestIzo
&& _animationState != 23
@@ -1996,9 +2045,10 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
- case 3:
+
+ case kAnimationModeTalk:
if (_animationState != 35) {
- if (Game_Flag_Query(603)) {
+ if (Game_Flag_Query(kFlagSteeleAimingAtGordo)) {
_animationState = 37;
_animationFrame = 0;
_flag = 0;
@@ -2016,9 +2066,13 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
}
}
break;
- case 4:
+
+ case kAnimationModeCombatIdle:
if (_animationState) {
- if (_animationState > 25 || (_animationState != 23 && _animationState != 25)) {
+ if (_animationState > 25
+ || (_animationState != 23
+ && _animationState != 25)
+ ) {
_animationState = 23;
_animationFrame = 0;
}
@@ -2027,22 +2081,26 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
_animationFrame = 0;
}
break;
- case 6:
- if (Game_Flag_Query(603)) {
+
+ case kAnimationModeCombatAttack:
+ if (Game_Flag_Query(kFlagSteeleAimingAtGordo)) {
_animationState = 39;
} else {
_animationState = 26;
}
_animationFrame = 0;
break;
- case 7:
+
+ case kAnimationModeCombatWalk:
_animationState = 4;
_animationFrame = 0;
break;
- case 8:
+
+ case kAnimationModeCombatRun:
_animationState = 5;
_animationFrame = 0;
break;
+
case 12:
if (_animationState) {
_animationState = 15;
@@ -2055,6 +2113,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
}
_flag = 0;
break;
+
case 13:
if (_animationState) {
_animationState = 16;
@@ -2067,6 +2126,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
}
_flag = 0;
break;
+
case 14:
if (_animationState) {
_animationState = 17;
@@ -2079,6 +2139,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
}
_flag = 0;
break;
+
case 15:
if (_animationState) {
_animationState = 18;
@@ -2091,6 +2152,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
}
_flag = 0;
break;
+
case 16:
if (_animationState) {
_animationState = 19;
@@ -2103,7 +2165,8 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
}
_flag = 0;
break;
- case 21:
+
+ case kAnimationModeHit:
if (_animationState > 28) {
if (Random_Query(0, 1)) {
_animationState = 31;
@@ -2117,7 +2180,8 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
- case 22:
+
+ case kAnimationModeCombatHit:
if (Random_Query(0, 1)) {
_animationState = 29;
} else {
@@ -2125,6 +2189,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
case 43:
Game_Flag_Set(482);
_animationState = 41;
@@ -2132,25 +2197,37 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
_var2 = 0;
_var1 = 1;
break;
- case 44:
+
+ case kAnimationModeWalkUp:
_animationState = 6;
_animationFrame = 0;
break;
- case 45:
+
+ case kAnimationModeWalkDown:
_animationState = 7;
_animationFrame = 0;
break;
- case 46:
+
+ case kAnimationModeCombatWalkUp:
_animationState = 8;
_animationFrame = 0;
break;
- case 47:
+
+ case kAnimationModeCombatWalkDown:
_animationState = 9;
_animationFrame = 0;
break;
- case 48:
- if (_animationState != 33 && _animationState != 34) {
- if (_animationState > 26 || (_animationState != 23 && _animationState != 25 && _animationState != 26)) {
+
+ case kAnimationModeDie:
+ if (_animationState != 33
+ && _animationState != 34
+ ) {
+ if (_animationState > 26
+ || (_animationState != 23
+ && _animationState != 25
+ && _animationState != 26
+ )
+ ) {
_animationState = 34;
_animationFrame = 0;
} else {
@@ -2159,31 +2236,37 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
}
}
break;
- case 49:
+
+ case kAnimationModeCombatDie:
if (_animationState != 33) {
_animationState = 33;
_animationFrame = 0;
}
break;
+
case 51:
_animationState = 35;
_animationFrame = 0;
break;
+
case 58:
_animationState = 20;
_animationFrame = 0;
_flag = 0;
break;
+
case 59:
_animationState = 21;
_animationFrame = 0;
_flag = 0;
break;
+
case 60:
_animationState = 22;
_animationFrame = 0;
_flag = 0;
break;
+
case 86:
_animationState = 10;
_animationFrame = 0;
diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp
index 6155a27e3b..eb7de88d99 100644
--- a/engines/bladerunner/script/ai/zuben.cpp
+++ b/engines/bladerunner/script/ai/zuben.cpp
@@ -103,7 +103,7 @@ bool AIScriptZuben::Update() {
Game_Flag_Set(kFlagCT05WarehouseOpen);
Actor_Set_Targetable(kActorZuben, true);
if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoDefault) {
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoLeaveCT01);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT01Leave);
}
return true;
}
@@ -1175,7 +1175,7 @@ void AIScriptZuben::FledCombat() {
void AIScriptZuben::dialogue() {
Dialogue_Menu_Clear_List();
DM_Add_To_List_Never_Repeat_Once_Selected(1490, 5, 5, -1);
- if (Actor_Query_Goal_Number(kActorLucy) != 599) {
+ if (Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead) {
DM_Add_To_List_Never_Repeat_Once_Selected(1500, 5, 5, 5);
}
DM_Add_To_List_Never_Repeat_Once_Selected(1510, -1, 5, 5);
diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h
index d137e3c86e..fc7a0b1417 100644
--- a/engines/bladerunner/script/ai_script.h
+++ b/engines/bladerunner/script/ai_script.h
@@ -137,7 +137,7 @@ DECLARE_SCRIPT(Gordo)
int _frameMax;
int _state;
- void McCoyTalkWithGordo();
+ void talkToMcCoyInCity();
void talkToMcCoyAtNR02();
void dialogue2();
void dialogue1();
diff --git a/engines/bladerunner/script/init_script.cpp b/engines/bladerunner/script/init_script.cpp
index 9364df886e..91338738df 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(kVariableBehavior, 1);
+ Global_Variable_Set(kVariableHollowayArrest, 1);
} else if ( Game_Flag_Query(kFlagGordoIsReplicant)
&& !Game_Flag_Query(kFlagLucyIsReplicant)
) {
- Global_Variable_Set(kVariableBehavior, 2);
+ Global_Variable_Set(kVariableHollowayArrest, 2);
} else if (!Game_Flag_Query(kFlagGordoIsReplicant)
&& Game_Flag_Query(kFlagLucyIsReplicant)
) {
- Global_Variable_Set(kVariableBehavior, 3);
+ Global_Variable_Set(kVariableHollowayArrest, 3);
} else if (Random_Query(1, 2) == 1) {
- Global_Variable_Set(kVariableBehavior, 2);
+ Global_Variable_Set(kVariableHollowayArrest, 2);
} else {
- Global_Variable_Set(kVariableBehavior, 3);
+ Global_Variable_Set(kVariableHollowayArrest, 3);
}
Game_Flag_Set(kFlagMcCoyInRunciters);
diff --git a/engines/bladerunner/script/scene/ct05.cpp b/engines/bladerunner/script/scene/ct05.cpp
index 2c5c908e39..1fc53f825e 100644
--- a/engines/bladerunner/script/scene/ct05.cpp
+++ b/engines/bladerunner/script/scene/ct05.cpp
@@ -233,10 +233,10 @@ void SceneScriptCT05::PlayerWalkedIn() {
Loop_Actor_Travel_Stairs(kActorMcCoy, 10, false, kAnimationModeIdle);
Game_Flag_Reset(kFlagCT06toCT05);
Footstep_Sound_Override_Off();
- if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoLeftCT01
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoCT01Left
&& Game_Flag_Query(kFlagCT06ZubenPhoto)
) {
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoWalkThroughCT05);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoCT05WalkThrough);
}
}
}
diff --git a/engines/bladerunner/script/scene/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp
index 18b3ac2e38..a91f55b7ec 100644
--- a/engines/bladerunner/script/scene/hf01.cpp
+++ b/engines/bladerunner/script/scene/hf01.cpp
@@ -344,7 +344,7 @@ void SceneScriptHF01::PlayerWalkedIn() {
) {
if (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallLucy1)
&& Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy
- && Actor_Query_Goal_Number(kActorLucy) != 599
+ && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead
) {
Actor_Put_In_Set(kActorLucy, kSetHF01);
Actor_Set_At_XYZ(kActorLucy, -5.0f, 8.0f, -622.0f, 419);
@@ -421,7 +421,7 @@ void SceneScriptHF01::PlayerWalkedOut() {
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);
+ Actor_Set_Goal_Number(kActorLucy, kGoalLucyDead);
}
if (Actor_Query_Goal_Number(kActorDektora) == 450) {
diff --git a/engines/bladerunner/script/scene/hf03.cpp b/engines/bladerunner/script/scene/hf03.cpp
index 849f75feec..4e1177ffd1 100644
--- a/engines/bladerunner/script/scene/hf03.cpp
+++ b/engines/bladerunner/script/scene/hf03.cpp
@@ -78,7 +78,7 @@ void SceneScriptHF03::dialogueWithLucy() {
switch (answer) {
case 840: // VOIGT-KAMPFF
Actor_Says(kActorMcCoy, 1630, 15);
- if (Global_Variable_Query(kVariableBehavior) == 3) {
+ if (Global_Variable_Query(kVariableHollowayArrest) == 3) {
Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunAwayWithHelp1);
} else if (Game_Flag_Query(kFlagLucyIsReplicant)) {
Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunToHF041);
@@ -96,7 +96,7 @@ void SceneScriptHF03::dialogueWithLucy() {
case 860: // CRYSTAL
Actor_Says(kActorMcCoy, 1640, 12);
- if (Global_Variable_Query(kVariableBehavior) == 3) {
+ if (Global_Variable_Query(kVariableHollowayArrest) == 3) {
Actor_Set_Goal_Number(kActorLucy, kGoalLucyRunAwayWithHelp1);
} else {
Actor_Says(kActorLucy, 210, 13);
diff --git a/engines/bladerunner/script/scene/hf04.cpp b/engines/bladerunner/script/scene/hf04.cpp
index 14cad2f76a..6d30563cc2 100644
--- a/engines/bladerunner/script/scene/hf04.cpp
+++ b/engines/bladerunner/script/scene/hf04.cpp
@@ -65,7 +65,7 @@ void SceneScriptHF04::SceneLoaded() {
if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyRunToHF042) {
if (Actor_Clue_Query(kActorLucy, kClueMcCoyHelpedLucy)
- && Global_Variable_Query(kVariableBehavior) != 3
+ && Global_Variable_Query(kVariableHollowayArrest) != 3
) {
Game_Flag_Set(kFlagLucyRanAway);
} else {
diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp
index 8ad33f13bd..c78bf71ab2 100644
--- a/engines/bladerunner/script/scene/hf05.cpp
+++ b/engines/bladerunner/script/scene/hf05.cpp
@@ -384,7 +384,7 @@ void SceneScriptHF05::dialogueWithCrazylegs1() {
DM_Add_To_List_Never_Repeat_Once_Selected(1200, 5, 5, 3); // WOMAN'S PHOTO
}
if (Actor_Clue_Query(kActorMcCoy, kClueLucy)
- && Actor_Query_Goal_Number(kActorLucy) != 599
+ && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead
) {
DM_Add_To_List_Never_Repeat_Once_Selected(1210, 4, 6, 2); // LUCY'S PHOTO
}
@@ -565,7 +565,7 @@ int SceneScriptHF05::getAffectionTowardsActor() {
return kActorDektora;
}
if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy
- && Actor_Query_Goal_Number(kActorLucy) != 599
+ && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead
) {
return kActorLucy;
}
@@ -750,7 +750,7 @@ int SceneScriptHF05::sub_4048C0() {
}
if (Actor_Query_In_Set(kActorLucy, kSetHF05)
- && Actor_Query_Goal_Number(kActorLucy) != 599
+ && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead
) {
return kActorLucy;
}
diff --git a/engines/bladerunner/script/scene/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp
index 64ea124b2e..7b5fd44b4a 100644
--- a/engines/bladerunner/script/scene/hf06.cpp
+++ b/engines/bladerunner/script/scene/hf06.cpp
@@ -77,7 +77,7 @@ bool SceneScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Says(kActorDektora, 210, 12);
Actor_Says(kActorMcCoy, 2125, 12);
} else if (Actor_Query_In_Set(kActorLucy, kSetHF06)
- && Actor_Query_Goal_Number(kActorLucy) != 599
+ && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead
) {
Actor_Face_Actor(kActorLucy, kActorMcCoy, true);
Actor_Says(kActorLucy, 490, 18);
@@ -111,7 +111,7 @@ bool SceneScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) {
bool SceneScriptHF06::ClickedOnActor(int actorId) {
if (actorId == kActorLucy
- && Actor_Query_Goal_Number(kActorLucy) != 599
+ && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead
) {
Actor_Face_Actor(kActorLucy, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorLucy, true);
@@ -175,7 +175,7 @@ void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
) {
otherActorId = kActorDektora;
} else if (Actor_Query_In_Set(kActorLucy, kSetHF06)
- && Actor_Query_Goal_Number(kActorLucy) == 599
+ && Actor_Query_Goal_Number(kActorLucy) == kGoalLucyDead
) {
otherActorId = kActorLucy;
}
@@ -211,7 +211,7 @@ void SceneScriptHF06::PlayerWalkedIn() {
if (Game_Flag_Query(662)) {
int actorId = -1;
if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy
- && Actor_Query_Goal_Number(kActorLucy) != 599
+ && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead
) {
actorId = kActorLucy;
} else if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsDektora
diff --git a/engines/bladerunner/script/scene/hf07.cpp b/engines/bladerunner/script/scene/hf07.cpp
index 1eb88677b1..8a8f4eb19a 100644
--- a/engines/bladerunner/script/scene/hf07.cpp
+++ b/engines/bladerunner/script/scene/hf07.cpp
@@ -148,7 +148,7 @@ int SceneScriptHF07::getAffectionTowardsActor() {
return kActorDektora;
}
if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy
- && Actor_Query_Goal_Number(kActorLucy) != 599
+ && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead
) {
return kActorLucy;
}
diff --git a/engines/bladerunner/script/scene/kp07.cpp b/engines/bladerunner/script/scene/kp07.cpp
index d0fc730bce..56b9a91b4e 100644
--- a/engines/bladerunner/script/scene/kp07.cpp
+++ b/engines/bladerunner/script/scene/kp07.cpp
@@ -29,35 +29,48 @@ void SceneScriptKP07::InitializeScene() {
Game_Flag_Reset(578);
Scene_Exit_Add_2D_Exit(0, 315, 185, 381, 285, 0);
if (Game_Flag_Query(653)) {
- if (Game_Flag_Query(kFlagDektoraIsReplicant) && Actor_Query_Goal_Number(kActorDektora) < 599) {
+ if (Game_Flag_Query(kFlagDektoraIsReplicant)
+ && Actor_Query_Goal_Number(kActorDektora) < 599
+ ) {
Actor_Set_Targetable(kActorDektora, true);
Global_Variable_Increment(kVariableReplicants, 1);
Actor_Put_In_Set(kActorDektora, kSetKP07);
Actor_Set_At_XYZ(kActorDektora, -52.0f, -41.52f, -5.0f, 289);
}
+
if (Actor_Query_Goal_Number(kActorZuben) < kGoalZubenDead) {
Global_Variable_Increment(kVariableReplicants, 1);
Actor_Set_Targetable(kActorZuben, true);
Actor_Put_In_Set(kActorZuben, kSetKP07);
Actor_Set_At_XYZ(kActorZuben, -26.0f, -41.52f, -135.0f, 0);
}
- if (Game_Flag_Query(kFlagIzoIsReplicant) && Actor_Query_Goal_Number(kActorIzo) < 599) {
+
+ if (Game_Flag_Query(kFlagIzoIsReplicant)
+ && Actor_Query_Goal_Number(kActorIzo) < 599
+ ) {
Global_Variable_Increment(kVariableReplicants, 1);
Actor_Set_Targetable(kActorIzo, true);
Actor_Put_In_Set(kActorIzo, kSetKP07);
Actor_Set_At_XYZ(kActorIzo, -38.0f, -41.52f, -175.0f, 500);
}
- if (Game_Flag_Query(kFlagGordoIsReplicant) && Actor_Query_Goal_Number(kActorGordo) < 599) {
+
+ if (Game_Flag_Query(kFlagGordoIsReplicant)
+ && Actor_Query_Goal_Number(kActorGordo) < kGoalGordoDead
+ ) {
Global_Variable_Increment(kVariableReplicants, 1);
Actor_Set_Targetable(kActorGordo, true);
Actor_Put_In_Set(kActorGordo, kSetKP07);
Actor_Set_At_XYZ(kActorGordo, 61.0f, -41.52f, -3.0f, 921);
}
- if (Game_Flag_Query(kFlagLucyIsReplicant) && Actor_Query_Goal_Number(kActorLucy) < 599) {
+
+ if (Game_Flag_Query(kFlagLucyIsReplicant)
+ && Actor_Query_Goal_Number(kActorLucy) < kGoalLucyDead
+ ) {
Global_Variable_Increment(kVariableReplicants, 1);
Actor_Put_In_Set(kActorLucy, kSetKP07);
Actor_Set_At_XYZ(kActorLucy, 78.0f, -41.52f, -119.0f, 659);
}
+
if (Actor_Query_Goal_Number(kActorLuther) < 599) {
Global_Variable_Increment(kVariableReplicants, 1);
Actor_Put_In_Set(kActorLuther, kSetKP07);
diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp
index d9300e427e..856960b646 100644
--- a/engines/bladerunner/script/scene/nr01.cpp
+++ b/engines/bladerunner/script/scene/nr01.cpp
@@ -77,12 +77,13 @@ void SceneScriptNR01::InitializeScene() {
Ambient_Sounds_Add_Sound(376, 10, 80, 33, 33, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 10, 80, 33, 33, 0, 0, -101, -101, 0, 0);
- if (Game_Flag_Query(643)
+ if (Game_Flag_Query(kFlagSteeleKnowsBulletBobIsDead)
&& Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01WaitForMcCoy
) {
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagSpinnerAtHF01);
}
+
if ( Game_Flag_Query(kFlagSpinnerAtNR01)
&& !Game_Flag_Query(kFlagArrivedFromSpinner1)
) {
@@ -260,7 +261,7 @@ bool SceneScriptNR01::ClickedOn2DRegion(int region) {
&& Player_Query_Combat_Mode()
) {
Sound_Play(517, 100, 0, 0, 50);
- Actor_Set_Goal_Number(kActorSteele, 260);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01McCoyShotGun);
Scene_2D_Region_Remove(0);
}
@@ -268,8 +269,8 @@ bool SceneScriptNR01::ClickedOn2DRegion(int region) {
&& Player_Query_Combat_Mode()
) {
Sound_Play(517, 100, 0, 0, 50);
- Actor_Set_Goal_Number(kActorGordo, 299);
- Actor_Set_Goal_Number(kActorSteele, 258);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01Die);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01McCoyShotGordo);
Scene_2D_Region_Remove(1);
return true;
}
@@ -298,10 +299,11 @@ void SceneScriptNR01::PlayerWalkedIn() {
//return true;
return;
}
- if (Actor_Query_Goal_Number(kActorSteele) == 250) {
+
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01ConfrontGordo) {
Scene_Exits_Disable();
ADQ_Flush();
- Actor_Set_Goal_Number(kActorSteele, 251);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01TalkToGordo);
Scene_2D_Region_Add(0, 450, 316, 464, 333);
Scene_2D_Region_Add(1, 233, 321, 240, 362);
ADQ_Add(kActorGordo, 70, 81);
@@ -338,92 +340,90 @@ void SceneScriptNR01::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagNR03toNR01)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -380.0f, 31.73f, -841.0f, 0, false, false, 0);
Game_Flag_Reset(kFlagNR03toNR01);
- } else {
- if (Game_Flag_Query(kFlagUG06toNR01)) {
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, true, kAnimationModeIdle);
- Game_Flag_Reset(kFlagUG06toNR01);
- if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01WaitForMcCoy) {
- Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
- Actor_Says(kActorSteele, 1440, 13);
- Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 48, false, true);
- Actor_Says(kActorMcCoy, 3145, 13);
- if (Global_Variable_Query(kVariableBehavior) != 3) {
- Actor_Says(kActorSteele, 1450, 12);
- Actor_Says(kActorSteele, 1460, 13);
- }
- Actor_Says(kActorMcCoy, 3150, 14);
- Actor_Says(kActorSteele, 1470, 12);
- Actor_Says(kActorSteele, 1480, 13);
- Actor_Says(kActorMcCoy, 3155, 15);
- Actor_Says(kActorSteele, 1500, 16);
- Actor_Says(kActorMcCoy, 3160, 12);
- if (Game_Flag_Query(643)) {
- Actor_Says(kActorSteele, 1330, 12);
- Actor_Says(kActorSteele, 1340, 12);
- Actor_Says(kActorSteele, 1350, 12);
- Actor_Says(kActorMcCoy, 3120, 15);
- Actor_Says(kActorSteele, 1360, 12);
- Actor_Says(kActorSteele, 1370, 12);
- Actor_Says(kActorMcCoy, 3125, 15);
- Actor_Says(kActorSteele, 1380, 12);
- Actor_Says(kActorMcCoy, 3130, 15);
- Actor_Says(kActorSteele, 1390, 12);
- Actor_Says(kActorSteele, 1400, 12);
- Actor_Says(kActorSteele, 1410, 12);
- Actor_Says(kActorMcCoy, 3135, 15);
- Actor_Says(kActorSteele, 1420, 12);
- Actor_Says(kActorMcCoy, 3140, 15);
- Actor_Says(kActorSteele, 1430, 12);
- Actor_Set_Goal_Number(kActorSteele, 285);
- } else {
- 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 == 2) {
- Actor_Says(kActorSteele, 1590, 15);
- Actor_Says(kActorMcCoy, 3195, 14);
- Actor_Says(kActorSteele, 1600, 16);
- Actor_Says(kActorMcCoy, 3200, 13);
- Actor_Says(kActorSteele, 1610, 17);
- Actor_Says(kActorSteele, 1620, 15);
- Actor_Says(kActorSteele, 1630, 14);
- Actor_Says(kActorMcCoy, 3205, 12);
- Actor_Set_Goal_Number(kActorSteele, 232);
- } else if (v0 == 3) {
- Actor_Says(kActorSteele, 1540, 15);
- Actor_Says(kActorMcCoy, 3175, 13);
- Actor_Says(kActorSteele, 1550, 13);
- Actor_Says(kActorSteele, 1560, 16);
- Actor_Says(kActorMcCoy, 3180, 15);
- Actor_Says(kActorSteele, 1570, 12);
- Actor_Says(kActorSteele, 1580, 14);
- Actor_Says(kActorMcCoy, 3190, 12);
- Actor_Set_Goal_Number(kActorSteele, kGoalSteeleHF03ApproachLucy);
- }
- }
+ } else if (Game_Flag_Query(kFlagUG06toNR01)) {
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, true, kAnimationModeIdle);
+ Game_Flag_Reset(kFlagUG06toNR01);
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01WaitForMcCoy) {
+ Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
+ Actor_Says(kActorSteele, 1440, 13);
+ Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 48, false, true);
+ Actor_Says(kActorMcCoy, 3145, 13);
+ if (Global_Variable_Query(kVariableHollowayArrest) != 3) {
+ Actor_Says(kActorSteele, 1450, 12);
+ Actor_Says(kActorSteele, 1460, 13);
}
- } else if (Game_Flag_Query(kFlagNR02toNR01)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 239.0f, 31.66f, -901.0f, 0, 0, false, 0);
- Game_Flag_Reset(kFlagNR02toNR01);
- if (Actor_Query_Goal_Number(kActorGordo) == 230) {
- Scene_Exits_Disable();
- Actor_Set_Goal_Number(kActorGordo, 231);
- Non_Player_Actor_Combat_Mode_On(kActorGordo, kActorCombatStateIdle, true, kActorMcCoy, 3, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 20, 300, false);
+ Actor_Says(kActorMcCoy, 3150, 14);
+ Actor_Says(kActorSteele, 1470, 12);
+ Actor_Says(kActorSteele, 1480, 13);
+ Actor_Says(kActorMcCoy, 3155, 15);
+ Actor_Says(kActorSteele, 1500, 16);
+ Actor_Says(kActorMcCoy, 3160, 12);
+ if (Game_Flag_Query(kFlagSteeleKnowsBulletBobIsDead)) {
+ Actor_Says(kActorSteele, 1330, 12);
+ Actor_Says(kActorSteele, 1340, 12);
+ Actor_Says(kActorSteele, 1350, 12);
+ Actor_Says(kActorMcCoy, 3120, 15);
+ Actor_Says(kActorSteele, 1360, 12);
+ Actor_Says(kActorSteele, 1370, 12);
+ Actor_Says(kActorMcCoy, 3125, 15);
+ Actor_Says(kActorSteele, 1380, 12);
+ Actor_Says(kActorMcCoy, 3130, 15);
+ Actor_Says(kActorSteele, 1390, 12);
+ Actor_Says(kActorSteele, 1400, 12);
+ Actor_Says(kActorSteele, 1410, 12);
+ Actor_Says(kActorMcCoy, 3135, 15);
+ Actor_Says(kActorSteele, 1420, 12);
+ Actor_Says(kActorMcCoy, 3140, 15);
+ Actor_Says(kActorSteele, 1430, 12);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleImmediatelyStartChapter4);
+ } else {
+ int v0 = Global_Variable_Query(kVariableHollowayArrest);
+ 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, kGoalSteeleNR01GoToNR08);
+ } else if (v0 == 2) {
+ Actor_Says(kActorSteele, 1590, 15);
+ Actor_Says(kActorMcCoy, 3195, 14);
+ Actor_Says(kActorSteele, 1600, 16);
+ Actor_Says(kActorMcCoy, 3200, 13);
+ Actor_Says(kActorSteele, 1610, 17);
+ Actor_Says(kActorSteele, 1620, 15);
+ Actor_Says(kActorSteele, 1630, 14);
+ Actor_Says(kActorMcCoy, 3205, 12);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01GoToNR02);
+ } else if (v0 == 3) {
+ Actor_Says(kActorSteele, 1540, 15);
+ Actor_Says(kActorMcCoy, 3175, 13);
+ Actor_Says(kActorSteele, 1550, 13);
+ Actor_Says(kActorSteele, 1560, 16);
+ Actor_Says(kActorMcCoy, 3180, 15);
+ Actor_Says(kActorSteele, 1570, 12);
+ Actor_Says(kActorSteele, 1580, 14);
+ Actor_Says(kActorMcCoy, 3190, 12);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01GoToHF03);
+ }
}
- } else if (Game_Flag_Query(kFlagNotUsed545)) {
- Game_Flag_Reset(kFlagNotUsed545);
- Actor_Put_In_Set(kActorHanoi, kSetNR01);
- Actor_Set_At_XYZ(kActorHanoi, -202.0f, 24.0f, -574.0f, 0);
- Actor_Face_Heading(kActorHanoi, 256, false);
- Actor_Set_Goal_Number(kActorHanoi, 204);
- Player_Gains_Control();
- } else {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 48.0f, 23.88f, -189.0f, 0, 0, false, 0);
}
+ } else if (Game_Flag_Query(kFlagNR02toNR01)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 239.0f, 31.66f, -901.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagNR02toNR01);
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01WaitAndAttack) {
+ Scene_Exits_Disable();
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01Attack);
+ Non_Player_Actor_Combat_Mode_On(kActorGordo, kActorCombatStateIdle, true, kActorMcCoy, 3, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 20, 300, false);
+ }
+ } else if (Game_Flag_Query(kFlagNotUsed545)) {
+ Game_Flag_Reset(kFlagNotUsed545);
+ Actor_Put_In_Set(kActorHanoi, kSetNR01);
+ Actor_Set_At_XYZ(kActorHanoi, -202.0f, 24.0f, -574.0f, 0);
+ Actor_Face_Heading(kActorHanoi, 256, false);
+ Actor_Set_Goal_Number(kActorHanoi, 204);
+ Player_Gains_Control();
+ } else {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 48.0f, 23.88f, -189.0f, 0, false, false, 0);
}
if (Game_Flag_Query(kFlagCrazylegsArrestedTalk)) {
@@ -434,9 +434,9 @@ void SceneScriptNR01::PlayerWalkedIn() {
Actor_Voice_Over(980, kActorVoiceOver);
}
- if (Actor_Query_Goal_Number(kActorGordo) == 240) {
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR01WaitAndGiveUp) {
Scene_Exits_Disable();
- Actor_Set_Goal_Number(kActorGordo, 241);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR01GiveUp);
if (!Player_Query_Combat_Mode()) {
Player_Set_Combat_Mode(true);
}
@@ -463,12 +463,12 @@ void SceneScriptNR01::PlayerWalkedOut() {
}
void SceneScriptNR01::DialogueQueueFlushed(int a1) {
- if (Actor_Query_Goal_Number(kActorSteele) == 251
- && Actor_Query_Goal_Number(kActorGordo) != 299
- && Actor_Query_Goal_Number(kActorGordo) != 254
- && Actor_Query_Goal_Number(kActorGordo) != 255
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01TalkToGordo
+ && Actor_Query_Goal_Number(kActorGordo) != kGoalGordoNR01Die
+ && Actor_Query_Goal_Number(kActorGordo) != kGoalGordoNR01HostageShot
+ && Actor_Query_Goal_Number(kActorGordo) != kGoalGordoNR01HostageDie
) {
- Actor_Set_Goal_Number(kActorSteele, 252);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleNR01ShootGordo);
}
}
diff --git a/engines/bladerunner/script/scene/nr02.cpp b/engines/bladerunner/script/scene/nr02.cpp
index 88909dcd97..eb309573db 100644
--- a/engines/bladerunner/script/scene/nr02.cpp
+++ b/engines/bladerunner/script/scene/nr02.cpp
@@ -105,29 +105,29 @@ bool SceneScriptNR02::ClickedOn3DObject(const char *objectName, bool a2) {
bool SceneScriptNR02::ClickedOnActor(int actorId) {
if (actorId == kActorGordo
- && Actor_Query_Goal_Number(kActorGordo) == kGoalGordoWaitAtNR02
+ && Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02WaitAtBar
) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 67.37f, -24.0f, 389.32f, 0, true, false, 0)) {
- Actor_Set_Goal_Number(kActorGordo, kGoalGordoTalkToMcCoyAtNR02);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TalkToMcCoy);
}
}
return false;
}
bool SceneScriptNR02::ClickedOnItem(int itemId, bool a2) {
- if (itemId == 89
- || itemId == 90
+ if (itemId == kItemGordosLighter1
+ || itemId == kItemGordosLighter2
) {
if(!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 109.38f, -24.0f, 420.5f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 423, false);
- if (itemId == 89) {
- Item_Remove_From_World(89);
+ if (itemId == kItemGordosLighter1) {
+ Item_Remove_From_World(kItemGordosLighter1);
Item_Pickup_Spin_Effect(953, 214, 380);
Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter1, true, -1);
}
- if (itemId == 90) {
- Item_Remove_From_World(90);
+ if (itemId == kItemGordosLighter2) {
+ Item_Remove_From_World(kItemGordosLighter2);
Item_Pickup_Spin_Effect(954, 214, 380);
Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter2, true, -1);
}
@@ -139,8 +139,8 @@ bool SceneScriptNR02::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptNR02::ClickedOnExit(int exitId) {
if (exitId == 0) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -283.0f, -24.0f, 326.0f, 0, true, false, 0)) {
- if (Actor_Query_Goal_Number(kActorGordo) < 230
- || Actor_Query_Goal_Number(kActorGordo) > 250
+ if (Actor_Query_Goal_Number(kActorGordo) < kGoalGordoNR01WaitAndAttack
+ || Actor_Query_Goal_Number(kActorGordo) > kGoalGordoNR01WaitAndTakeHostage
) {
Music_Stop(2);
}
@@ -159,9 +159,10 @@ bool SceneScriptNR02::ClickedOn2DRegion(int region) {
}
void SceneScriptNR02::SceneFrameAdvanced(int frame) {
+ // Gordo not running away
if (!Music_Is_Playing()
- && (Actor_Query_Goal_Number(kActorGordo) < 210
- || Actor_Query_Goal_Number(kActorGordo) > 222
+ && (Actor_Query_Goal_Number(kActorGordo) < kGoalGordoNR02TalkAboutMcCoy
+ || Actor_Query_Goal_Number(kActorGordo) > kGoalGordoNR02RunAway3
)
) {
playNextMusic();
@@ -173,16 +174,16 @@ void SceneScriptNR02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptNR02::PlayerWalkedIn() {
- if (Actor_Query_Goal_Number(kActorGordo) == 211) {
- Actor_Set_Goal_Number(kActorGordo, 220);
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02WaitAtPodium) {
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02RunAway1);
}
- if (Actor_Query_Goal_Number(kActorGordo) == 204) {
- Actor_Set_Goal_Number(kActorGordo, 205);
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02WaitForMcCoy) {
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02NextAct);
}
- if (Actor_Query_Goal_Number(kActorGordo) == 206) {
- Actor_Set_Goal_Number(kActorGordo, 205);
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02TellJoke1) {
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02NextAct);
}
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -203.0f, -24.0f, 334.0f, 0, false, false, 0);
@@ -191,47 +192,51 @@ void SceneScriptNR02::PlayerWalkedIn() {
void SceneScriptNR02::PlayerWalkedOut() {
Music_Stop(2);
- if (Actor_Query_Goal_Number(kActorGordo) < 210
- && Actor_Query_Goal_Number(kActorGordo) >= 205
+
+ // Gordo on the podium
+ if (Actor_Query_Goal_Number(kActorGordo) < kGoalGordoNR02TalkAboutMcCoy
+ && Actor_Query_Goal_Number(kActorGordo) >= kGoalGordoNR02NextAct
) {
- Actor_Set_Goal_Number(kActorGordo, 204);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02WaitForMcCoy);
}
}
void SceneScriptNR02::DialogueQueueFlushed(int a1) {
if (Player_Query_Current_Scene() == kSceneNR02
- && Actor_Query_Goal_Number(kActorGordo) == 206
+ && Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02TellJoke1
) {
Sound_Play(575, 50, 0, 0, 50);
Sound_Play(321, 50, 0, 0, 50);
}
if (Player_Query_Current_Scene() == kSceneNR02
- && Actor_Query_Goal_Number(kActorGordo) == 207
+ && Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02TellJoke2
) {
Sound_Play(576, 50, 0, 0, 50);
Sound_Play(323, 50, 0, 0, 50);
}
if (Player_Query_Current_Scene() == kSceneNR02
- && Actor_Query_Goal_Number(kActorGordo) == 208
+ && Actor_Query_Goal_Number(kActorGordo) == kGoalGordoNR02TellJoke3
) {
Sound_Play(579, 50, 0, 0, 50);
Sound_Play(324, 50, 0, 0, 50);
}
+ // Gordo on the podium
if (Player_Query_Current_Scene() == kSceneNR02
- && Actor_Query_Goal_Number(kActorGordo) > 205
- && Actor_Query_Goal_Number(kActorGordo) < 210
+ && Actor_Query_Goal_Number(kActorGordo) > kGoalGordoNR02NextAct
+ && Actor_Query_Goal_Number(kActorGordo) < kGoalGordoNR02TalkAboutMcCoy
) {
- Actor_Set_Goal_Number(kActorGordo, 205);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02NextAct);
return; // true;
}
- if (Actor_Query_Goal_Number(kActorGordo) > 205
- && Actor_Query_Goal_Number(kActorGordo) < 210
+ // Gordo on the podium, but McCoy is outside
+ if (Actor_Query_Goal_Number(kActorGordo) > kGoalGordoNR02NextAct
+ && Actor_Query_Goal_Number(kActorGordo) < kGoalGordoNR02TalkAboutMcCoy
) {
- Actor_Set_Goal_Number(kActorGordo, 204);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02WaitForMcCoy);
return; // true;
}
//return false;
diff --git a/engines/bladerunner/script/scene/nr08.cpp b/engines/bladerunner/script/scene/nr08.cpp
index 9a3e9164f0..8fa1d06f28 100644
--- a/engines/bladerunner/script/scene/nr08.cpp
+++ b/engines/bladerunner/script/scene/nr08.cpp
@@ -25,7 +25,7 @@
namespace BladeRunner {
void SceneScriptNR08::InitializeScene() {
- if (Actor_Query_Goal_Number(kActorSteele) == 231) {
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01GoToNR08) {
Setup_Scene_Information(-1174.1f, 0.32f, 303.9f, 435);
} else if (Game_Flag_Query(546)) {
Scene_Loop_Start_Special(0, 0, 0);
@@ -182,7 +182,7 @@ void SceneScriptNR08::PlayerWalkedIn() {
Loop_Actor_Travel_Stairs(kActorDektora, 8, 1, kAnimationModeIdle);
Actor_Set_Goal_Number(kActorDektora, 246);
}
- if (Actor_Query_Goal_Number(kActorSteele) == 231) {
+ if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR01GoToNR08) {
Actor_Says(kActorSteele, 1640, 12);
if (!Game_Flag_Query(kFlagDirectorsCut)) {
Actor_Says(kActorMcCoy, 3790, 13);
diff --git a/engines/bladerunner/script/scene/nr11.cpp b/engines/bladerunner/script/scene/nr11.cpp
index cf8143ef26..b450601281 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(kVariableBehavior) == 1) {
+ if (Global_Variable_Query(kVariableHollowayArrest) == 1) {
Actor_Set_Goal_Number(kActorSteele, 236);
}
Game_Flag_Set(591);
diff --git a/engines/bladerunner/script/scene/rc03.cpp b/engines/bladerunner/script/scene/rc03.cpp
index 28fbe7c870..e539bd9f7a 100644
--- a/engines/bladerunner/script/scene/rc03.cpp
+++ b/engines/bladerunner/script/scene/rc03.cpp
@@ -143,7 +143,7 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
if (exitId == 0) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 298.0f, -4.0f, 405.0f, 0, true, false, 0)) {
if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
- Game_Flag_Set(kFlagRC04Locked);
+ Game_Flag_Set(kFlagBulletBobDead);
}
Game_Flag_Set(kFlagRC03toRC01);
Set_Enter(kSetRC01, kSceneRC01);
@@ -154,7 +154,7 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -469.0f, -4.0f, 279.0f, 0, true, false, 0)) {
if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
- Game_Flag_Set(kFlagRC04Locked);
+ Game_Flag_Set(kFlagBulletBobDead);
}
Game_Flag_Set(kFlagRC03toAR02);
Game_Flag_Reset(kFlagMcCoyInRunciters);
@@ -169,7 +169,7 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagMcCoyInRunciters);
Game_Flag_Set(kFlagMcCoyInUnderground);
if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
- Game_Flag_Set(kFlagRC04Locked);
+ Game_Flag_Set(kFlagBulletBobDead);
}
Set_Enter(kSetUG01, kSceneUG01);
Actor_Set_Goal_Number(kActorDektora, kGoalDektoraStartWalkingAround);
@@ -182,7 +182,7 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagMcCoyInRunciters);
Game_Flag_Set(kFlagMcCoyInHawkersCircle);
if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
- Game_Flag_Set(kFlagRC04Locked);
+ Game_Flag_Set(kFlagBulletBobDead);
}
Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC04);
Actor_Set_Goal_Number(kActorDektora, kGoalDektoraStartWalkingAround);
@@ -193,7 +193,7 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -22.0f, 1.0f, -63.0f, 0, true, false, 0)) {
if (Global_Variable_Query(kVariableChapter) == 3
|| Global_Variable_Query(kVariableChapter) == 5
- || Game_Flag_Query(kFlagRC04Locked)
+ || Game_Flag_Query(kFlagBulletBobDead)
) {
Actor_Says(kActorMcCoy, 8522, 14);
} else {
diff --git a/engines/bladerunner/script/scene/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp
index 324ef08654..8bcb839681 100644
--- a/engines/bladerunner/script/scene/ug05.cpp
+++ b/engines/bladerunner/script/scene/ug05.cpp
@@ -232,7 +232,7 @@ int SceneScriptUG05::getAffectionTowardsActor() {
return kActorDektora;
}
if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy
- && Actor_Query_Goal_Number(kActorLucy) != 599
+ && Actor_Query_Goal_Number(kActorLucy) != kGoalLucyDead
) {
return kActorLucy;
}