[Scummvm-git-logs] scummvm master -> de527a2406850eab9b09c1decfc19754ea55d985
peterkohaut
peterkohaut at users.noreply.github.com
Mon Jan 28 20:49:14 CET 2019
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1ee6cf92bd BLADERUNNER: Marking few cut features
77adb67664 BLADERUNNER: Initial cleanup of NR01, NR02 & related scripts
578d98ee12 BLADERUNNER: Cleanup of scripts for Gordo chase
7f421be835 BLADERUNNER: Fixed small issue in combat calculation
de527a2406 BLADERUNNER: Cleanup of Steele animation code
Commit: 1ee6cf92bd455462925ad669ded54c6769a83b01
https://github.com/scummvm/scummvm/commit/1ee6cf92bd455462925ad669ded54c6769a83b01
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-27T21:31:29+01:00
Commit Message:
BLADERUNNER: Marking few cut features
Changed paths:
engines/bladerunner/game_constants.h
engines/bladerunner/script/ai/lucy.cpp
engines/bladerunner/script/ai/sebastian.cpp
engines/bladerunner/script/scene/hf01.cpp
engines/bladerunner/script/scene/hf05.cpp
engines/bladerunner/script/scene/nr01.cpp
engines/bladerunner/script/scene/ps09.cpp
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index bc92efd..eb8e1e3 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -933,6 +933,7 @@ enum Flags {
kFlagMA04McCoySleeping = 647,
kFlagMA04PhoneMessageFromClovis = 649,
kFlagMA04PhoneMessageFromLucy = 650,
+ kFlagCrazylegsArrestedTalk = 652,
kFlagUG02RagiationGooglesTaken = 656,
kFlagDNARowAvailableTalk = 660,
kFlagTB07ShadeDown = 661, // is never set
diff --git a/engines/bladerunner/script/ai/lucy.cpp b/engines/bladerunner/script/ai/lucy.cpp
index c355102..0e69ea6 100644
--- a/engines/bladerunner/script/ai/lucy.cpp
+++ b/engines/bladerunner/script/ai/lucy.cpp
@@ -397,7 +397,7 @@ bool AIScriptLucy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorLucy, 360, 13);
Actor_Says(kActorMcCoy, 1710, 13);
- if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy) { // how to trigger this?
+ if (Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy) { // cut feature? if this is set lucy will not run into hf04
Actor_Says(kActorLucy, 940, 13);
Actor_Says(kActorMcCoy, 6780, 12);
Actor_Says(kActorLucy, 950, 12);
diff --git a/engines/bladerunner/script/ai/sebastian.cpp b/engines/bladerunner/script/ai/sebastian.cpp
index 4f2cc0a..d2560fd 100644
--- a/engines/bladerunner/script/ai/sebastian.cpp
+++ b/engines/bladerunner/script/ai/sebastian.cpp
@@ -425,7 +425,7 @@ void AIScriptSebastian::dialogue() {
Actor_Says_With_Pause(kActorSebastian, 370, 0.30f, 13);
Actor_Says_With_Pause(kActorSebastian, 380, 0.70f, 17);
Actor_Says(kActorSebastian, 390, 14);
- if (Actor_Clue_Query(kActorMcCoy, kClueChessTable)) {
+ if (Actor_Clue_Query(kActorMcCoy, kClueChessTable)) { // cut feature? it is impossible to obtain this clue
Actor_Says(kActorMcCoy, 7140, kAnimationModeTalk);
Actor_Says(kActorSebastian, 400, 12);
Actor_Says(kActorMcCoy, 7145, 16);
diff --git a/engines/bladerunner/script/scene/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp
index 200d82b..a469b83 100644
--- a/engines/bladerunner/script/scene/hf01.cpp
+++ b/engines/bladerunner/script/scene/hf01.cpp
@@ -366,8 +366,8 @@ void SceneScriptHF01::PlayerWalkedIn() {
return;
}
- if (Game_Flag_Query(652)) {
- Game_Flag_Reset(652);
+ if (Game_Flag_Query(kFlagCrazylegsArrestedTalk)) {
+ Game_Flag_Reset(kFlagCrazylegsArrestedTalk);
Actor_Voice_Over(950, kActorVoiceOver);
Actor_Voice_Over(960, kActorVoiceOver);
Actor_Voice_Over(970, kActorVoiceOver);
diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp
index 13773f0..8ad33f1 100644
--- a/engines/bladerunner/script/scene/hf05.cpp
+++ b/engines/bladerunner/script/scene/hf05.cpp
@@ -372,7 +372,7 @@ void SceneScriptHF05::talkWithCrazyLegs2() {
void SceneScriptHF05::dialogueWithCrazylegs1() {
Dialogue_Menu_Clear_List();
- if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) // bug? there is no way how to obtain this clue
+ if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) // cut feature? there is no way how to obtain this clue
&& Global_Variable_Query(kVariableChapter) == 3
) {
DM_Add_To_List_Never_Repeat_Once_Selected(1180, 3, 6, 7); // ADVERTISEMENT
@@ -388,8 +388,8 @@ void SceneScriptHF05::dialogueWithCrazylegs1() {
) {
DM_Add_To_List_Never_Repeat_Once_Selected(1210, 4, 6, 2); // LUCY'S PHOTO
}
- if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansResources)
- || (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
+ if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansResources) // cut feature? there is no way how to obtain this clue
+ || (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) // cut feature? there is no way how to obtain this clue either
&& Global_Variable_Query(kVariableChapter) == 3
)
) {
@@ -518,7 +518,7 @@ void SceneScriptHF05::dialogueWithCrazylegs1() {
}
}
-void SceneScriptHF05::dialogueWithCrazylegs2() {
+void SceneScriptHF05::dialogueWithCrazylegs2() { // cut feature? it is impossible to trigger this dialog
Dialogue_Menu_Clear_List();
DM_Add_To_List_Never_Repeat_Once_Selected(1250, -1, -1, 10); // ARREST
DM_Add_To_List_Never_Repeat_Once_Selected(1260, 10, 5, -1); // WARNING
@@ -543,7 +543,7 @@ void SceneScriptHF05::dialogueWithCrazylegs2() {
Actor_Put_In_Set(kActorCrazylegs, kSetPS09);
Actor_Set_At_XYZ(kActorCrazylegs, -315.15f, 0.0f, 241.06f, 583);
Actor_Set_Goal_Number(kActorCrazylegs, 699);
- Game_Flag_Set(652);
+ Game_Flag_Set(kFlagCrazylegsArrestedTalk);
if (Game_Flag_Query(kFlagSpinnerAtNR01)) {
Set_Enter(kSetNR01, kSceneNR01);
} else {
diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp
index 611a18a..c91fdb4 100644
--- a/engines/bladerunner/script/scene/nr01.cpp
+++ b/engines/bladerunner/script/scene/nr01.cpp
@@ -410,8 +410,8 @@ void SceneScriptNR01::PlayerWalkedIn() {
}
}
- if (Game_Flag_Query(652)) {
- Game_Flag_Reset(652);
+ if (Game_Flag_Query(kFlagCrazylegsArrestedTalk)) {
+ Game_Flag_Reset(kFlagCrazylegsArrestedTalk);
Actor_Voice_Over(950, kActorVoiceOver);
Actor_Voice_Over(960, kActorVoiceOver);
Actor_Voice_Over(970, kActorVoiceOver);
diff --git a/engines/bladerunner/script/scene/ps09.cpp b/engines/bladerunner/script/scene/ps09.cpp
index 02aa88e..d7f48b0 100644
--- a/engines/bladerunner/script/scene/ps09.cpp
+++ b/engines/bladerunner/script/scene/ps09.cpp
@@ -54,7 +54,7 @@ void SceneScriptPS09::InitializeScene() {
Actor_Put_In_Set(kActorIzo, kSetPS09);
Actor_Set_At_XYZ(kActorIzo, -476.0f, 0.2f, -225.0f, 518);
}
- if (Game_Flag_Query(kFlagCrazylegsArrested)) {
+ if (Game_Flag_Query(kFlagCrazylegsArrested)) { // cut feature? it is impossible to arrest crazylegs
Actor_Put_In_Set(kActorCrazylegs, kSetPS09);
Actor_Set_At_XYZ(kActorCrazylegs, -290.0f, 0.33f, -235.0f, 207);
}
@@ -300,7 +300,7 @@ void SceneScriptPS09::dialogueWithGrigorian() {
DM_Add_To_List_Never_Repeat_Once_Selected(180, -1, 5, 5); // CARS
DM_Add_To_List_Never_Repeat_Once_Selected(200, -1, 3, 6); // VOIGT-KAMPFF
}
- if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) // bug? there is no way how to obtain this clue
+ if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) // cut feature? it is impossible to obtain this clue
&& (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewA)
|| Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1)
|| Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2)
Commit: 77adb67664cc4aa4c348709504d68e21a8c9791e
https://github.com/scummvm/scummvm/commit/77adb67664cc4aa4c348709504d68e21a8c9791e
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-27T22:21:54+01:00
Commit Message:
BLADERUNNER: Initial cleanup of NR01, NR02 & related scripts
Changed paths:
engines/bladerunner/game_constants.h
engines/bladerunner/script/ai/gordo.cpp
engines/bladerunner/script/ai/steele.cpp
engines/bladerunner/script/ai_script.h
engines/bladerunner/script/scene/hf01.cpp
engines/bladerunner/script/scene/nr01.cpp
engines/bladerunner/script/scene/nr02.cpp
engines/bladerunner/script/scene/nr03.cpp
engines/bladerunner/script/scene_script.h
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index eb8e1e3..d447b12 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -906,11 +906,17 @@ enum Flags {
kFlagHF05toHF06 = 529, // is never checked
kFlagHF06toHF05 = 530,
kFlagCT11toDR01 = 531,
+ kFlagNR01toNR02 = 532,
+ kFlagNR02toNR01 = 533,
+ kFlagNR03toNR01 = 534,
+ kFlagNR01toNR03 = 535,
+
kFlagCT09Entered = 538,
kFlagCT09LeonInterrupted = 539,
kFlagCT09DeskClerkTalk = 540,
kFlagGordoTalk1 = 543,
kFlagGordoTalk2 = 544,
+ kFlagNotUsed545 = 545, // is never set
kFlagDR06MannequinHeadOpen = 548,
kFlagMcCoyTiedDown = 550,
kFlagDR01toCT11 = 558,
@@ -992,6 +998,7 @@ enum Variables {
kVariableAffectionTowards = 45, // 0 none, 1 steele, 2 dektora, 3 lucy
kVariableGunPulledInFrontOfSebastian = 46,
kVariableDNAEvidences = 48,
+ kVariableNR02Music = 50,
kVariableReplicants = 51,
kVariableNextTvNews = 52
};
@@ -1134,8 +1141,8 @@ enum Scenes {
kSceneMA05 = 51, // McCoy's Apartment - Balcony
kSceneMA06 = 52, // McCoy's Apartment - Elevator
kSceneMA07 = 53, // McCoy's Apartment - Ground floor
- kSceneNR01 = 54,
- kSceneNR02 = 55,
+ kSceneNR01 = 54, // Nightclub Row - Outside
+ kSceneNR02 = 55, // Nightclub Row - Taffy Lewis'
kSceneNR03 = 56,
kSceneNR04 = 57,
kSceneNR05 = 58,
@@ -1570,7 +1577,12 @@ enum GoalGordo {
kGoalGordoGoToDNARow = 101,
kGoalGordoGoToChinaTown = 102,
kGoalGordoGoToFreeSlotHAGJ = 103,
- kGoalGordoGoToFreeSlotAH = 104
+ kGoalGordoGoToFreeSlotAH = 104,
+ // chapter 3
+ kGoalGordoStartChapter3 = 200,
+ kGoalGordoWaitAtNR02 = 201,
+ kGoalGordoTalkToMcCoyAtNR02 = 215
+
};
enum GoalGuzza {
diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp
index 8bc03ea..e16ca05 100644
--- a/engines/bladerunner/script/ai/gordo.cpp
+++ b/engines/bladerunner/script/ai/gordo.cpp
@@ -72,8 +72,8 @@ bool AIScriptGordo::Update() {
}
if (Global_Variable_Query(kVariableChapter) == 3) {
- if (Actor_Query_Goal_Number(kActorGordo) < 200) {
- Actor_Set_Goal_Number(kActorGordo, 200);
+ 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);
@@ -151,8 +151,8 @@ void AIScriptGordo::CompletedMovementTrack() {
return;// true;
}
- if (Actor_Query_Goal_Number(kActorGordo) > 100
- && Actor_Query_Goal_Number(kActorGordo) < 200
+ if (Actor_Query_Goal_Number(kActorGordo) > kGoalGordoWalkAround
+ && Actor_Query_Goal_Number(kActorGordo) < kGoalGordoStartChapter3
) {
Actor_Set_Goal_Number(kActorGordo, kGoalGordoWalkAround);
return;// true;
@@ -170,10 +170,12 @@ void AIScriptGordo::CompletedMovementTrack() {
}
Actor_Set_Goal_Number(kActorGordo, 205);
}
+
if (Actor_Query_Goal_Number(kActorGordo) == 220) {
Game_Flag_Set(594);
Actor_Set_Goal_Number(kActorGordo, 221);
}
+
if (Actor_Query_Goal_Number(kActorGordo) == 222) {
if (Game_Flag_Query(kFlagGordoIsReplicant)) {
if (Global_Variable_Query(kVariableBehavior) == 2) {
@@ -186,9 +188,11 @@ void AIScriptGordo::CompletedMovementTrack() {
}
Scene_Exits_Enable();
}
+
if (Actor_Query_Goal_Number(kActorGordo) == 225) {
- Actor_Set_Goal_Number(kActorGordo, 200);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoStartChapter3);
}
+
if (Actor_Query_Goal_Number(kActorGordo) == 243) {
Music_Stop(2);
Actor_Set_Goal_Number(kActorGordo, 280);
@@ -248,7 +252,7 @@ bool AIScriptGordo::ShotAtAndHit() {
Delay(1500);
Actor_Voice_Over(2410, kActorVoiceOver);
Actor_Voice_Over(2420, kActorVoiceOver);
- Game_Flag_Set(532);
+ Game_Flag_Set(kFlagNR01toNR02);
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
}
if (Actor_Query_Goal_Number(kActorGordo) == 250) {
@@ -303,34 +307,42 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
int rnd;
switch (newGoalNumber) {
+
+ // chapter 1
+
case kGoalGordoDefault:
Actor_Put_In_Set(kActorGordo, kSetCT01_CT12);
Actor_Set_At_XYZ(kActorGordo, -308.44f, -12.5f, 442.78f, 256);
Actor_Change_Animation_Mode(kActorGordo, 53);
break;
+
case kGoalGordoWalkThroughCT05:
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:
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:
Game_Flag_Set(kFlagCT01GordoTalk);
Actor_Set_Goal_Number(kActorGordo, 99);
Actor_Change_Animation_Mode(kActorGordo, 29);
break;
+
case kGoalGordoWalkOutFromCT01:
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:
Actor_Face_Actor(kActorGordo, kActorHowieLee, true);
Actor_Says(kActorGordo, 0, 13);
@@ -338,6 +350,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Goal_Number(kActorGordo, kGoalGordoWalkOutFromCT01);
Player_Gains_Control();
break;
+
case kGoalGordoWalkToHowieLee:
Player_Loses_Control();
Actor_Set_Immunity_To_Obstacles(kActorGordo, true);
@@ -345,12 +358,15 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorGordo, 100, 0);
AI_Movement_Track_Repeat(kActorGordo);
break;
+
+ // chapter 2
+
case kGoalGordoWalkAround:
AI_Movement_Track_Flush(kActorGordo);
_animationState = 0;
_animationFrame = 0;
_animationStateNext = 0;
- sub_41117C();
+ unknown();
rnd = Random_Query(1, 4);
if (Actor_Clue_Query(kActorMcCoy, kClueGordoInterview1)
|| Actor_Clue_Query(kActorMcCoy, kClueGordoInterview2)
@@ -373,6 +389,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
}
break;
+
case kGoalGordoGoToDNARow:
AI_Movement_Track_Flush(kActorGordo);
if (Random_Query(1, 2) == 1) {
@@ -397,6 +414,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorGordo);
break;
+
case kGoalGordoGoToChinaTown:
if (Random_Query(1, 3) == 1) {
AI_Movement_Track_Append(kActorGordo, 54, 1);
@@ -410,6 +428,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorGordo, 40, 15);
AI_Movement_Track_Repeat(kActorGordo);
break;
+
case kGoalGordoGoToFreeSlotHAGJ:
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append(kActorGordo, 40, Random_Query(15, 45));
@@ -422,6 +441,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorGordo, 42, Random_Query(10, 20));
AI_Movement_Track_Repeat(kActorGordo);
break;
+
case kGoalGordoGoToFreeSlotAH:
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append(kActorGordo, 33, Random_Query(15, 45));
@@ -430,21 +450,24 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
AI_Movement_Track_Repeat(kActorGordo);
break;
- case 200:
+
+ // chapter 3
+
+ case kGoalGordoStartChapter3:
if (Global_Variable_Query(kVariableBehavior) == 2) {
if (Game_Flag_Query(kFlagLucyRanAway)
&& Game_Flag_Query(591)
&& Player_Query_Current_Scene() != kSceneNR02
) {
- Actor_Set_Goal_Number(kActorGordo, 201);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoWaitAtNR02);
} else {
Actor_Set_Goal_Number(kActorGordo, 225);
}
} else {
- Actor_Set_Goal_Number(kActorGordo, 201);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoWaitAtNR02);
}
break;
- case 201:
+ case kGoalGordoWaitAtNR02:
AI_Movement_Track_Flush(kActorGordo);
Actor_Put_In_Set(kActorGordo, kSetNR02);
Actor_Set_At_XYZ(kActorGordo, 148.12f, -24.0f, 456.04f, 506);
@@ -542,9 +565,11 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Set_Goal_Number(kActorGordo, 220);
}
break;
- case 215:
- sub_4103B8();
+
+ case kGoalGordoTalkToMcCoyAtNR02:
+ talkToMcCoyAtNR02();
break;
+
case 220:
Actor_Set_Targetable(kActorGordo, true);
Scene_Exits_Disable();
@@ -553,15 +578,18 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorGordo);
Music_Play(1, 50, 0, 2, -1, 0, 0);
break;
+
case 221:
Actor_Set_At_XYZ(kActorGordo, -90.91f, -24.0f, -14.71f, 708);
Actor_Change_Animation_Mode(kActorGordo, 26);
break;
+
case 222:
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append_Run(kActorGordo, 367, 0);
AI_Movement_Track_Repeat(kActorGordo);
break;
+
case 225:
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append(kActorGordo, 39, 10);
@@ -569,18 +597,22 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorGordo, 39, 10);
AI_Movement_Track_Repeat(kActorGordo);
break;
+
case 230:
Actor_Put_In_Set(kActorGordo, kSetNR01);
Actor_Set_At_XYZ(kActorGordo, -194.24f, 23.88f, -851.98f, 343);
break;
+
case 240:
Actor_Put_In_Set(kActorGordo, kSetNR01);
Actor_Set_At_XYZ(kActorGordo, -194.24f, 23.88f, -851.98f, 343);
break;
+
case 241:
ADQ_Add(kActorGordo, 170, 18);
AI_Countdown_Timer_Start(kActorGordo, 0, 10);
break;
+
case 242:
Actor_Face_Actor(kActorGordo, kActorMcCoy, true);
Actor_Says(kActorGordo, 180, 13);
@@ -593,8 +625,9 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Says(kActorMcCoy, 3080, 15);
Actor_Says(kActorGordo, 200, 15);
Actor_Says(kActorMcCoy, 3085, 15);
- dialogueWithGordo2();
+ dialogue2();
break;
+
case 243:
AI_Movement_Track_Flush(kActorGordo);
AI_Movement_Track_Append_Run(kActorGordo, 369, 0);
@@ -602,15 +635,18 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorGordo, 33, 0);
AI_Movement_Track_Repeat(kActorGordo);
break;
+
case 250:
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);
break;
+
case 251:
Actor_Change_Animation_Mode(kActorGordo, 83);
break;
+
case 255:
ADQ_Flush();
Actor_Change_Animation_Mode(kActorGordo, 83);
@@ -620,15 +656,18 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Delay(3000);
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyArrested);
break;
+
case 260:
Actor_Set_Targetable(kActorGordo, false);
break;
+
case 280:
Scene_Exits_Enable();
Game_Flag_Set(592);
Actor_Put_In_Set(kActorGordo, kSetFreeSlotA);
Actor_Set_At_Waypoint(kActorGordo, 33, 0);
break;
+
case 299:
Music_Stop(2);
AI_Countdown_Timer_Reset(kActorGordo, 0);
@@ -637,11 +676,12 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
if (Game_Flag_Query(kFlagGordoIsReplicant)) {
Actor_Change_Animation_Mode(kActorGordo, 84);
} else {
- Actor_Change_Animation_Mode(kActorGordo, 48);
+ Actor_Change_Animation_Mode(kActorGordo, kAnimationModeDie);
}
Actor_Set_Goal_Number(kActorGordo, 599);
- Actor_Retired_Here(kActorGordo, 36, 18, 1, -1);
+ Actor_Retired_Here(kActorGordo, 36, 18, true, -1);
break;
+
case 400:
AI_Movement_Track_Flush(kActorGordo);
Actor_Put_In_Set(kActorGordo, kSetFreeSlotA);
@@ -719,6 +759,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
break;
}
break;
+
case 1:
switch (_state) {
case 0:
@@ -754,6 +795,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
break;
}
break;
+
case 2:
*animation = 114;
if (Random_Query(0, 1)) {
@@ -763,6 +805,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 3:
*animation = 115;
_animationFrame++;
@@ -774,6 +817,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
Actor_Set_Goal_Number(kActorGordo, kGoalGordoWalkToHowieLee);
}
break;
+
case 4:
*animation = 120;
if (_animationFrame == 0 && var_45B078) {
@@ -786,6 +830,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 5:
*animation = 121;
_animationFrame++;
@@ -795,6 +840,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 4;
}
break;
+
case 6:
*animation = 122;
_animationFrame++;
@@ -804,6 +850,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 4;
}
break;
+
case 7:
*animation = 123;
_animationFrame++;
@@ -813,6 +860,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 4;
}
break;
+
case 8:
*animation = 124;
_animationFrame++;
@@ -822,6 +870,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 4;
}
break;
+
case 9:
*animation = 125;
_animationFrame++;
@@ -831,6 +880,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 4;
}
break;
+
case 10:
*animation = 126;
_animationFrame++;
@@ -840,6 +890,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 4;
}
break;
+
case 11:
*animation = 127;
_animationFrame++;
@@ -849,6 +900,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 4;
}
break;
+
case 12:
*animation = 127;
_animationFrame++;
@@ -858,6 +910,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 4;
}
break;
+
case 13:
*animation = 114;
_animationFrame++;
@@ -865,6 +918,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 14:
*animation = 103;
_animationFrame++;
@@ -874,6 +928,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 16;
}
break;
+
case 15:
*animation = 104;
_animationFrame++;
@@ -883,6 +938,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationState = 0;
}
break;
+
case 16:
*animation = 93;
_animationFrame++;
@@ -890,8 +946,10 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 17:
break;
+
case 18:
*animation = 105;
_animationFrame++;
@@ -908,6 +966,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
Actor_Change_Animation_Mode(kActorGordo, kAnimationModeCombatIdle);
}
break;
+
case 19:
*animation = 111;
_animationFrame++;
@@ -918,6 +977,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
Actor_Change_Animation_Mode(kActorGordo, kAnimationModeIdle);
}
break;
+
case 20:
*animation = 112;
_animationFrame++;
@@ -928,6 +988,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
Actor_Change_Animation_Mode(kActorGordo, kAnimationModeIdle);
}
break;
+
case 21:
*animation = 96;
_animationFrame++;
@@ -938,6 +999,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
Actor_Change_Animation_Mode(kActorGordo, kAnimationModeCombatIdle);
}
break;
+
case 22:
*animation = 97;
_animationFrame++;
@@ -948,18 +1010,21 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
Actor_Change_Animation_Mode(kActorGordo, kAnimationModeCombatIdle);
}
break;
+
case 23:
*animation = 113;
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(113) - 1) {
_animationFrame++;
}
break;
+
case 24:
*animation = 100;
if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(100) - 1) {
++_animationFrame;
}
break;
+
case 25:
*animation = 107;
_animationFrame++;
@@ -967,6 +1032,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 26:
*animation = 108;
_animationFrame++;
@@ -974,6 +1040,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 27:
*animation = 98;
_animationFrame++;
@@ -981,6 +1048,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 28:
*animation = 99;
_animationFrame++;
@@ -988,6 +1056,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 29:
*animation = 109;
_animationFrame++;
@@ -995,6 +1064,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 30:
*animation = 110;
_animationFrame++;
@@ -1002,6 +1072,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 31:
*animation = 101;
_animationFrame++;
@@ -1009,6 +1080,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 32:
*animation = 102;
_animationFrame++;
@@ -1016,6 +1088,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 33:
*animation = 106;
_animationFrame++;
@@ -1030,6 +1103,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 34:
*animation = 119;
_animationFrame++;
@@ -1049,6 +1123,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
Actor_Change_Animation_Mode(kActorGordo, kAnimationModeIdle);
}
break;
+
case 35:
*animation = 128;
_animationFrame++;
@@ -1056,6 +1131,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
}
break;
+
case 36:
if (_animationFrame == 0 && var_45B078) {
Actor_Change_Animation_Mode(kActorGordo, 80);
@@ -1069,6 +1145,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 37:
if (_animationFrame == 0 && var_45B078) {
Actor_Change_Animation_Mode(kActorGordo, 80);
@@ -1082,6 +1159,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
}
}
break;
+
case 38:
*animation = 131;
_animationFrame++;
@@ -1099,6 +1177,7 @@ bool AIScriptGordo::UpdateAnimation(int *animation, int *frame) {
Actor_Set_Goal_Number(kActorGordo, 243);
}
break;
+
case 39:
*animation = 132;
_animationFrame++;
@@ -1139,14 +1218,17 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
break;
}
break;
+
case kAnimationModeWalk:
_animationState = 25;
_animationFrame = 0;
break;
+
case kAnimationModeRun:
_animationState = 26;
_animationFrame = 0;
break;
+
case kAnimationModeTalk:
if (_animationState) {
_animationState = 4;
@@ -1158,6 +1240,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
var_45B078 = 0;
break;
+
case kAnimationModeCombatIdle:
switch (_animationState) {
case 14:
@@ -1181,18 +1264,22 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
break;
}
break;
+
case kAnimationModeCombatAttack:
_animationState = 18;
_animationFrame = 0;
break;
+
case kAnimationModeCombatWalk:
_animationState = 27;
_animationFrame = 0;
break;
+
case kAnimationModeCombatRun:
_animationState = 28;
_animationFrame = 0;
break;
+
case 12:
if (_animationState) {
_animationState = 5;
@@ -1204,6 +1291,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
var_45B078 = 0;
break;
+
case 13:
if (_animationState) {
_animationState = 6;
@@ -1215,6 +1303,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
var_45B078 = 0;
break;
+
case 14:
if (_animationState) {
_animationState = 7;
@@ -1226,6 +1315,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
var_45B078 = 0;
break;
+
case 15:
if (_animationState) {
_animationState = 8;
@@ -1237,6 +1327,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
var_45B078 = 0;
break;
+
case 16:
if (_animationState) {
_animationState = 9;
@@ -1248,6 +1339,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
var_45B078 = 0;
break;
+
case 17:
if (_animationState) {
_animationState = 10;
@@ -1259,6 +1351,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
var_45B078 = 0;
break;
+
case 18:
if (_animationState) {
_animationState = 11;
@@ -1270,6 +1363,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
var_45B078 = 0;
break;
+
case 19:
if (_animationState) {
_animationState = 12;
@@ -1281,6 +1375,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
var_45B078 = 0;
break;
+
case 21:
switch (_animationState) {
case 14:
@@ -1309,6 +1404,7 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
break;
}
break;
+
case 22:
if (Random_Query(0, 1)) {
_animationState = 21;
@@ -1317,38 +1413,47 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
}
_animationFrame = 0;
break;
+
case 23:
_animationState = 34;
_animationFrame = 0;
break;
+
case 26:
_animationState = 33;
_animationFrame = 0;
break;
+
case 29:
_animationState = 3;
_animationFrame = 0;
break;
+
case 30:
_animationState = 13;
_animationFrame = 0;
break;
+
case 44:
_animationState = 29;
_animationFrame = 0;
break;
+
case 45:
_animationState = 30;
_animationFrame = 0;
break;
+
case 46:
_animationState = 31;
_animationFrame = 0;
break;
+
case 47:
_animationState = 32;
_animationFrame = 0;
break;
+
case 48:
switch (_animationState) {
case 14:
@@ -1368,32 +1473,39 @@ bool AIScriptGordo::ChangeAnimationMode(int mode) {
break;
}
break;
+
case 49:
_animationState = 24;
_animationFrame = 0;
break;
+
case 53:
_animationState = 2;
_animationFrame = 0;
break;
+
case 80:
_animationState = 35;
_animationFrame = 0;
break;
+
case 81:
_animationState = 36;
_animationFrame = 0;
var_45B078 = 0;
break;
+
case 82:
_animationState = 37;
_animationFrame = 0;
var_45B078 = 0;
break;
+
case 83:
_animationState = 38;
_animationFrame = 0;
break;
+
case 84:
_animationState = 39;
_animationFrame = 0;
@@ -1509,7 +1621,7 @@ void AIScriptGordo::McCoyTalkWithGordo() {
return Player_Gains_Control();
}
-void AIScriptGordo::sub_4103B8() {
+void AIScriptGordo::talkToMcCoyAtNR02() {
Player_Loses_Control();
Actor_Face_Heading(kActorMcCoy, 308, false);
Actor_Says(kActorMcCoy, 3210, kAnimationModeTalk);
@@ -1525,14 +1637,14 @@ void AIScriptGordo::sub_4103B8() {
Actor_Says(kActorGordo, 350, 13);
Actor_Says(kActorMcCoy, 3225, 18);
Player_Gains_Control();
- dialogueWithGordo1();
+ dialogue1();
Player_Loses_Control();
Game_Flag_Set(561);
Actor_Face_Heading(kActorGordo, 506, false);
Actor_Change_Animation_Mode(kActorGordo, 23);
}
-void AIScriptGordo::dialogueWithGordo2() {
+void AIScriptGordo::dialogue2() {
Music_Stop(5);
Dialogue_Menu_Clear_List();
DM_Add_To_List_Never_Repeat_Once_Selected(820, -1, 5, 7);
@@ -1580,29 +1692,29 @@ void AIScriptGordo::dialogueWithGordo2() {
}
}
-void AIScriptGordo::dialogueWithGordo1() {
+void AIScriptGordo::dialogue1() {
Dialogue_Menu_Clear_List();
- DM_Add_To_List_Never_Repeat_Once_Selected(760, 2, 5, 6);
- DM_Add_To_List_Never_Repeat_Once_Selected(770, 6, 3, 1);
+ DM_Add_To_List_Never_Repeat_Once_Selected(760, 2, 5, 6); // ZUBEN
+ DM_Add_To_List_Never_Repeat_Once_Selected(770, 6, 3, 1); // JOB
if (Actor_Clue_Query(kActorMcCoy, kClueDektorasDressingRoom)
|| Actor_Clue_Query(kActorMcCoy, kClueWomanInAnimoidRow)
) {
- DM_Add_To_List_Never_Repeat_Once_Selected(780, 5, 5, 5);
+ DM_Add_To_List_Never_Repeat_Once_Selected(780, 5, 5, 5); // BLOND WOMAN
}
if (Actor_Clue_Query(kActorMcCoy, kClueLucy)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(790, 5, 5, 5);
+ DM_Add_To_List_Never_Repeat_Once_Selected(790, 5, 5, 5); // LUCY
}
if (Actor_Clue_Query(kActorMcCoy, kClueStolenCheese)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(800, -1, 4, 8);
+ DM_Add_To_List_Never_Repeat_Once_Selected(800, -1, 4, 8); // CHEESE
}
- Dialogue_Menu_Add_DONE_To_List(810);
+ Dialogue_Menu_Add_DONE_To_List(810); // DONE
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
switch (answer) {
- case 760:
+ case 760: // ZUBEN
Actor_Says(kActorMcCoy, 3230, kAnimationModeTalk);
Actor_Says(kActorGordo, 360, 16);
Actor_Says(kActorMcCoy, 3260, 15);
@@ -1615,7 +1727,8 @@ void AIScriptGordo::dialogueWithGordo1() {
Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -3);
}
break;
- case 770:
+
+ case 770: // JOB
Actor_Says(kActorMcCoy, 3235, kAnimationModeTalk);
Actor_Says(kActorGordo, 410, 12);
Actor_Says(kActorMcCoy, 3270, 15);
@@ -1630,7 +1743,8 @@ void AIScriptGordo::dialogueWithGordo1() {
}
Actor_Says(kActorGordo, 460, 15);
break;
- case 780:
+
+ case 780: // BLOND WOMAN
Actor_Says(kActorMcCoy, 3240, kAnimationModeTalk);
Actor_Says(kActorGordo, 470, 17);
Actor_Says(kActorMcCoy, 3285, 16);
@@ -1643,7 +1757,8 @@ void AIScriptGordo::dialogueWithGordo1() {
Actor_Says(kActorGordo, 520, 12);
Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -4);
break;
- case 790:
+
+ case 790: // LUCY
Actor_Says(kActorMcCoy, 3245, kAnimationModeTalk);
Actor_Says(kActorGordo, 470, 17);
Actor_Says(kActorMcCoy, 3285, 16);
@@ -1656,7 +1771,8 @@ void AIScriptGordo::dialogueWithGordo1() {
Actor_Says(kActorGordo, 520, 12);
Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -1);
break;
- case 800:
+
+ case 800: // CHEESE
Actor_Says(kActorMcCoy, 3250, kAnimationModeTalk);
Actor_Says(kActorGordo, 530, 18);
Actor_Says(kActorMcCoy, 3300, 15);
@@ -1669,13 +1785,14 @@ void AIScriptGordo::dialogueWithGordo1() {
Actor_Says(kActorGordo, 570, 14);
Actor_Clue_Acquire(kActorMcCoy, kClueGordoConfession, false, kActorGordo);
break;
- case 810:
+
+ case 810: // DONE
Actor_Says(kActorMcCoy, 3255, kAnimationModeTalk);
break;
}
}
-void AIScriptGordo::sub_41117C() {
+void AIScriptGordo::unknown() {
// this has no real use as _animationState is always 0
switch (_animationState) {
case 0:
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index c03927d..a690c74 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -941,7 +941,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case 232:
- Game_Flag_Set(532);
+ Game_Flag_Set(kFlagNR01toNR02);
Set_Enter(kSetNR02, kSceneNR02);
return true;
diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h
index ac16b70..d137e3c 100644
--- a/engines/bladerunner/script/ai_script.h
+++ b/engines/bladerunner/script/ai_script.h
@@ -138,10 +138,10 @@ DECLARE_SCRIPT(Gordo)
int _state;
void McCoyTalkWithGordo();
- void sub_4103B8();
- void dialogueWithGordo2();
- void dialogueWithGordo1();
- void sub_41117C();
+ void talkToMcCoyAtNR02();
+ void dialogue2();
+ void dialogue1();
+ void unknown();
END_SCRIPT
DECLARE_SCRIPT(Dektora)
diff --git a/engines/bladerunner/script/scene/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp
index a469b83..18b3ac2 100644
--- a/engines/bladerunner/script/scene/hf01.cpp
+++ b/engines/bladerunner/script/scene/hf01.cpp
@@ -360,7 +360,7 @@ void SceneScriptHF01::PlayerWalkedIn() {
}
if (Game_Flag_Query(kFlagSpinnerMissing)) {
- Actor_Set_Goal_Number(kActorSteele, 280);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleTalkAboutMissingSpinner);
Game_Flag_Reset(kFlagSpinnerMissing);
//return true;
return;
diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp
index c91fdb4..d9300e4 100644
--- a/engines/bladerunner/script/scene/nr01.cpp
+++ b/engines/bladerunner/script/scene/nr01.cpp
@@ -24,6 +24,13 @@
namespace BladeRunner {
+enum kNR01Loops {
+ kNR01LoopInshot = 0,
+ kNR01LoopMainLoop = 1,
+ kNR01LoopOutshoot = 3,
+ kNR01LoopMainLoopNoSpinner = 4
+};
+
void SceneScriptNR01::InitializeScene() {
if (Game_Flag_Query(kFlagSpinnerMissing)) {
Setup_Scene_Information(-153.86f, 23.88f, -570.21f, 402);
@@ -31,13 +38,13 @@ void SceneScriptNR01::InitializeScene() {
Setup_Scene_Information( -416.0f, 31.93f, -841.0f, 200);
Actor_Set_Invisible(kActorMcCoy, true);
Preload(167);
- } else if (Game_Flag_Query(534)) {
+ } else if (Game_Flag_Query(kFlagNR03toNR01)) {
Setup_Scene_Information( -416.0f, 31.93f, -841.0f, 200);
} else if (Game_Flag_Query(kFlagUG06toNR01)) {
Setup_Scene_Information( -270.0f, 4.93f, -1096.0f, 500);
- } else if (Game_Flag_Query(533)) {
+ } else if (Game_Flag_Query(kFlagNR02toNR01)) {
Setup_Scene_Information( 312.0f, 31.66f, -901.0f, 700);
- } else if (Game_Flag_Query(545)) {
+ } else if (Game_Flag_Query(kFlagNotUsed545)) {
Setup_Scene_Information( -170.0f, 24.0f, -574.0f, 768);
} else {
Setup_Scene_Information( 76.0f, 23.88f, -109.0f, 966);
@@ -79,15 +86,15 @@ void SceneScriptNR01::InitializeScene() {
if ( Game_Flag_Query(kFlagSpinnerAtNR01)
&& !Game_Flag_Query(kFlagArrivedFromSpinner1)
) {
- Scene_Loop_Start_Special(0, 0, 0);
- Scene_Loop_Set_Default(1);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kNR01LoopInshot, false);
+ Scene_Loop_Set_Default(kNR01LoopMainLoop);
Game_Flag_Set(kFlagArrivedFromSpinner1);
} else if (Game_Flag_Query(kFlagSpinnerAtNR01)
&& Game_Flag_Query(kFlagArrivedFromSpinner1)
) {
- Scene_Loop_Set_Default(1);
+ Scene_Loop_Set_Default(kNR01LoopMainLoop);
} else {
- Scene_Loop_Set_Default(4);
+ Scene_Loop_Set_Default(kNR01LoopMainLoopNoSpinner);
}
}
@@ -124,12 +131,13 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
} else {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(535);
+ Game_Flag_Set(kFlagNR01toNR03);
Set_Enter(kSetNR03, kSceneNR03);
}
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -281.0f, 31.93f, -1061.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 45, false);
@@ -141,15 +149,17 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 312.0f, 31.66f, -901.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(532);
+ Game_Flag_Set(kFlagNR01toNR02);
Set_Enter(kSetNR02, kSceneNR02);
}
return true;
}
+
if (exitId == 3) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 108.0f, 23.88f, -93.0f, 0, true, false, 0)) {
Game_Flag_Reset(kFlagMcCoyInChinaTown);
@@ -167,7 +177,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationMcCoysApartment:
Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
@@ -175,7 +185,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationRuncitersAnimals:
Game_Flag_Set(kFlagMcCoyInRunciters);
@@ -183,7 +193,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationChinatown:
Game_Flag_Set(kFlagMcCoyInChinaTown);
@@ -191,7 +201,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationAnimoidRow:
Game_Flag_Set(kFlagMcCoyInAnimoidRow);
@@ -199,7 +209,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationTyrellBuilding:
Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
@@ -207,7 +217,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationDNARow:
Game_Flag_Set(kFlagMcCoyInDNARow);
@@ -215,7 +225,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationBradburyBuilding:
Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
@@ -223,14 +233,14 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationHysteriaHall:
Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
default:
Player_Loses_Control();
@@ -246,12 +256,17 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
}
bool SceneScriptNR01::ClickedOn2DRegion(int region) {
- if (region == 0 && Player_Query_Combat_Mode()) {
+ if (region == 0
+ && Player_Query_Combat_Mode()
+ ) {
Sound_Play(517, 100, 0, 0, 50);
Actor_Set_Goal_Number(kActorSteele, 260);
Scene_2D_Region_Remove(0);
}
- if (region == 1 && Player_Query_Combat_Mode()) {
+
+ if (region == 1
+ && Player_Query_Combat_Mode()
+ ) {
Sound_Play(517, 100, 0, 0, 50);
Actor_Set_Goal_Number(kActorGordo, 299);
Actor_Set_Goal_Number(kActorSteele, 258);
@@ -266,6 +281,7 @@ void SceneScriptNR01::SceneFrameAdvanced(int frame) {
if (frame == 61) {
Sound_Play(118, 40, 0, 0, 50);
}
+
if (frame == 184) {
Sound_Play(117, 40, 80, 80, 50);
}
@@ -277,7 +293,7 @@ void SceneScriptNR01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptNR01::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagSpinnerMissing)) {
- Actor_Set_Goal_Number(kActorSteele, 280);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleTalkAboutMissingSpinner);
Game_Flag_Reset(kFlagSpinnerMissing);
//return true;
return;
@@ -289,21 +305,21 @@ void SceneScriptNR01::PlayerWalkedIn() {
Scene_2D_Region_Add(0, 450, 316, 464, 333);
Scene_2D_Region_Add(1, 233, 321, 240, 362);
ADQ_Add(kActorGordo, 70, 81);
- ADQ_Add(kActorSteele, 990, 3);
+ ADQ_Add(kActorSteele, 990, kAnimationModeTalk);
ADQ_Add(kActorGordo, 80, 82);
ADQ_Add(kActorGordo, 90, 81);
- ADQ_Add(kActorSteele, 1010, 3);
+ ADQ_Add(kActorSteele, 1010, kAnimationModeTalk);
ADQ_Add(kActorGordo, 100, 81);
- ADQ_Add(kActorSteele, 1020, 3);
+ ADQ_Add(kActorSteele, 1020, kAnimationModeTalk);
ADQ_Add(kActorGordo, 110, 82);
- ADQ_Add(kActorSteele, 1030, 3);
- ADQ_Add(kActorSteele, 1040, 3);
+ ADQ_Add(kActorSteele, 1030, kAnimationModeTalk);
+ ADQ_Add(kActorSteele, 1040, kAnimationModeTalk);
ADQ_Add(kActorGordo, 120, 82);
}
if (Game_Flag_Query(604)) {
if (Game_Flag_Query(622)) {
- ADQ_Add(kActorHanoi, 150, 3);
+ ADQ_Add(kActorHanoi, 150, kAnimationModeTalk);
Game_Flag_Reset(622);
}
Game_Flag_Reset(604);
@@ -319,9 +335,9 @@ void SceneScriptNR01::PlayerWalkedIn() {
return;
}
- if (Game_Flag_Query(534)) {
+ if (Game_Flag_Query(kFlagNR03toNR01)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -380.0f, 31.73f, -841.0f, 0, false, false, 0);
- Game_Flag_Reset(534);
+ Game_Flag_Reset(kFlagNR03toNR01);
} else {
if (Game_Flag_Query(kFlagUG06toNR01)) {
Loop_Actor_Travel_Stairs(kActorMcCoy, 3, true, kAnimationModeIdle);
@@ -390,16 +406,16 @@ void SceneScriptNR01::PlayerWalkedIn() {
}
}
}
- } else if (Game_Flag_Query(533)) {
+ } 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(533);
+ 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);
}
- } else if (Game_Flag_Query(545)) {
- Game_Flag_Reset(545);
+ } 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);
@@ -433,8 +449,8 @@ void SceneScriptNR01::PlayerWalkedOut() {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
if (!Game_Flag_Query(kFlagNR01toUG06)
- && !Game_Flag_Query(532)
- && !Game_Flag_Query(535)
+ && !Game_Flag_Query(kFlagNR01toNR02)
+ && !Game_Flag_Query(kFlagNR01toNR03)
&& !Game_Flag_Query(632)
&& !Game_Flag_Query(722)
) {
diff --git a/engines/bladerunner/script/scene/nr02.cpp b/engines/bladerunner/script/scene/nr02.cpp
index 97a4600..88909dc 100644
--- a/engines/bladerunner/script/scene/nr02.cpp
+++ b/engines/bladerunner/script/scene/nr02.cpp
@@ -25,10 +25,12 @@
namespace BladeRunner {
void SceneScriptNR02::InitializeScene() {
- sub_402134();
+ playNextMusic();
Setup_Scene_Information(-283.0f, -24.0f, 326.0f, 200);
- Game_Flag_Reset(532);
+ Game_Flag_Reset(kFlagNR01toNR02);
+
Scene_Exit_Add_2D_Exit(0, 0, 105, 75, 291, 3);
+
Ambient_Sounds_Add_Looping_Sound(280, 50, 38, 0);
Ambient_Sounds_Add_Sound(252, 3, 60, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(254, 3, 60, 25, 25, -100, 100, -101, -101, 0, 0);
@@ -72,10 +74,15 @@ bool SceneScriptNR02::MouseClick(int x, int y) {
}
bool SceneScriptNR02::ClickedOn3DObject(const char *objectName, bool a2) {
- if (Object_Query_Click("VID PHONE 01", objectName) || Object_Query_Click("VID PHONE 02", objectName)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -191.9f, -24.0f, 62.15f, 0, 1, false, 0)) {
+ if (Object_Query_Click("VID PHONE 01", objectName)
+ || Object_Query_Click("VID PHONE 02", objectName)
+ ) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -191.9f, -24.0f, 62.15f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 13, false);
- if (Actor_Clue_Query(kActorMcCoy, kClueFolder) && Actor_Clue_Query(kActorMcCoy, kClueGuzzaFramedMcCoy) && !Game_Flag_Query(670)) {
+ if ( Actor_Clue_Query(kActorMcCoy, kClueFolder)
+ && Actor_Clue_Query(kActorMcCoy, kClueGuzzaFramedMcCoy)
+ && !Game_Flag_Query(670)
+ ) {
Actor_Set_Goal_Number(kActorMcCoy, 350);
Game_Flag_Set(670);
} else {
@@ -98,27 +105,32 @@ bool SceneScriptNR02::ClickedOn3DObject(const char *objectName, bool a2) {
bool SceneScriptNR02::ClickedOnActor(int actorId) {
if (actorId == kActorGordo
- && Actor_Query_Goal_Number(kActorGordo) == 201
+ && Actor_Query_Goal_Number(kActorGordo) == kGoalGordoWaitAtNR02
) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 67.37f, -24.0f, 389.32f, 0, true, false, 0)) {
- Actor_Set_Goal_Number(kActorGordo, 215);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoTalkToMcCoyAtNR02);
}
}
return false;
}
bool SceneScriptNR02::ClickedOnItem(int itemId, bool a2) {
- if ((itemId == 89 || itemId == 90) && !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);
- Item_Pickup_Spin_Effect(953, 214, 380);
- Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter1, true, -1);
- }
- if (itemId == 90) {
- Item_Remove_From_World(90);
- Item_Pickup_Spin_Effect(954, 214, 380);
- Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter2, true, -1);
+ if (itemId == 89
+ || itemId == 90
+ ) {
+ 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);
+ Item_Pickup_Spin_Effect(953, 214, 380);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter1, true, -1);
+ }
+
+ if (itemId == 90) {
+ Item_Remove_From_World(90);
+ Item_Pickup_Spin_Effect(954, 214, 380);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter2, true, -1);
+ }
}
}
return false;
@@ -126,13 +138,15 @@ 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, 1, false, 0)) {
- if (Actor_Query_Goal_Number(kActorGordo) < 230 || Actor_Query_Goal_Number(kActorGordo) > 250) {
+ 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
+ ) {
Music_Stop(2);
}
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(533);
+ Game_Flag_Set(kFlagNR02toNR01);
Set_Enter(kSetNR01, kSceneNR01);
}
return true;
@@ -145,8 +159,12 @@ bool SceneScriptNR02::ClickedOn2DRegion(int region) {
}
void SceneScriptNR02::SceneFrameAdvanced(int frame) {
- if (!Music_Is_Playing() && (Actor_Query_Goal_Number(kActorGordo) < 210 || Actor_Query_Goal_Number(kActorGordo) > 222)) {
- sub_402134();
+ if (!Music_Is_Playing()
+ && (Actor_Query_Goal_Number(kActorGordo) < 210
+ || Actor_Query_Goal_Number(kActorGordo) > 222
+ )
+ ) {
+ playNextMusic();
}
//return false;
}
@@ -158,62 +176,81 @@ void SceneScriptNR02::PlayerWalkedIn() {
if (Actor_Query_Goal_Number(kActorGordo) == 211) {
Actor_Set_Goal_Number(kActorGordo, 220);
}
+
if (Actor_Query_Goal_Number(kActorGordo) == 204) {
Actor_Set_Goal_Number(kActorGordo, 205);
}
+
if (Actor_Query_Goal_Number(kActorGordo) == 206) {
Actor_Set_Goal_Number(kActorGordo, 205);
}
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -203.0f, -24.0f, 334.0f, 0, 0, false, 0);
+
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -203.0f, -24.0f, 334.0f, 0, false, false, 0);
//return false;
}
void SceneScriptNR02::PlayerWalkedOut() {
Music_Stop(2);
- if (Actor_Query_Goal_Number(kActorGordo) < 210 && Actor_Query_Goal_Number(kActorGordo) >= 205) {
+ if (Actor_Query_Goal_Number(kActorGordo) < 210
+ && Actor_Query_Goal_Number(kActorGordo) >= 205
+ ) {
Actor_Set_Goal_Number(kActorGordo, 204);
}
}
void SceneScriptNR02::DialogueQueueFlushed(int a1) {
- if (Player_Query_Current_Scene() == 55 && Actor_Query_Goal_Number(kActorGordo) == 206) {
+ if (Player_Query_Current_Scene() == kSceneNR02
+ && Actor_Query_Goal_Number(kActorGordo) == 206
+ ) {
Sound_Play(575, 50, 0, 0, 50);
Sound_Play(321, 50, 0, 0, 50);
}
- if (Player_Query_Current_Scene() == 55 && Actor_Query_Goal_Number(kActorGordo) == 207) {
+
+ if (Player_Query_Current_Scene() == kSceneNR02
+ && Actor_Query_Goal_Number(kActorGordo) == 207
+ ) {
Sound_Play(576, 50, 0, 0, 50);
Sound_Play(323, 50, 0, 0, 50);
}
- if (Player_Query_Current_Scene() == 55 && Actor_Query_Goal_Number(kActorGordo) == 208) {
+
+ if (Player_Query_Current_Scene() == kSceneNR02
+ && Actor_Query_Goal_Number(kActorGordo) == 208
+ ) {
Sound_Play(579, 50, 0, 0, 50);
Sound_Play(324, 50, 0, 0, 50);
}
- if (Player_Query_Current_Scene() == 55 && Actor_Query_Goal_Number(kActorGordo) > 205 && Actor_Query_Goal_Number(kActorGordo) < 210) {
+
+ if (Player_Query_Current_Scene() == kSceneNR02
+ && Actor_Query_Goal_Number(kActorGordo) > 205
+ && Actor_Query_Goal_Number(kActorGordo) < 210
+ ) {
Actor_Set_Goal_Number(kActorGordo, 205);
- //return true;
- return;
- } else if (Actor_Query_Goal_Number(kActorGordo) > 205 && Actor_Query_Goal_Number(kActorGordo) < 210) {
+ return; // true;
+ }
+
+ if (Actor_Query_Goal_Number(kActorGordo) > 205
+ && Actor_Query_Goal_Number(kActorGordo) < 210
+ ) {
Actor_Set_Goal_Number(kActorGordo, 204);
- //return true;
- return;
+ return; // true;
}
//return false;
}
-void SceneScriptNR02::sub_402134() {
- int v0 = Global_Variable_Query(50);
- if (v0 == 0) {
+void SceneScriptNR02::playNextMusic() {
+ int track = Global_Variable_Query(kVariableNR02Music);
+ if (track == 0) {
Music_Play(8, 41, 0, 2, -1, 0, 0);
- } else if (v0 == 1) {
+ } else if (track == 1) {
Music_Play(9, 41, 0, 2, -1, 0, 0);
- } else if (v0 == 2) {
+ } else if (track == 2) {
Music_Play(10, 41, 0, 2, -1, 0, 0);
}
- v0++;
- if (v0 > 2) {
- v0 = 0;
+ track++;
+ if (track > 2) {
+ track = 0;
}
- Global_Variable_Set(50, v0);
+ Global_Variable_Set(kVariableNR02Music, track);
}
} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/scene/nr03.cpp b/engines/bladerunner/script/scene/nr03.cpp
index a2a09cb..641b5c4 100644
--- a/engines/bladerunner/script/scene/nr03.cpp
+++ b/engines/bladerunner/script/scene/nr03.cpp
@@ -132,11 +132,12 @@ bool SceneScriptNR03::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 410.0f, -70.19f, -715.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(534);
+ Game_Flag_Set(kFlagNR03toNR01);
Set_Enter(kSetNR01, kSceneNR01);
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -161.0f, -70.19f, -1139.0f, 0, 1, false, 0)) {
if (Actor_Query_Which_Set_In(kActorHanoi) == 55) {
@@ -164,6 +165,7 @@ bool SceneScriptNR03::ClickedOnExit(int exitId) {
return true;
}
+
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -151.0f, -70.19f, -476.0f, 12, 1, false, 0)) {
if (Actor_Query_Goal_Number(kActorHanoi) == 213 || Actor_Query_Which_Set_In(kActorHanoi) != 55) {
@@ -261,14 +263,14 @@ void SceneScriptNR03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptNR03::PlayerWalkedIn() {
Player_Set_Combat_Mode(false);
if (Game_Flag_Query(573)) {
- if (Game_Flag_Query(535) ) {
+ if (Game_Flag_Query(kFlagNR01toNR03) ) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 302.0f, -70.19f, -715.0f, 0, 0, false, 0);
- Game_Flag_Reset(535);
+ Game_Flag_Reset(kFlagNR01toNR03);
}
} else {
Game_Flag_Set(573);
Async_Actor_Walk_To_XYZ(kActorMcCoy, 206.0f, -70.19f, -643.0f, 0, false);
- Game_Flag_Reset(535);
+ Game_Flag_Reset(kFlagNR01toNR03);
Actor_Voice_Over(1490, kActorVoiceOver);
Actor_Voice_Over(1510, kActorVoiceOver);
Actor_Voice_Over(1520, kActorVoiceOver);
diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h
index 498424a..9f5a100 100644
--- a/engines/bladerunner/script/scene_script.h
+++ b/engines/bladerunner/script/scene_script.h
@@ -298,7 +298,7 @@ DECLARE_SCRIPT(NR01)
END_SCRIPT
DECLARE_SCRIPT(NR02)
- void sub_402134();
+ void playNextMusic();
END_SCRIPT
DECLARE_SCRIPT(NR03)
Commit: 578d98ee1265eacfe79a4154225e8120b564ae0e
https://github.com/scummvm/scummvm/commit/578d98ee1265eacfe79a4154225e8120b564ae0e
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-28T20:45:48+01:00
Commit Message:
BLADERUNNER: Cleanup of scripts for Gordo chase
Changed paths:
engines/bladerunner/game_constants.h
engines/bladerunner/script/ai/bullet_bob.cpp
engines/bladerunner/script/ai/clovis.cpp
engines/bladerunner/script/ai/early_q.cpp
engines/bladerunner/script/ai/gordo.cpp
engines/bladerunner/script/ai/holloway.cpp
engines/bladerunner/script/ai/lucy.cpp
engines/bladerunner/script/ai/mccoy.cpp
engines/bladerunner/script/ai/steele.cpp
engines/bladerunner/script/ai/zuben.cpp
engines/bladerunner/script/ai_script.h
engines/bladerunner/script/init_script.cpp
engines/bladerunner/script/scene/ct05.cpp
engines/bladerunner/script/scene/hf01.cpp
engines/bladerunner/script/scene/hf03.cpp
engines/bladerunner/script/scene/hf04.cpp
engines/bladerunner/script/scene/hf05.cpp
engines/bladerunner/script/scene/hf06.cpp
engines/bladerunner/script/scene/hf07.cpp
engines/bladerunner/script/scene/kp07.cpp
engines/bladerunner/script/scene/nr01.cpp
engines/bladerunner/script/scene/nr02.cpp
engines/bladerunner/script/scene/nr08.cpp
engines/bladerunner/script/scene/nr11.cpp
engines/bladerunner/script/scene/rc03.cpp
engines/bladerunner/script/scene/ug05.cpp
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index d447b12..b26d5d5 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 1c1730c..1a97a82 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 4702c35..312ea08 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 826a339..2e45ffe 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 e16ca05..463960c 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 a64183b..3b37244 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 0e69ea6..f735415 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 120d322..b532088 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 a690c74..3d9e0e1 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 6155a27..eb7de88 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 d137e3c..fc7a0b1 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 9364df8..9133873 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 2c5c908..1fc53f8 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 18b3ac2..a91f55b 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 849f75f..4e1177f 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 14cad2f..6d30563 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 8ad33f1..c78bf71 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 64ea124..7b5fd44 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 1eb8867..8a8f4eb 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 d0fc730..56b9a91 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 d9300e4..856960b 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 88909dc..eb30957 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 9a3e916..8fa1d06 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 cf8143e..b450601 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 28fbe7c..e539bd9 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 324ef08..8bcb839 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;
}
Commit: 7f421be835a694233ab238a13ffc89ce76624723
https://github.com/scummvm/scummvm/commit/7f421be835a694233ab238a13ffc89ce76624723
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-28T20:45:59+01:00
Commit Message:
BLADERUNNER: Fixed small issue in combat calculation
Better variable names in actor combat classes.
Changed paths:
engines/bladerunner/actor.cpp
engines/bladerunner/actor.h
engines/bladerunner/actor_combat.cpp
engines/bladerunner/actor_combat.h
engines/bladerunner/script/script.cpp
engines/bladerunner/script/script.h
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp
index c9528cf..d0ba7cc 100644
--- a/engines/bladerunner/actor.cpp
+++ b/engines/bladerunner/actor.cpp
@@ -1009,13 +1009,13 @@ void Actor::modifyMaxHP(signed int change) {
}
-void Actor::combatModeOn(int initialState, bool rangedAttack, int enemyId, int waypointType, int animationModeCombatIdle, int animationModeCombatWalk, int animationModeCombatRun, int fleeRatio, int coverRatio, int actionRatio, int damage, int range, bool unstoppable) {
+void Actor::combatModeOn(int initialState, bool rangedAttack, int enemyId, int waypointType, int animationModeCombatIdle, int animationModeCombatWalk, int animationModeCombatRun, int fleeRatio, int coverRatio, int attackRatio, int damage, int range, bool unstoppable) {
_animationModeCombatIdle = animationModeCombatIdle;
_animationModeCombatWalk = animationModeCombatWalk;
_animationModeCombatRun = animationModeCombatRun;
_inCombat = true;
if (_id != kActorMcCoy) {
- _combatInfo->combatOn(_id, initialState, rangedAttack, enemyId, waypointType, fleeRatio, coverRatio, actionRatio, damage, range, unstoppable);
+ _combatInfo->combatOn(_id, initialState, rangedAttack, enemyId, waypointType, fleeRatio, coverRatio, attackRatio, damage, range, unstoppable);
}
stopWalking(false);
changeAnimationMode(_animationModeCombatIdle, false);
diff --git a/engines/bladerunner/actor.h b/engines/bladerunner/actor.h
index 896f3a2..90588c8 100644
--- a/engines/bladerunner/actor.h
+++ b/engines/bladerunner/actor.h
@@ -229,7 +229,7 @@ public:
void retire(bool isRetired, int width, int height, int retiredByActorId);
- void combatModeOn(int initialState, bool rangedAttack, int enemyId, int waypointType, int animationModeCombatIdle, int animationModeCombatWalk, int animationModeCombatRun, int fleeRatio, int coverRatio, int actionRatio, int damage, int range, bool unstoppable);
+ void combatModeOn(int initialState, bool rangedAttack, int enemyId, int waypointType, int animationModeCombatIdle, int animationModeCombatWalk, int animationModeCombatRun, int fleeRatio, int coverRatio, int attackRatio, int damage, int range, bool unstoppable);
void combatModeOff();
void setGoal(int goalNumber);
diff --git a/engines/bladerunner/actor_combat.cpp b/engines/bladerunner/actor_combat.cpp
index 4bcce5d..7271749 100644
--- a/engines/bladerunner/actor_combat.cpp
+++ b/engines/bladerunner/actor_combat.cpp
@@ -50,7 +50,7 @@ void ActorCombat::setup() {
reset();
}
-void ActorCombat::combatOn(int actorId, int initialState, bool rangedAttackFlag, int enemyId, int waypointType, int fleeRatio, int coverRatio, int actionRatio, int damage, int range, bool unstoppable) {
+void ActorCombat::combatOn(int actorId, int initialState, bool rangedAttackFlag, int enemyId, int waypointType, int fleeRatio, int coverRatio, int attackRatio, int damage, int range, bool unstoppable) {
_actorId = actorId;
_state = initialState;
_rangedAttack = rangedAttackFlag;
@@ -59,10 +59,10 @@ void ActorCombat::combatOn(int actorId, int initialState, bool rangedAttackFlag,
_damage = damage;
_fleeRatioConst = fleeRatio;
_coverRatioConst = coverRatio;
- _actionRatioConst = actionRatio;
+ _attackRatioConst = attackRatio;
_fleeRatio = fleeRatio;
_coverRatio = coverRatio;
- _actionRatio = actionRatio;
+ _attackRatio = attackRatio;
_active = true;
if (_rangedAttack) {
_range = range;
@@ -133,10 +133,10 @@ void ActorCombat::tick() {
_actorPosition = actor->getXYZ();
_enemyPosition = enemy->getXYZ();
- if (_actionRatioConst >= 0) {
- _actionRatio = _actionRatioConst;
+ if (_attackRatioConst >= 0) {
+ _attackRatio = _attackRatioConst;
} else {
- _actionRatio = calculateActionRatio();
+ _attackRatio = calculateAttackRatio();
}
if (_vm->_combat->findCoverWaypoint(_waypointType, _actorId, _enemyId) != -1) {
@@ -158,8 +158,8 @@ void ActorCombat::tick() {
float dist = actor->distanceFromActor(_enemyId);
int oldState = _state;
- if (_actionRatio < _fleeRatio || _actionRatio < _coverRatio) {
- if (_coverRatio >= _fleeRatio && _coverRatio >= _actionRatio) {
+ if (_attackRatio < _fleeRatio || _attackRatio < _coverRatio) {
+ if (_coverRatio >= _fleeRatio && _coverRatio >= _attackRatio) {
_state = kActorCombatStateCover;
} else {
_state = kActorCombatStateFlee;
@@ -236,20 +236,20 @@ void ActorCombat::hitAttempt() {
return;
}
- int aggressiveness = 0;
+ int attackCoefficient = 0;
if (_rangedAttack) {
- aggressiveness = _rangedAttack == 1 ? getaggressivenessRangedAttack() : 0;
+ attackCoefficient = _rangedAttack ? getCoefficientRangedAttack() : 0;
} else {
- aggressiveness = getaggressivenessCloseAttack();
+ attackCoefficient = getCoefficientCloseAttack();
}
- if (aggressiveness == 0) {
+ if (attackCoefficient == 0) {
return;
}
int random = _vm->_rnd.getRandomNumberRng(1, 100);
- if (random <= aggressiveness) {
+ if (random <= attackCoefficient) {
if (enemy->isWalking()) {
enemy->stopWalking(true);
}
@@ -263,9 +263,9 @@ void ActorCombat::hitAttempt() {
int damage = 0;
if (_rangedAttack) {
- damage = getDamageRangedAttack(random, aggressiveness);
+ damage = getDamageRangedAttack(random, attackCoefficient);
} else {
- damage = getDamageCloseAttack(random, aggressiveness);
+ damage = getDamageCloseAttack(random, attackCoefficient);
}
int enemyHp = MAX(enemy->getCurrentHP() - damage, 0);
@@ -274,9 +274,9 @@ void ActorCombat::hitAttempt() {
if (enemyHp <= 0) {
if (!enemy->isRetired()) {
if (enemy->inCombat()) {
- enemy->changeAnimationMode(49, false);
+ enemy->changeAnimationMode(kAnimationModeCombatDie, false);
} else {
- enemy->changeAnimationMode(48, false);
+ enemy->changeAnimationMode(kAnimationModeDie, false);
}
sentenceId = 9020;
}
@@ -301,10 +301,10 @@ void ActorCombat::save(SaveFileWriteStream &f) {
f.writeInt(_damage);
f.writeInt(_fleeRatio);
f.writeInt(_coverRatio);
- f.writeInt(_actionRatio);
+ f.writeInt(_attackRatio);
f.writeInt(_fleeRatioConst);
f.writeInt(_coverRatioConst);
- f.writeInt(_actionRatioConst);
+ f.writeInt(_attackRatioConst);
f.writeInt(_range);
f.writeInt(_unstoppable);
f.writeInt(_actorHp);
@@ -325,10 +325,10 @@ void ActorCombat::load(SaveFileReadStream &f) {
_damage = f.readInt();
_fleeRatio = f.readInt();
_coverRatio = f.readInt();
- _actionRatio = f.readInt();
+ _attackRatio = f.readInt();
_fleeRatioConst = f.readInt();
_coverRatioConst = f.readInt();
- _actionRatioConst = f.readInt();
+ _attackRatioConst = f.readInt();
_range = f.readInt();
_unstoppable = f.readInt();
_actorHp = f.readInt();
@@ -349,13 +349,13 @@ void ActorCombat::reset() {
_damage = 0;
_fleeRatio = -1;
_coverRatio = -1;
- _actionRatio = -1;
+ _attackRatio = -1;
_fleeRatioConst = -1;
_coverRatioConst = -1;
- _actionRatioConst = -1;
+ _attackRatioConst = -1;
_actorHp = 0;
_range = 300;
- _unstoppable = false;
+ _unstoppable = false;
_actorPosition = Vector3(0.0f, 0.0f, 0.0f);
_enemyPosition = Vector3(0.0f, 0.0f, 0.0f);
_coversWaypointCount = 0;
@@ -515,7 +515,7 @@ void ActorCombat::faceEnemy() {
_vm->_actors[_actorId]->setFacing(angle_1024(_actorPosition.x, _actorPosition.z, _enemyPosition.x, _enemyPosition.z), false);
}
-int ActorCombat::getaggressivenessCloseAttack() const{
+int ActorCombat::getCoefficientCloseAttack() const{
Actor *actor = _vm->_actors[_actorId];
Actor *enemy = _vm->_actors[_enemyId];
@@ -545,7 +545,7 @@ int ActorCombat::getaggressivenessCloseAttack() const{
return aggressiveness + (abs(angle - 128) / 3.7f);
}
-int ActorCombat::getaggressivenessRangedAttack() const {
+int ActorCombat::getCoefficientRangedAttack() const {
Actor *actor = _vm->_actors[_actorId];
Actor *enemy = _vm->_actors[_enemyId];
@@ -588,7 +588,7 @@ int ActorCombat::getDamageRangedAttack(int min, int max) const {
return ((MIN(max - min, 30) * 100.0f / 60.0f) + 50) * _damage / 100;
}
-int ActorCombat::calculateActionRatio() const {
+int ActorCombat::calculateAttackRatio() const {
Actor *actor = _vm->_actors[_actorId];
Actor *enemy = _vm->_actors[_enemyId];
@@ -597,7 +597,7 @@ int ActorCombat::calculateActionRatio() const {
int enemyHpFactor = 100 - enemy->getCurrentHP();
int combatFactor = enemy->inCombat() ? 0 : 100;
int angleFactor = (100 * abs(enemy->angleTo(_actorPosition))) / 512;
- int distanceFactor = 2 * (50 - MAX(actor->distanceFromActor(_enemyId) / 12.0f, 50.0f));
+ int distanceFactor = 2 * (50 - MIN(actor->distanceFromActor(_enemyId) / 12.0f, 50.0f));
if (_rangedAttack) {
return
@@ -629,7 +629,7 @@ int ActorCombat::calculateCoverRatio() const {
int actorHpFactor = 100 - actor->getCurrentHP();
int enemyHpFactor = enemy->getCurrentHP();
int aggressivenessFactor = 100 - actor->getCombatAggressiveness();
- int distanceFactor = 2 * MAX(actor->distanceFromActor(_enemyId) / 12.0f, 50.0f);
+ int distanceFactor = 2 * MIN(actor->distanceFromActor(_enemyId) / 12.0f, 50.0f);
if (_rangedAttack) {
return
diff --git a/engines/bladerunner/actor_combat.h b/engines/bladerunner/actor_combat.h
index 8f36445..1b76463 100644
--- a/engines/bladerunner/actor_combat.h
+++ b/engines/bladerunner/actor_combat.h
@@ -43,10 +43,10 @@ class ActorCombat {
int _damage;
int _fleeRatio;
int _coverRatio;
- int _actionRatio;
+ int _attackRatio;
int _fleeRatioConst;
int _coverRatioConst;
- int _actionRatioConst;
+ int _attackRatioConst;
int _actorHp;
int _range;
bool _unstoppable;
@@ -62,7 +62,7 @@ public:
void setup();
- void combatOn(int actorId, int initialState, bool rangedAttack, int enemyId, int waypointType, int fleeRatio, int coverRatio, int actionRatio, int damage, int range, bool unstoppable);
+ void combatOn(int actorId, int initialState, bool rangedAttack, int enemyId, int waypointType, int fleeRatio, int coverRatio, int attackRatio, int damage, int range, bool unstoppable);
void combatOff();
void tick();
@@ -86,13 +86,13 @@ private:
void faceEnemy();
- int getaggressivenessCloseAttack() const;
- int getaggressivenessRangedAttack() const;
+ int getCoefficientCloseAttack() const;
+ int getCoefficientRangedAttack() const;
int getDamageCloseAttack(int min, int max) const;
int getDamageRangedAttack(int min, int max) const;
- int calculateActionRatio() const;
+ int calculateAttackRatio() const;
int calculateCoverRatio() const;
int calculateFleeRatio() const;
diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp
index 21ddebd..9795e29 100644
--- a/engines/bladerunner/script/script.cpp
+++ b/engines/bladerunner/script/script.cpp
@@ -266,9 +266,9 @@ void ScriptBase::Actor_Combat_AI_Hit_Attempt(int actorId) {
}
}
-void ScriptBase::Non_Player_Actor_Combat_Mode_On(int actorId, int initialState, bool rangedAttack, int enemyId, int waypointType, int animationModeCombatIdle, int animationModeCombatWalk, int animationModeCombatRun, int fleeRatio, int coverRatio, int actionRatio, int damage, int range, bool unstoppable) {
- debugC(kDebugScript, "Non_Player_Actor_Combat_Mode_On(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)", actorId, initialState, rangedAttack, enemyId, waypointType, animationModeCombatIdle, animationModeCombatWalk, animationModeCombatRun, fleeRatio, coverRatio, actionRatio, damage, range, unstoppable);
- _vm->_actors[actorId]->combatModeOn(initialState, rangedAttack, enemyId, waypointType, animationModeCombatIdle, animationModeCombatWalk, animationModeCombatRun, fleeRatio, coverRatio, actionRatio, damage, range, unstoppable);
+void ScriptBase::Non_Player_Actor_Combat_Mode_On(int actorId, int initialState, bool rangedAttack, int enemyId, int waypointType, int animationModeCombatIdle, int animationModeCombatWalk, int animationModeCombatRun, int fleeRatio, int coverRatio, int attackRatio, int damage, int range, bool unstoppable) {
+ debugC(kDebugScript, "Non_Player_Actor_Combat_Mode_On(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)", actorId, initialState, rangedAttack, enemyId, waypointType, animationModeCombatIdle, animationModeCombatWalk, animationModeCombatRun, fleeRatio, coverRatio, attackRatio, damage, range, unstoppable);
+ _vm->_actors[actorId]->combatModeOn(initialState, rangedAttack, enemyId, waypointType, animationModeCombatIdle, animationModeCombatWalk, animationModeCombatRun, fleeRatio, coverRatio, attackRatio, damage, range, unstoppable);
}
void ScriptBase::Non_Player_Actor_Combat_Mode_Off(int actorId) {
diff --git a/engines/bladerunner/script/script.h b/engines/bladerunner/script/script.h
index 3b35f3a..e2e3e27 100644
--- a/engines/bladerunner/script/script.h
+++ b/engines/bladerunner/script/script.h
@@ -80,7 +80,7 @@ protected:
void Actor_Set_Flag_Damage_Anim_If_Moving(int actorId, bool value);
bool Actor_Query_Flag_Damage_Anim_If_Moving(int actorId);
void Actor_Combat_AI_Hit_Attempt(int actorId);
- void Non_Player_Actor_Combat_Mode_On(int actorId, int initialState, bool rangedAttack, int enemyId, int waypointType, int animationModeCombatIdle, int animationModeCombatWalk, int animationModeCombatRun, int fleeRatio, int coverRatio, int actionRatio, int damage, int range, bool unstoppable);
+ void Non_Player_Actor_Combat_Mode_On(int actorId, int initialState, bool rangedAttack, int enemyId, int waypointType, int animationModeCombatIdle, int animationModeCombatWalk, int animationModeCombatRun, int fleeRatio, int coverRatio, int attackRatio, int damage, int range, bool unstoppable);
void Non_Player_Actor_Combat_Mode_Off(int actorId);
void Actor_Set_Health(int actorId, int hp, int maxHp);
void Actor_Set_Targetable(int actorId, bool targetable);
Commit: de527a2406850eab9b09c1decfc19754ea55d985
https://github.com/scummvm/scummvm/commit/de527a2406850eab9b09c1decfc19754ea55d985
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-01-28T20:45:59+01:00
Commit Message:
BLADERUNNER: Cleanup of Steele animation code
Changed paths:
engines/bladerunner/game_constants.h
engines/bladerunner/script/ai/steele.cpp
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index b26d5d5..97aa92c 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -876,6 +876,9 @@ enum Flags {
kFlagUG10GateOpen = 474,
kFlagMcCoyAtPS03 = 478, // has no use
kFlagMcCoyInHawkersCircle = 479,
+ // 480 is never used
+ // 481 is never used
+ kFlagSteeleSmoking = 482,
kFlagTB06Introduction = 483,
kFlagTB06Photographer = 485,
kFlagDNARowAvailable = 486,
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index 3d9e0e1..fa0d9cc 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -556,8 +556,9 @@ double AIScriptSteele::comp_distance(int actorId, float a5, float a6, int a1, fl
}
bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
- if (currentGoalNumber == kGoalSteeleDead)
+ if (currentGoalNumber == kGoalSteeleDead) {
return false;
+ }
switch (newGoalNumber) {
// Chapter 1
@@ -1398,7 +1399,7 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case 421:
- Game_Flag_Reset(482);
+ Game_Flag_Reset(kFlagSteeleSmoking);
Delay(2000);
Actor_Face_Actor(kActorSteele, kActorMcCoy, 1);
Actor_Says(kActorSteele, 360, -1);
@@ -1462,31 +1463,34 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
switch (_animationState) {
case 0:
- if (_var1 <= 3) {
- if (_var1) {
- if (_var1 == 1) {
- Game_Flag_Set(482);
+ switch (_var1) {
+ case 0:
+ *animation = 74;
+ _animationFrame++;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(74)) {
+ _animationFrame = 0;
+ if (Game_Flag_Query(kFlagSteeleSmoking)) {
_animationState = 41;
_var1 = 1;
_var2 = 0;
- } else if (_var1 == 3) {
- *animation = 88;
- _animationFrame++;
- if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(88) - 1)
- _animationFrame = 0;
- }
- } else {
- *animation = 74;
- _animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(74)) {
- _animationFrame = 0;
- if (Game_Flag_Query(482)) {
- _animationState = 41;
- _var1 = 1;
- _var2 = 0;
- }
}
}
+ break;
+
+ case 1:
+ Game_Flag_Set(kFlagSteeleSmoking);
+ _animationState = 41;
+ _var1 = 1;
+ _var2 = 0;
+ break;
+
+ case 3:
+ *animation = 88;
+ _animationFrame++;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(88)) {
+ _animationFrame = 0;
+ }
+ break;
}
break;
@@ -1499,21 +1503,23 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 2:
*animation = 67;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(67))
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
+ }
break;
case 3:
*animation = 68;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(68))
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
+ }
break;
case 4:
*animation = 59;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(59)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
}
break;
@@ -1521,7 +1527,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 5:
*animation = 60;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(60)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
}
break;
@@ -1529,7 +1535,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 6:
*animation = 69;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(69)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
}
break;
@@ -1537,7 +1543,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 7:
*animation = 70;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(70)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
}
break;
@@ -1545,7 +1551,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 8:
*animation = 62;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(62)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
}
break;
@@ -1553,7 +1559,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 9:
*animation = 63;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(63)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
}
break;
@@ -1561,7 +1567,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 10:
*animation = 83;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(83)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
Actor_Change_Animation_Mode(kActorSteele, kAnimationModeIdle);
*animation = 74;
_animationFrame = 0;
@@ -1575,7 +1581,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 11:
*animation = 84;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(84)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
}
break;
@@ -1583,7 +1589,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 12:
*animation = 85;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(85)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
}
break;
@@ -1591,7 +1597,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 13:
*animation = 86;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(86)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
_animationState = 0;
}
@@ -1599,14 +1605,16 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 14:
*animation = 77;
- if (!_animationFrame && _flag) {
+ if (_animationFrame == 0
+ && _flag
+ ) {
*animation = 74;
_animationFrame = 0;
_animationState = 0;
_flag = 0;
} else {
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(77) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
}
}
@@ -1615,7 +1623,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 15:
*animation = 78;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(78) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 14;
*animation = 77;
@@ -1625,7 +1633,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 16:
*animation = 79;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(79) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 14;
*animation = 77;
@@ -1635,7 +1643,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 17:
*animation = 80;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(80) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 14;
*animation = 77;
@@ -1645,7 +1653,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 18:
*animation = 81;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(81) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 14;
*animation = 77;
@@ -1655,7 +1663,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 19:
*animation = 81;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(81) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 14;
*animation = 77;
@@ -1664,7 +1672,9 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 20:
*animation = 82;
- if (!_animationFrame && _flag) {
+ if (_animationFrame == 0
+ && _flag
+ ) {
_animationFrame = 0;
_animationState = 23;
*animation = 66;
@@ -1672,7 +1682,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
_flag = 0;
} else {
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(82) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
}
}
@@ -1681,7 +1691,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 21:
*animation = 82;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(82) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 20;
*animation = 82;
@@ -1691,7 +1701,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 22:
*animation = 82;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(82) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 20;
*animation = 82;
@@ -1701,7 +1711,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 23:
*animation = 54;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(54) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
}
break;
@@ -1709,7 +1719,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 24:
*animation = 65;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(65) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
*animation = 74;
_animationFrame = 0;
_animationState = 0;
@@ -1719,7 +1729,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 25:
*animation = 64;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(64) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 23;
*animation = 54;
@@ -1739,10 +1749,11 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
Sound_Play_Speech_Line(1, snd, 75, 0, 99);
}
- if (_animationFrame == 4)
+ if (_animationFrame == 4) {
Actor_Combat_AI_Hit_Attempt(1);
+ }
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(66) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 23;
*animation = 54;
@@ -1759,7 +1770,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 27:
*animation = 55;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(55) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 23;
*animation = 54;
@@ -1770,7 +1781,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 28:
*animation = 56;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(56) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 23;
*animation = 54;
@@ -1781,7 +1792,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 29:
*animation = 57;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(57) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 23;
*animation = 54;
@@ -1792,7 +1803,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 30:
*animation = 58;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(58) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 23;
*animation = 54;
@@ -1803,7 +1814,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 31:
*animation = 71;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(71) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
*animation = 74;
_animationFrame = 0;
_animationState = 0;
@@ -1814,7 +1825,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 32:
*animation = 72;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(72) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
*animation = 74;
_animationFrame = 0;
_animationState = 0;
@@ -1824,32 +1835,34 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 33:
*animation = 61;
- if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(61) - 1)
+ if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(*animation) - 1)
_animationFrame++;
break;
case 34:
*animation = 73;
- if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(73) - 1)
+ if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(*animation) - 1)
_animationFrame++;
break;
case 35:
*animation = 61;
- if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(61) - 1)
+ if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(*animation) - 1)
_animationFrame++;
break;
case 36:
*animation = 88;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(88) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
}
break;
case 37:
- if (!_animationFrame && _flag) {
+ if (_animationFrame == 0
+ && _flag
+ ) {
_animationFrame = 0;
_animationState = 0;
_var1 = 3;
@@ -1858,7 +1871,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
} else {
*animation = 89;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(89) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
}
}
@@ -1879,7 +1892,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 39:
*animation = 92;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(92) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
_animationFrame = 0;
_animationState = 36;
*animation = 88;
@@ -1889,7 +1902,7 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
case 40:
*animation = 91;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(91) - 1) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
*animation = 74;
_animationFrame = 0;
_animationState = 0;
@@ -1898,54 +1911,56 @@ bool AIScriptSteele::UpdateAnimation(int *animation, int *frame) {
break;
case 41:
- if (_var1 > 3) {
- break;
- }
- if (_var1) {
- if (_var1 == 1) {
- *animation = 75;
- if (_var2) {
- _var2--;
- } else {
- if (++_animationFrame >= 6) {
- if (_animationFrame <= 9) {
- _var2 = Random_Query(1, 3);
- break;
- }
- }
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(75)) {
- _animationFrame = 0;
- if (Game_Flag_Query(482) == 1) {
- _var1 = 0;
- } else {
- _var1 = 3;
- }
- }
+ switch (_var1) {
+ case 0:
+ *animation = 74;
+ _animationFrame++;
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(74)) {
+ _animationFrame = 0;
+ if (!Game_Flag_Query(kFlagSteeleSmoking)) {
+ _var1 = 3;
+ } else if (Random_Query(1, 3) == 1) {
+ _var1 = 1;
}
- } else if (_var1 == 3) {
- *animation = 76;
+ }
+ break;
+
+ case 1:
+ *animation = 75;
+ if (_var2 != 0) {
+ _var2--;
+ } else {
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(76) - 1) {
- _animationState = 0;
+ if (_animationFrame >= 6
+ && _animationFrame <= 9
+ ) {
+ _var2 = Random_Query(1, 3);
+ break;
+ }
+
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
_animationFrame = 0;
- _var1 = 0;
- Game_Flag_Reset(482);
+ if (Game_Flag_Query(kFlagSteeleSmoking)) {
+ _var1 = 0;
+ } else {
+ _var1 = 3;
+ }
}
}
- } else {
- *animation = 74;
+ break;
+
+ case 3:
+ *animation = 76;
_animationFrame++;
- if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(74)) {
+ if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation) - 1) {
+ _animationState = 0;
_animationFrame = 0;
- if (Game_Flag_Query(482) == 1) {
- if (Random_Query(1, 3) == 1) {
- _var1 = 1;
- }
- } else {
- _var1 = 3;
- }
+ _var1 = 0;
+ Game_Flag_Reset(kFlagSteeleSmoking);
}
+ break;
}
+
break;
default:
@@ -1966,6 +1981,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
} else {
_var1 = 0;
}
+
switch (_animationState) {
case 0:
case 24:
@@ -2000,7 +2016,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
break;
default:
_animationFrame = 0;
- if (Game_Flag_Query(482) == 1) {
+ if (Game_Flag_Query(kFlagSteeleSmoking)) {
_animationState = 41;
_var1 = 1;
} else {
@@ -2191,7 +2207,7 @@ bool AIScriptSteele::ChangeAnimationMode(int mode) {
break;
case 43:
- Game_Flag_Set(482);
+ Game_Flag_Set(kFlagSteeleSmoking);
_animationState = 41;
_animationFrame = 0;
_var2 = 0;
More information about the Scummvm-git-logs
mailing list