aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/bladerunner/game_constants.h46
-rw-r--r--engines/bladerunner/script/ai/dektora.cpp8
-rw-r--r--engines/bladerunner/script/ai/early_q.cpp140
-rw-r--r--engines/bladerunner/script/ai/hanoi.cpp46
-rw-r--r--engines/bladerunner/script/ai/mccoy.cpp120
-rw-r--r--engines/bladerunner/script/ai_script.h4
-rw-r--r--engines/bladerunner/script/scene/nr01.cpp2
-rw-r--r--engines/bladerunner/script/scene/nr03.cpp8
-rw-r--r--engines/bladerunner/script/scene/nr04.cpp260
-rw-r--r--engines/bladerunner/script/scene/nr05.cpp2
-rw-r--r--engines/bladerunner/script/scene/nr07.cpp2
-rw-r--r--engines/bladerunner/script/scene_script.h6
12 files changed, 350 insertions, 294 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 51c33e1c16..54923ab1bb 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -945,8 +945,10 @@ enum Flags {
kFlagHF05CrazyLegsTalk1 = 562,
kFlagHF05CrazyLegsTalk2 = 563,
kFlagEarlyQStartedChapter3 = 564,
+ kFlagNotUsed565 = 565, // has no use
kFlagHF03toHF04 = 566, // is never checked
kFlagHF04toHF03 = 567,
+ kFlagNR04EarlyQWalkedIn = 569,
kFlagNR03Entered = 573,
kFlagHF04DoorsClosed = 584,
kFlagHF04CloseDoors = 585,
@@ -961,7 +963,10 @@ enum Flags {
kFlagKIAPrivacyAddonIntro = 599,
kFlagSteeleAimingAtGordo = 603,
kFlagNR03McCoyThrownOut = 604,
+ kFlagNR04DiscFound = 605,
+ kFlagNR04EarlyQStungByScorpions = 606,
kFlagTB07toTB02 = 608,
+ kFlagNR04McCoyAimedAtEarlyQ = 609,
kFlagNR03HanoiTalk = 611,
kFlagTB07RachaelTalk = 612,
kFlagHF03LucyTalk = 613,
@@ -972,6 +977,7 @@ enum Flags {
kFlagNR08Available = 620,
kFlagNR08TouchedDektora = 622,
kFlagTB07TyrellMeeting = 625,
+ kFlagNR01McCoyIsDrugged = 627,
kFlagNR07McCoyIsCop = 638,
kFlagNR10toNR11 = 641, // is never checked
kFlagSteeleKnowsBulletBobIsDead = 643,
@@ -1173,9 +1179,9 @@ enum Scenes {
kSceneHF02 = 35, // Hysteria Hall - Hall of Mirrors - Exit
kSceneHF03 = 36, // Hysteria Hall - Hysteria Arcade
kSceneHF04 = 37, // Hysteria Hall - Hall of Mirrors
- kSceneHF05 = 38, // Hysteria Hall - Crazy Legs Larry Autos
- kSceneHF06 = 39,
- kSceneHF07 = 40,
+ kSceneHF05 = 38, // Hysteria Hall - Crazy Legs Larry Autos - Inside
+ kSceneHF06 = 39, // Hysteria Hall - Crazy Legs Larry Autos - Root
+ kSceneHF07 = 40, // Hysteria Hall - Crazy Legs Larry Autos - Underground
kSceneKP01 = 41,
kSceneKP02 = 42,
kSceneKP03 = 43,
@@ -1558,7 +1564,13 @@ enum GoalMcCoy {
kGoalMcCoyBB11PrepareToRunAway = 101,
kGoalMcCoyBB11RunAway = 102,
kGoalMcCoyBB11GetCaught = 103,
- kGoalMcCoyNR03ThrownOut = 210,
+ kGoalMcCoyNRxxSitAtTable = 200,
+ kGoalMcCoyNRxxStandUp = 201,
+ kGoalMcCoyNR01ThrownOut = 210,
+ kGoalMcCoyNR01GetUp = 211,
+ kGoalMcCoyNR01LayDrugged = 212,
+ kGoalMcCoyNR04Drink = 220,
+ kGoalMcCoyNR04PassOut = 221,
kGoalMcCoyArrested = 500
};
@@ -1780,6 +1792,24 @@ enum GoalRunciter {
enum GoalEarlyQ {
// cut feature? goals 0 - 200 has no use as EarlyQ is walking around NR which is not accessible
kGoalEarlyQWalkAround = 200,
+
+ kGoalEarlyQNR04Enter = 201,
+ kGoalEarlyQNR04Talk1 = 202,
+ kGoalEarlyQNR04GoToBar = 203,
+ kGoalEarlyQNR04PourDrink = 204,
+ kGoalEarlyQNR04GoToMcCoy = 205,
+ kGoalEarlyQNR04McCoyPulledGun = 206,
+ kGoalEarlyQNR04SitDown = 207,
+ kGoalEarlyQNR04ScorpionsCheck = 208,
+ kGoalEarlyQNR04Talk2 = 209,
+ kGoalEarlyQNR04StungByScorpions = 210,
+ kGoalEarlyQNR04WaitForPulledGun = 211,
+ kGoalEarlyQNR04TakeDisk = 212,
+ kGoalEarlyQNR04Talk3 = 213,
+ kGoalEarlyQNR04AskForDisk = 214,
+ kGoalEarlyQNR04HandDrink = 215,
+ kGoalEarlyQNR04GetShot = 216,
+ kGoalEarlyQNR04Leave = 217,
kGoalEarlyQNR05Wait = 220,
kGoalEarlyQNR05WillLeave = 221,
kGoalEarlyQNR05Leave = 222,
@@ -1819,15 +1849,19 @@ enum GoalOfficerLeary {
enum GoalHanoi {
kGoalHanoiDefault = 200,
kGoalHanoiResetTimer = 201,
+ kGoalHanoiNR07TalkToMcCoy = 202,
+ kGoalHanoiNR07GrabMcCoy = 203,
kGoalHanoiNR03GoToDefaultPosition = 210,
kGoalHanoiNR03GoToSwivelTable = 211,
kGoalHanoiNR03GoToOfficeDoor = 212,
kGoalHanoiNR03GoToDancer = 213,
kGoalHanoiNR03StartGuarding = 215,
- kGoalHanoiNR03ThrowOutMcCoy = 220,
+ kGoalHanoiThrowOutMcCoy = 220,
kGoalHanoiNR08WatchShow = 230,
kGoalHanoiNR08Leave = 235,
- kGoalHanoiNR08Left = 236
+ kGoalHanoiNR08Left = 236,
+ kGoalHanoiNR04Enter = 240,
+ kGoalHanoiNR04ShootMcCoy = 241
};
enum GoalDeskClerk {
diff --git a/engines/bladerunner/script/ai/dektora.cpp b/engines/bladerunner/script/ai/dektora.cpp
index 4106224e45..cb5f1db9b8 100644
--- a/engines/bladerunner/script/ai/dektora.cpp
+++ b/engines/bladerunner/script/ai/dektora.cpp
@@ -208,7 +208,7 @@ void AIScriptDektora::ClickedByPlayer() {
AI_Movement_Track_Flush(kActorHanoi);
Actor_Force_Stop_Walking(kActorMcCoy);
Player_Loses_Control();
- Actor_Set_Goal_Number(kActorHanoi, 220);
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
return; //true;
}
@@ -422,7 +422,7 @@ bool AIScriptDektora::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
case 211:
- if (Player_Query_Current_Scene() == 61) {
+ if (Player_Query_Current_Scene() == kSceneNR08) {
Game_Flag_Set(651);
} else {
Game_Flag_Set(636);
@@ -431,8 +431,8 @@ bool AIScriptDektora::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Change_Animation_Mode(kActorDektora, 0);
Actor_Set_Goal_Number(kActorDektora, 200);
}
- if (Player_Query_Current_Scene() == 61) {
- Actor_Set_Goal_Number(kActorHanoi, 235);
+ if (Player_Query_Current_Scene() == kSceneNR08) {
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR08Leave);
} else {
Game_Flag_Reset(651);
}
diff --git a/engines/bladerunner/script/ai/early_q.cpp b/engines/bladerunner/script/ai/early_q.cpp
index 7237c15a06..093c51d7ac 100644
--- a/engines/bladerunner/script/ai/early_q.cpp
+++ b/engines/bladerunner/script/ai/early_q.cpp
@@ -91,23 +91,23 @@ void AIScriptEarlyQ::TimerExpired(int timer) {
}
if (timer == 0
- && Actor_Query_Goal_Number(kActorEarlyQ) == 205
+ && Actor_Query_Goal_Number(kActorEarlyQ) == kGoalEarlyQNR04GoToMcCoy
) {
Player_Loses_Control();
AI_Countdown_Timer_Reset(kActorEarlyQ, 0);
- Actor_Set_Goal_Number(kActorEarlyQ, 215);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04HandDrink);
return; //true;
}
if (timer == 1
- && Actor_Query_Goal_Number(kActorEarlyQ) == 211
+ && Actor_Query_Goal_Number(kActorEarlyQ) == kGoalEarlyQNR04WaitForPulledGun
) {
AI_Countdown_Timer_Reset(kActorEarlyQ, 1);
Player_Loses_Control();
Actor_Change_Animation_Mode(kActorEarlyQ, 29);
Delay(2500);
- Actor_Face_Actor(kActorEarlyQ, kActorMcCoy, 1);
- Actor_Change_Animation_Mode(kActorEarlyQ, 6);
+ Actor_Face_Actor(kActorEarlyQ, kActorMcCoy, true);
+ Actor_Change_Animation_Mode(kActorEarlyQ, kAnimationModeCombatAttack);
Delay(100);
_vm->_aiScripts->callChangeAnimationMode(kActorMcCoy, kAnimationModeCombatHit);
Delay(250);
@@ -151,15 +151,15 @@ void AIScriptEarlyQ::CompletedMovementTrack() {
Actor_Set_Goal_Number(kActorEarlyQ, 100);
break;
- case 201:
- Game_Flag_Set(569);
- Player_Set_Combat_Mode(0);
- Actor_Set_Targetable(kActorEarlyQ, 1);
- Actor_Set_Goal_Number(kActorEarlyQ, 202);
+ case kGoalEarlyQNR04Enter:
+ Game_Flag_Set(kFlagNR04EarlyQWalkedIn);
+ Player_Set_Combat_Mode(false);
+ Actor_Set_Targetable(kActorEarlyQ, true);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04Talk1);
break;
- case 203:
- Actor_Set_Goal_Number(kActorEarlyQ, 204);
+ case kGoalEarlyQNR04GoToBar:
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04PourDrink);
break;
case kGoalEarlyQNR05Leave:
@@ -198,29 +198,29 @@ void AIScriptEarlyQ::OtherAgentExitedThisScene(int otherActorId) {
}
void AIScriptEarlyQ::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
- if ( Game_Flag_Query(569)
+ if ( Game_Flag_Query(kFlagNR04EarlyQWalkedIn)
&& otherActorId == kActorMcCoy
&& combatMode
- && !Game_Flag_Query(609)
+ && !Game_Flag_Query(kFlagNR04McCoyAimedAtEarlyQ)
) {
- if (!Game_Flag_Query(565)) {
- Game_Flag_Set(565);
+ if (!Game_Flag_Query(kFlagNotUsed565)) {
+ Game_Flag_Set(kFlagNotUsed565);
}
- Game_Flag_Set(609);
+ Game_Flag_Set(kFlagNR04McCoyAimedAtEarlyQ);
AI_Countdown_Timer_Reset(kActorEarlyQ, 0);
- Actor_Set_Goal_Number(kActorEarlyQ, 206);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04McCoyPulledGun);
return; // true;
}
- if ( Actor_Query_Goal_Number(kActorEarlyQ) == 211
+ if ( Actor_Query_Goal_Number(kActorEarlyQ) == kGoalEarlyQNR04WaitForPulledGun
&& otherActorId == kActorMcCoy
&& !combatMode
) {
- if (Game_Flag_Query(565) == 1) {
- Game_Flag_Reset(565);
+ if (Game_Flag_Query(kFlagNotUsed565)) {
+ Game_Flag_Reset(kFlagNotUsed565);
}
AI_Countdown_Timer_Reset(kActorEarlyQ, 1);
- Actor_Set_Goal_Number(kActorEarlyQ, 213);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04Talk3);
return; //true;
}
@@ -228,8 +228,8 @@ void AIScriptEarlyQ::OtherAgentEnteredCombatMode(int otherActorId, int combatMod
}
void AIScriptEarlyQ::ShotAtAndMissed() {
- if (Actor_Query_Goal_Number(kActorEarlyQ) == 211) {
- Actor_Set_Goal_Number(kActorEarlyQ, 216);
+ if (Actor_Query_Goal_Number(kActorEarlyQ) == kGoalEarlyQNR04WaitForPulledGun) {
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04GetShot);
//return true;
}
// return false;
@@ -239,7 +239,7 @@ bool AIScriptEarlyQ::ShotAtAndHit() {
if (Actor_Query_Goal_Number(kActorEarlyQ) >= 201
&& Actor_Query_Goal_Number(kActorEarlyQ) <= 217
) {
- Actor_Set_Goal_Number(kActorEarlyQ, 216);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04GetShot);
return true;
}
@@ -318,7 +318,7 @@ bool AIScriptEarlyQ::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
break;
- case 201:
+ case kGoalEarlyQNR04Enter:
AI_Movement_Track_Flush(kActorEarlyQ);
AI_Movement_Track_Append(kActorEarlyQ, 40, 0);
AI_Movement_Track_Append(kActorEarlyQ, 322, 0);
@@ -326,95 +326,95 @@ bool AIScriptEarlyQ::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorEarlyQ);
break;
- case 203:
+ case kGoalEarlyQNR04GoToBar:
AI_Movement_Track_Flush(kActorEarlyQ);
AI_Movement_Track_Append(kActorEarlyQ, 355, 0);
AI_Movement_Track_Repeat(kActorEarlyQ);
- Actor_Face_Object(kActorMcCoy, "BAR", 1);
+ Actor_Face_Object(kActorMcCoy, "BAR", true);
break;
- case 205:
+ case kGoalEarlyQNR04GoToMcCoy:
Loop_Actor_Walk_To_Actor(kActorEarlyQ, 0, 36, 0, 0);
AI_Countdown_Timer_Reset(kActorEarlyQ, 0);
AI_Countdown_Timer_Start(kActorEarlyQ, 0, 4);
break;
- case 206:
+ case kGoalEarlyQNR04McCoyPulledGun:
Player_Set_Combat_Mode(kActorSteele);
- Actor_Face_Actor(kActorEarlyQ, kActorMcCoy, 1);
- Actor_Face_Actor(kActorMcCoy, kActorEarlyQ, 1);
+ Actor_Face_Actor(kActorEarlyQ, kActorMcCoy, true);
+ Actor_Face_Actor(kActorMcCoy, kActorEarlyQ, true);
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatIdle);
- _vm->_aiScripts->callChangeAnimationMode(kActorMcCoy, 5);
- Actor_Says(kActorEarlyQ, 130, 3);
- Actor_Says(kActorMcCoy, 3400, 5);
- Actor_Says_With_Pause(kActorEarlyQ, 140, 1.0, 3);
- Actor_Says_With_Pause(kActorEarlyQ, 150, 1.0, 3);
- Actor_Says(kActorMcCoy, 3405, 5);
- Actor_Says(kActorEarlyQ, 160, 3);
- Actor_Says(kActorMcCoy, 3410, 5);
- _vm->_aiScripts->callChangeAnimationMode(kActorMcCoy, 4);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 31.22f, 0.0f, 267.51f, 0, 1, 0, 0);
- Actor_Set_Goal_Number(kActorEarlyQ, 207);
- break;
-
- case 208:
+ _vm->_aiScripts->callChangeAnimationMode(kActorMcCoy, kAnimationModeCombatAim);
+ Actor_Says(kActorEarlyQ, 130, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 3400, kAnimationModeCombatAim);
+ Actor_Says_With_Pause(kActorEarlyQ, 140, 1.0, kAnimationModeTalk);
+ Actor_Says_With_Pause(kActorEarlyQ, 150, 1.0, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 3405, kAnimationModeCombatAim);
+ Actor_Says(kActorEarlyQ, 160, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 3410, kAnimationModeCombatAim);
+ _vm->_aiScripts->callChangeAnimationMode(kActorMcCoy, kAnimationModeCombatIdle);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 31.22f, 0.0f, 267.51f, 0, true, false, 0);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04SitDown);
+ break;
+
+ case kGoalEarlyQNR04ScorpionsCheck:
if (Game_Flag_Query(kFlagAR02DektoraBoughtScorpions)) {
- Actor_Set_Goal_Number(kActorEarlyQ, 210);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04StungByScorpions);
} else {
- Actor_Set_Goal_Number(kActorEarlyQ, 209);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04Talk2);
}
break;
- case 210:
- Actor_Set_Targetable(kActorEarlyQ, 0);
- Game_Flag_Set(606);
+ case kGoalEarlyQNR04StungByScorpions:
+ Actor_Set_Targetable(kActorEarlyQ, false);
+ Game_Flag_Set(kFlagNR04EarlyQStungByScorpions);
Delay(3500);
Actor_Change_Animation_Mode(kActorEarlyQ, 76);
Delay(2000);
Actor_Set_At_XYZ(kActorEarlyQ, 109.0, 0.0, 374.0, 0);
- Actor_Retired_Here(kActorEarlyQ, 12, 12, 1, -1);
+ Actor_Retired_Here(kActorEarlyQ, 12, 12, true, -1);
Actor_Voice_Over(4180, kActorVoiceOver);
Scene_Exits_Enable();
break;
- case 211:
+ case kGoalEarlyQNR04WaitForPulledGun:
AI_Countdown_Timer_Reset(kActorEarlyQ, 1);
AI_Countdown_Timer_Start(kActorEarlyQ, 1, 5);
break;
- case 212:
- Actor_Says(kActorEarlyQ, 0, 3);
- Actor_Says(kActorEarlyQ, 10, 3);
- Actor_Says(kActorEarlyQ, 20, 3);
- Actor_Clue_Lose(kActorMcCoy, 89);
+ case kGoalEarlyQNR04TakeDisk:
+ Actor_Says(kActorEarlyQ, 0, kAnimationModeTalk);
+ Actor_Says(kActorEarlyQ, 10, kAnimationModeTalk);
+ Actor_Says(kActorEarlyQ, 20, kAnimationModeTalk);
+ Actor_Clue_Lose(kActorMcCoy, kClueEarlyQsClub);
Scene_Exits_Enable();
Player_Gains_Control();
- Game_Flag_Set(627);
- Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR03ThrowOutMcCoy);
+ Game_Flag_Set(kFlagNR01McCoyIsDrugged);
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
break;
- case 215:
+ case kGoalEarlyQNR04HandDrink:
if (Actor_Query_Inch_Distance_From_Actor(kActorMcCoy, kActorEarlyQ) > 36) {
Loop_Actor_Walk_To_Actor(kActorEarlyQ, kActorMcCoy, 36, kActorMcCoy, kActorMcCoy);
}
- Actor_Face_Actor(kActorMcCoy, kActorEarlyQ, 1);
- Actor_Face_Actor(kActorEarlyQ, kActorMcCoy, 1);
+ Actor_Face_Actor(kActorMcCoy, kActorEarlyQ, true);
+ Actor_Face_Actor(kActorEarlyQ, kActorMcCoy, true);
Actor_Change_Animation_Mode(kActorEarlyQ, 23);
- Scene_Loop_Start_Special(2, 2, 0);
+ Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, false);
Ambient_Sounds_Play_Sound(582, 50, 99, 0, 0);
- Actor_Set_Goal_Number(kActorMcCoy, 220);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNR04Drink);
break;
- case 216:
+ case kGoalEarlyQNR04GetShot:
AI_Movement_Track_Flush(kActorEarlyQ);
- Actor_Change_Animation_Mode(kActorEarlyQ, 48);
+ Actor_Change_Animation_Mode(kActorEarlyQ, kAnimationModeDie);
Delay(250);
Actor_Set_At_XYZ(kActorEarlyQ, 109.0, 0.0, 374.0, 0);
- Actor_Set_Goal_Number(kActorHanoi, 240);
- Player_Set_Combat_Mode(0);
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR04Enter);
+ Player_Set_Combat_Mode(false);
break;
- case 217:
+ case kGoalEarlyQNR04Leave:
AI_Movement_Track_Flush(kActorEarlyQ);
AI_Movement_Track_Append(kActorEarlyQ, 354, 0);
AI_Movement_Track_Append(kActorEarlyQ, 322, 0);
diff --git a/engines/bladerunner/script/ai/hanoi.cpp b/engines/bladerunner/script/ai/hanoi.cpp
index 2ddf27b77e..56c39c2003 100644
--- a/engines/bladerunner/script/ai/hanoi.cpp
+++ b/engines/bladerunner/script/ai/hanoi.cpp
@@ -105,8 +105,8 @@ void AIScriptHanoi::TimerExpired(int timer) {
return; //true;
}
- if (Actor_Query_Goal_Number(kActorHanoi) != kGoalHanoiNR03ThrowOutMcCoy) {
- Actor_Set_Goal_Number(kActorHanoi, 202);
+ if (Actor_Query_Goal_Number(kActorHanoi) != kGoalHanoiThrowOutMcCoy) {
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR07TalkToMcCoy);
return; //true;
}
}
@@ -115,20 +115,20 @@ void AIScriptHanoi::TimerExpired(int timer) {
void AIScriptHanoi::CompletedMovementTrack() {
switch (Actor_Query_Goal_Number(kActorHanoi)) {
- case 202:
+ case kGoalHanoiNR07TalkToMcCoy:
Actor_Says(kActorHanoi, 130, 3);
Actor_Says(kActorDektora, 540, 30);
- Actor_Set_Goal_Number(kActorHanoi, 203);
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR07GrabMcCoy);
break;
- case 203:
+ case kGoalHanoiNR07GrabMcCoy:
Actor_Face_Actor(kActorHanoi, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorHanoi, true);
Actor_Change_Animation_Mode(kActorHanoi, 23);
Actor_Set_Invisible(kActorMcCoy, true);
Actor_Says(kActorMcCoy, 3595, kAnimationModeTalk);
Actor_Says(kActorHanoi, 140, kAnimationModeTalk);
- Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR03ThrowOutMcCoy);
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
break;
case kGoalHanoiNR03GoToDancer:
@@ -139,8 +139,8 @@ void AIScriptHanoi::CompletedMovementTrack() {
Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR08Left);
break;
- case 240:
- Actor_Set_Goal_Number(kActorHanoi, 241);
+ case kGoalHanoiNR04Enter:
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR04ShootMcCoy);
break;
default:
@@ -184,9 +184,9 @@ void AIScriptHanoi::OtherAgentEnteredCombatMode(int otherActorId, int combatMode
&& otherActorId == kActorMcCoy
&& combatMode
) {
- Player_Set_Combat_Mode(kActorMcCoy);
+ Player_Set_Combat_Mode(false);
Player_Loses_Control();
- Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR03ThrowOutMcCoy);
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
return; //true;
}
return; //false;
@@ -222,11 +222,11 @@ bool AIScriptHanoi::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Countdown_Timer_Start(kActorHanoi, 0, 45);
break;
- case 201:
+ case kGoalHanoiResetTimer:
AI_Countdown_Timer_Reset(kActorHanoi, 0);
break;
- case 202:
+ case kGoalHanoiNR07TalkToMcCoy:
if (Actor_Query_Which_Set_In(kActorMcCoy) == kSetNR07
&& Actor_Query_In_Set(kActorDektora, kSetNR07)
) {
@@ -242,7 +242,7 @@ bool AIScriptHanoi::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
break;
- case 203:
+ case kGoalHanoiNR07GrabMcCoy:
if (Actor_Query_Which_Set_In(kActorMcCoy) != kSetNR07) {
return false;
}
@@ -252,7 +252,7 @@ bool AIScriptHanoi::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
case 204:
- Actor_Says(kActorHanoi, 210, 3);
+ Actor_Says(kActorHanoi, 210, kAnimationModeTalk);
Actor_Change_Animation_Mode(kActorHanoi, 23);
break;
@@ -287,7 +287,7 @@ bool AIScriptHanoi::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Countdown_Timer_Start(kActorHanoi, 0, 6);
break;
- case kGoalHanoiNR03ThrowOutMcCoy:
+ case kGoalHanoiThrowOutMcCoy:
Game_Flag_Set(kFlagNR03McCoyThrownOut);
AI_Countdown_Timer_Reset(kActorHanoi, 0);
Player_Loses_Control();
@@ -318,7 +318,7 @@ bool AIScriptHanoi::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalHanoiNR08Left:
break;
- case 240:
+ case kGoalHanoiNR04Enter:
Actor_Put_In_Set(kActorHanoi, kSetNR04);
Actor_Set_At_XYZ(kActorHanoi, -47.0f, 0.0f, 334.0f, 535);
AI_Movement_Track_Flush(kActorHanoi);
@@ -326,10 +326,10 @@ bool AIScriptHanoi::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorHanoi);
break;
- case 241:
- Actor_Face_Actor(kActorHanoi, kActorMcCoy, 1);
- Actor_Change_Animation_Mode(kActorHanoi, 6);
- Actor_Retired_Here(kActorMcCoy, 12, 12, 1, -1);
+ case kGoalHanoiNR04ShootMcCoy:
+ Actor_Face_Actor(kActorHanoi, kActorMcCoy, true);
+ Actor_Change_Animation_Mode(kActorHanoi, kAnimationModeCombatAttack);
+ Actor_Retired_Here(kActorMcCoy, 12, 12, true, -1);
break;
case 9999:
@@ -474,7 +474,7 @@ bool AIScriptHanoi::UpdateAnimation(int *animation, int *frame) {
_animationState = 0;
_animationFrame = 0;
*animation = 648;
- Actor_Set_Goal_Number(kActorMcCoy, 210);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNR01ThrownOut);
Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR03GoToDefaultPosition);
}
break;
@@ -503,7 +503,7 @@ bool AIScriptHanoi::UpdateAnimation(int *animation, int *frame) {
_animationState = 8;
_animationFrame = 0;
*animation = 642;
- Actor_Set_Goal_Number(kActorHanoi, 241);
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR04ShootMcCoy);
}
break;
@@ -521,7 +521,7 @@ bool AIScriptHanoi::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame == 5) {
Actor_Force_Stop_Walking(kActorMcCoy);
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
}
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp
index 720c8ef1ea..a0a122e116 100644
--- a/engines/bladerunner/script/ai/mccoy.cpp
+++ b/engines/bladerunner/script/ai/mccoy.cpp
@@ -31,8 +31,8 @@ AIScriptMcCoy::AIScriptMcCoy(BladeRunnerEngine *vm) : AIScriptBase(vm) {
dword_45A0E4 = 0;
off_45A0EC = 0.0f;
dword_45A0E8 = 0;
- dword_45A0F0 = 0;
- dword_45A0F4 = 0;
+ _animationStateNextSpecial = 0;
+ _animationNextSpecial = 0;
dword_45A0F8 = 0;
dword_45A0FC = 0;
off_45A100 = 0.0f;
@@ -49,12 +49,12 @@ void AIScriptMcCoy::Initialize() {
dword_45A0E4 = 0;
off_45A0EC = 0;
dword_45A0E8 = 3;
- dword_45A0F0 = 3;
- dword_45A0F4 = 20;
+ _animationStateNextSpecial = 3;
+ _animationNextSpecial = 20;
dword_45A0F8 = -1;
dword_45A0FC = 0;
off_45A100 = 0;
- Actor_Set_Goal_Number(kActorMcCoy, 0);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyDefault);
}
bool AIScriptMcCoy::Update() {
@@ -81,8 +81,8 @@ bool AIScriptMcCoy::Update() {
}
return true;
- case 201:
- Actor_Set_Goal_Number(kActorMcCoy, 0);
+ case kGoalMcCoyNRxxStandUp:
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyDefault);
if (Player_Query_Current_Set() == kSetNR03) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -166.0f, -70.19f, -501.0f, 0, false, false, 0);
Actor_Face_Heading(kActorMcCoy, 300, false);
@@ -92,17 +92,17 @@ bool AIScriptMcCoy::Update() {
Player_Gains_Control();
return true;
- case 212:
+ case kGoalMcCoyNR01LayDrugged:
if (Global_Variable_Query(47) >= 13) {
Global_Variable_Set(47, 500);
- } else if (Global_Variable_Query(47) > 0) {
+ } if (Global_Variable_Query(47) > 0) {
Global_Variable_Decrement(47, 1);
}
break;
- case 221:
- Actor_Set_Goal_Number(kActorMcCoy, 0);
- Actor_Set_Goal_Number(kActorEarlyQ, 212);
+ case kGoalMcCoyNR04PassOut:
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyDefault);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04TakeDisk);
return true;
case 309:
@@ -327,18 +327,17 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Face_Actor(kActorMcCoy, kActorSadik, true);
return true;
-
- case 200:
+ case kGoalMcCoyNRxxSitAtTable:
Player_Loses_Control();
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
return true;
- case kGoalMcCoyNR03ThrownOut:
+ case kGoalMcCoyNR01ThrownOut:
Actor_Put_In_Set(kActorMcCoy, kSetNR01);
Actor_Set_At_XYZ(kActorMcCoy, -204.0f, 24.0f, -817.0f, 256);
Actor_Set_Invisible(kActorMcCoy, false);
- if (Game_Flag_Query(627)) {
- Actor_Set_Goal_Number(kActorMcCoy, 212);
+ if (Game_Flag_Query(kFlagNR01McCoyIsDrugged)) {
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNR01LayDrugged);
} else {
_animationState = 53;
_animationFrame = Slice_Animation_Query_Number_Of_Frames(18) - 1;
@@ -346,7 +345,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
return true;
- case 211:
+ case kGoalMcCoyNR01GetUp:
Actor_Face_Heading(kActorMcCoy, 512, false);
Actor_Face_Heading(kActorMcCoy, 768, true);
if (Random_Query(0, 1)) {
@@ -356,11 +355,11 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
}
Delay(150);
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
- Actor_Set_Goal_Number(kActorMcCoy, 0);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyDefault);
Player_Gains_Control();
return true;
- case 212:
+ case kGoalMcCoyNR01LayDrugged:
Global_Variable_Set(47, 0);
Player_Set_Combat_Mode_Access(false);
Player_Gains_Control();
@@ -369,7 +368,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) {
_animationFrame = Slice_Animation_Query_Number_Of_Frames(18) - 1;
return true;
- case 220:
+ case kGoalMcCoyNR04Drink:
Actor_Change_Animation_Mode(kActorMcCoy, 75);
return true;
@@ -560,10 +559,10 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
*animation = 19;
_animationState = 0;
_animationFrame = 0;
- Game_Flag_Reset(627);
+ Game_Flag_Reset(kFlagNR01McCoyIsDrugged);
Scene_Exits_Enable();
Player_Set_Combat_Mode_Access(true);
- Actor_Set_Goal_Number(kActorMcCoy, 0);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyDefault);
}
break;
case 67:
@@ -574,8 +573,8 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
*animation = 19;
_animationState = 0;
_animationFrame = 0;
- if (Actor_Query_Goal_Number(kActorMcCoy) == 220) {
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
+ if (Actor_Query_Goal_Number(kActorMcCoy) == kGoalMcCoyNR04Drink) {
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
}
}
break;
@@ -596,7 +595,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
_animationFrame = 0;
_animationState = 14;
*animation = 0;
- Actor_Set_Goal_Number(kActorMcCoy, 0);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyDefault);
}
break;
case 64:
@@ -631,8 +630,8 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
*animation = 19;
_animationFrame = 0;
_animationState = 0;
- if (Actor_Query_Goal_Number(kActorMcCoy) == 200) {
- Actor_Set_Goal_Number(kActorMcCoy, 201);
+ if (Actor_Query_Goal_Number(kActorMcCoy) == kGoalMcCoyNRxxSitAtTable) {
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNRxxStandUp);
}
}
break;
@@ -721,8 +720,8 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
if (Actor_Query_Goal_Number(kActorMcCoy) == kGoalMcCoyBB11GetUp) {
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyBB11PrepareToRunAway);
}
- if (Actor_Query_Goal_Number(kActorMcCoy) == 210) {
- Actor_Set_Goal_Number(kActorMcCoy, 211);
+ if (Actor_Query_Goal_Number(kActorMcCoy) == kGoalMcCoyNR01ThrownOut) {
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNR01GetUp);
}
}
break;
@@ -740,7 +739,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(28)) {
Player_Set_Combat_Mode(true);
sub_405800();
- Actor_Set_Goal_Number(kActorMcCoy, 0);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyDefault);
_animationFrame = 0;
Player_Gains_Control();
}
@@ -753,7 +752,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
*animation = 34;
_animationFrame++;
if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(34)) {
- Actor_Set_Goal_Number(kActorMcCoy, 0);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyDefault);
*animation = 19;
_animationFrame = 0;
sub_405660();
@@ -996,8 +995,8 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
_animationFrame = Slice_Animation_Query_Number_Of_Frames(*animation) - 1;
_animationState = 50;
sub_4054F0();
- if (Actor_Query_Goal_Number(kActorMcCoy) == 220) {
- Actor_Set_Goal_Number(kActorMcCoy, 221);
+ if (Actor_Query_Goal_Number(kActorMcCoy) == kGoalMcCoyNR04Drink) {
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNR04PassOut);
}
}
break;
@@ -1211,10 +1210,10 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) {
case 4:
if (_animationFrame == 0 && !Game_Flag_Query(kFlagMcCoyAnimation1)) {
_animationFrame = 1;
- _animationState = dword_45A0F0;
- *animation = dword_45A0F4;
- dword_45A0F0 = 4;
- dword_45A0F4 = 20;
+ _animationState = _animationStateNextSpecial;
+ *animation = _animationNextSpecial;
+ _animationStateNextSpecial = 4;
+ _animationNextSpecial = 20;
} else if (_animationFrame <= 4 && Game_Flag_Query(kFlagMcCoyAnimation1)) {
Game_Flag_Reset(kFlagMcCoyAnimation1);
*animation = 19;
@@ -1380,8 +1379,8 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationNext = 20;
} else {
Game_Flag_Reset(kFlagMcCoyAnimation1);
- dword_45A0F0 = 4;
- dword_45A0F4 = 20;
+ _animationStateNextSpecial = 4;
+ _animationNextSpecial = 20;
}
break;
@@ -1472,8 +1471,8 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationNext = 21;
} else {
Game_Flag_Reset(kFlagMcCoyAnimation1);
- dword_45A0F0 = 5;
- dword_45A0F4 = 21;
+ _animationStateNextSpecial = 5;
+ _animationNextSpecial = 21;
}
break;
@@ -1485,8 +1484,8 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationNext = 27;
} else {
Game_Flag_Reset(kFlagMcCoyAnimation1);
- dword_45A0F0 = 6;
- dword_45A0F4 = 27;
+ _animationStateNextSpecial = 6;
+ _animationNextSpecial = 27;
}
break;
@@ -1498,8 +1497,8 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationNext = 22;
} else {
Game_Flag_Reset(kFlagMcCoyAnimation1);
- dword_45A0F0 = 7;
- dword_45A0F4 = 22;
+ _animationStateNextSpecial = 7;
+ _animationNextSpecial = 22;
}
break;
@@ -1510,8 +1509,8 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationNext = 23;
} else {
Game_Flag_Reset(kFlagMcCoyAnimation1);
- dword_45A0F0 = 8;
- dword_45A0F4 = 23;
+ _animationStateNextSpecial = 8;
+ _animationNextSpecial = 23;
}
break;
@@ -1522,8 +1521,8 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationNext = 24;
} else {
Game_Flag_Reset(kFlagMcCoyAnimation1);
- dword_45A0F0 = 9;
- dword_45A0F4 = 24;
+ _animationStateNextSpecial = 9;
+ _animationNextSpecial = 24;
}
break;
@@ -1534,8 +1533,8 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationNext = 25;
} else {
Game_Flag_Reset(kFlagMcCoyAnimation1);
- dword_45A0F0 = 10;
- dword_45A0F4 = 25;
+ _animationStateNextSpecial = 10;
+ _animationNextSpecial = 25;
}
break;
@@ -1546,8 +1545,8 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationNext = 26;
} else {
Game_Flag_Reset(kFlagMcCoyAnimation1);
- dword_45A0F0 = 11;
- dword_45A0F4 = 26;
+ _animationStateNextSpecial = 11;
+ _animationNextSpecial = 26;
}
break;
@@ -1558,8 +1557,8 @@ bool AIScriptMcCoy::ChangeAnimationMode(int mode) {
_animationNext = 27;
} else {
Game_Flag_Reset(kFlagMcCoyAnimation1);
- dword_45A0F0 = 12;
- dword_45A0F4 = 27;
+ _animationStateNextSpecial = 12;
+ _animationNextSpecial = 27;
}
break;
@@ -1763,14 +1762,17 @@ void AIScriptMcCoy::sub_4053E0() {
off_45A100 = off_45A100 - 0.2f;
} else {
flt_462710 = flt_462714;
- Actor_Set_Goal_Number(kActorMcCoy, 0);
- Actor_Retired_Here(kActorMcCoy, 12, 48, 1, -1);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyDefault);
+ Actor_Retired_Here(kActorMcCoy, 12, 48, true, -1);
}
return Actor_Set_At_XYZ(kActorMcCoy, x, flt_462710, z, Actor_Query_Facing_1024(kActorMcCoy));
}
void AIScriptMcCoy::sub_4054F0() {
- if (Actor_Query_Which_Set_In(kActorMcCoy) == kSetUG15 && Actor_Query_Goal_Number(kActorMcCoy) != 390 && !Game_Flag_Query(682)) {
+ if (Actor_Query_Which_Set_In(kActorMcCoy) == kSetUG15
+ && Actor_Query_Goal_Number(kActorMcCoy) != 390
+ && !Game_Flag_Query(682)
+ ) {
float x, y, z;
Actor_Query_XYZ(kActorMcCoy, &x, &y, &z);
if ((z < 220.0f) && (-210.0f < x) && (-70.0f > x)) {
diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h
index 134a6a9608..f0f0c9567b 100644
--- a/engines/bladerunner/script/ai_script.h
+++ b/engines/bladerunner/script/ai_script.h
@@ -102,8 +102,8 @@ DECLARE_SCRIPT(McCoy)
int dword_45A0E4;
float off_45A0EC;
int dword_45A0E8;
- int dword_45A0F0;
- int dword_45A0F4;
+ int _animationStateNextSpecial;
+ int _animationNextSpecial;
int dword_45A0F8;
int dword_45A0FC;
float off_45A100;
diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp
index 76575f2e70..a14c9e75db 100644
--- a/engines/bladerunner/script/scene/nr01.cpp
+++ b/engines/bladerunner/script/scene/nr01.cpp
@@ -105,7 +105,7 @@ void SceneScriptNR01::SceneLoaded() {
}
bool SceneScriptNR01::MouseClick(int x, int y) {
- if (Actor_Query_Goal_Number(kActorMcCoy) == 212) {
+ if (Actor_Query_Goal_Number(kActorMcCoy) == kGoalMcCoyNR01LayDrugged) {
Global_Variable_Increment(47, 4);
return true;
}
diff --git a/engines/bladerunner/script/scene/nr03.cpp b/engines/bladerunner/script/scene/nr03.cpp
index 26f87842b7..4f97be5d26 100644
--- a/engines/bladerunner/script/scene/nr03.cpp
+++ b/engines/bladerunner/script/scene/nr03.cpp
@@ -165,7 +165,7 @@ bool SceneScriptNR03::ClickedOnExit(int exitId) {
Actor_Says(kActorHanoi, 210, 15);
AI_Movement_Track_Unpause(kActorHanoi);
} else if (warnings == 2) {
- Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR03ThrowOutMcCoy);
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
}
// game bug? after reentering this does nothing as variable is never reset or checked for > 2
Global_Variable_Increment(kVariableHanoiNR04Warnings, 1);
@@ -204,7 +204,7 @@ bool SceneScriptNR03::ClickedOnExit(int exitId) {
Actor_Says(kActorHanoi, 210, 12);
AI_Movement_Track_Unpause(kActorHanoi);
} else if (warnings == 2) {
- Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR03ThrowOutMcCoy);
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
}
// game bug? after reentering this does nothing as variable is never reset or checked for > 2
Global_Variable_Increment(kVariableHanoiNR05Warnings, 1);
@@ -267,7 +267,7 @@ void SceneScriptNR03::SceneFrameAdvanced(int frame) {
if (Actor_Query_Goal_Number(kActorGuzza) == kGoalGuzzaSitAtNR03) {
Actor_Set_Goal_Number(kActorGuzza, 200);
} else if (!Game_Flag_Query(kFlagNR03toNR05)) {
- Actor_Set_Goal_Number(kActorMcCoy, 200);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNRxxSitAtTable);
Player_Gains_Control();
}
}
@@ -293,7 +293,7 @@ void SceneScriptNR03::PlayerWalkedIn() {
}
if (Player_Query_Combat_Mode()) {
- Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiNR03ThrowOutMcCoy);
+ Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
}
//return false;
}
diff --git a/engines/bladerunner/script/scene/nr04.cpp b/engines/bladerunner/script/scene/nr04.cpp
index 3af9c3e52c..0d90781597 100644
--- a/engines/bladerunner/script/scene/nr04.cpp
+++ b/engines/bladerunner/script/scene/nr04.cpp
@@ -73,7 +73,7 @@ bool SceneScriptNR04::MouseClick(int x, int y) {
return true;
}
- if (Actor_Query_Animation_Mode(kActorMcCoy) == 53) {
+ if (Actor_Query_Animation_Mode(kActorMcCoy) == kAnimationModeSit) {
Actor_Change_Animation_Mode(kActorMcCoy, 29);
return true;
}
@@ -88,50 +88,54 @@ bool SceneScriptNR04::ClickedOn3DObject(const char *objectName, bool a2) {
|| Object_Query_Click("DESK", objectName)
) {
if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 546, 0, true, false)) {
- if (!Object_Query_Click("DESK", objectName)) {
- Actor_Face_Object(kActorMcCoy, "B.TV01", true);
- Actor_Voice_Over(1530, kActorVoiceOver);
- Actor_Voice_Over(1540, kActorVoiceOver);
- Actor_Voice_Over(1550, kActorVoiceOver);
- } else {
+ if (Object_Query_Click("DESK", objectName)) {
Actor_Face_Object(kActorMcCoy, "DESK", true);
if (!Actor_Clue_Query(kActorMcCoy, kCluePeruvianLadyInterview)) {
Actor_Voice_Over(1600, kActorVoiceOver);
Actor_Voice_Over(1610, kActorVoiceOver);
- } else if (Actor_Clue_Query(kActorMcCoy, kClueCollectionReceipt)) {
- Actor_Says(kActorMcCoy, 8580, kAnimationModeTalk);
- } else {
+ } else if (!Actor_Clue_Query(kActorMcCoy, kClueCollectionReceipt)) {
Actor_Clue_Acquire(kActorMcCoy, kClueCollectionReceipt, false, -1);
Item_Pickup_Spin_Effect(961, 247, 141);
Actor_Voice_Over(1560, kActorVoiceOver);
Actor_Voice_Over(1570, kActorVoiceOver);
Actor_Voice_Over(1580, kActorVoiceOver);
Actor_Voice_Over(1590, kActorVoiceOver);
+ } else {
+ Actor_Says(kActorMcCoy, 8580, kAnimationModeTalk);
}
-
+ } else {
+ Actor_Face_Object(kActorMcCoy, "B.TV01", true);
+ Actor_Voice_Over(1530, kActorVoiceOver);
+ Actor_Voice_Over(1540, kActorVoiceOver);
+ Actor_Voice_Over(1550, kActorVoiceOver);
}
}
- } else if ( Object_Query_Click("TORUS01", objectName)
- && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 18.56f, 0.0f, 38.86f, 0, true, false, 0)
- && !Game_Flag_Query(605)
+ return false;
+ }
+
+ if ( Object_Query_Click("TORUS01", objectName)
+ && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 18.56f, 0.0f, 38.86f, 0, true, false, 0)
+ && !Game_Flag_Query(kFlagNR04DiscFound)
) {
Unclickable_Object("TORUS01");
Scene_Exits_Disable();
Player_Loses_Control();
- Game_Flag_Set(605);
+ Game_Flag_Set(kFlagNR04DiscFound);
Actor_Face_Object(kActorMcCoy, "TORUS01", true);
Item_Pickup_Spin_Effect(975, 358, 160);
Actor_Voice_Over(1620, kActorVoiceOver);
Actor_Voice_Over(1630, kActorVoiceOver);
Actor_Clue_Acquire(kActorMcCoy, kClueEarlyQsClub, false, -1);
- Actor_Set_Goal_Number(kActorEarlyQ, 201);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04Enter);
+ return false;
}
+
return false;
}
bool SceneScriptNR04::ClickedOnActor(int actorId) {
if (actorId == kActorEarlyQ
- && Game_Flag_Query(606)
+ && Game_Flag_Query(kFlagNR04EarlyQStungByScorpions)
) {
Actor_Voice_Over(1640, kActorVoiceOver);
Actor_Voice_Over(1650, kActorVoiceOver);
@@ -149,7 +153,7 @@ bool SceneScriptNR04::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptNR04::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 45.0f, 0.0f, -106.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 45.0f, 0.0f, -106.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagNR04toNR03);
@@ -161,37 +165,46 @@ bool SceneScriptNR04::ClickedOnExit(int exitId) {
}
bool SceneScriptNR04::ClickedOn2DRegion(int region) {
- if ((region == 0 || region == 1 || region == 2)
- && Actor_Query_Which_Set_In(kActorEarlyQ) != 12
- && Actor_Query_Animation_Mode(kActorMcCoy) != 53
- && !Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 445, 0, true, false)
+ if ((region == 0
+ || region == 1
+ || region == 2
+ )
+ && Actor_Query_Which_Set_In(kActorEarlyQ) != kSetNR04
+ && Actor_Query_Animation_Mode(kActorMcCoy) != kAnimationModeSit
) {
- Actor_Face_Heading(kActorMcCoy, 49, false);
- Actor_Change_Animation_Mode(kActorMcCoy, 85);
- Delay(2500);
- if (Game_Flag_Query(606) == 1) {
+ if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 445, 0, true, false)) {
+ Actor_Face_Heading(kActorMcCoy, 49, false);
+ Actor_Change_Animation_Mode(kActorMcCoy, 85);
+ Delay(2500);
+
+ if (!Game_Flag_Query(kFlagNR04EarlyQStungByScorpions)
+ && Game_Flag_Query(kFlagAR02DektoraBoughtScorpions)
+ ) {
+ Player_Loses_Control();
+ Actor_Voice_Over(4180, kActorVoiceOver);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
+ Ambient_Sounds_Play_Sound(555, 90, 99, 0, 0);
+ Delay(350);
+ Actor_Set_At_XYZ(kActorMcCoy, 109.0f, 0.0f, 374.0f, 0);
+ Actor_Retired_Here(kActorMcCoy, 12, 12, true, -1);
+ }
return true;
}
- if (Game_Flag_Query(kFlagAR02DektoraBoughtScorpions)) {
- Player_Loses_Control();
- Actor_Voice_Over(4180, kActorVoiceOver);
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
- Ambient_Sounds_Play_Sound(555, 90, 99, 0, 0);
- Delay(350);
- Actor_Set_At_XYZ(kActorMcCoy, 109.0f, 0.0f, 374.0f, 0);
- Actor_Retired_Here(kActorMcCoy, 12, 12, 1, -1);
- }
- return true;
}
return false;
}
void SceneScriptNR04::SceneFrameAdvanced(int frame) {
- if (frame == 1 && !Music_Is_Playing()) {
- sub_402960();
+ if ( frame == 1
+ && !Music_Is_Playing()
+ ) {
+ playNextMusic();
}
- if (frame > 60 && frame < 120) {
- sub_402860(frame);
+
+ if (frame > 60
+ && frame < 120
+ ) {
+ druggedEffect(frame);
} else if (frame == 120) {
Set_Fade_Color(1.0f, 1.0f, 1.0f);
Set_Fade_Density(0.0f);
@@ -202,51 +215,23 @@ void SceneScriptNR04::SceneFrameAdvanced(int frame) {
void SceneScriptNR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
if (actorId == kActorEarlyQ) {
switch (newGoal) {
- case 214:
- Actor_Change_Animation_Mode(kActorEarlyQ, 29);
- Delay(2500);
- Actor_Says(kActorEarlyQ, 290, 3);
- sub_401DB0();
- //return true;
- break;
- case 213:
- Actor_Clue_Acquire(kActorMcCoy, kClueDektorasDressingRoom, false, kActorEarlyQ);
- Item_Pickup_Spin_Effect(984, 200, 160);
- Actor_Says(kActorEarlyQ, 200, 30);
- Actor_Says(kActorEarlyQ, 210, 30);
- Actor_Says(kActorEarlyQ, 220, 30);
- Actor_Says_With_Pause(kActorMcCoy, 3425, 1.5f, 23);
- Actor_Says(kActorMcCoy, 3430, 3);
- Actor_Says(kActorEarlyQ, 240, 30);
- Actor_Says(kActorMcCoy, 3435, 3);
- Actor_Says(kActorEarlyQ, 250, 30);
- Actor_Says(kActorMcCoy, 3440, 3);
- Actor_Says(kActorEarlyQ, 280, 30);
- Actor_Says(kActorMcCoy, 3445, 3);
- Actor_Set_Goal_Number(kActorEarlyQ, 214);
- //return true;
- break;
- case 209:
- Actor_Face_Actor(kActorMcCoy, kActorEarlyQ, true);
- Delay(3000);
- Actor_Says(kActorEarlyQ, 170, 30);
- Actor_Says(kActorMcCoy, 3415, 3);
- Actor_Says(kActorEarlyQ, 180, 30);
- Actor_Says_With_Pause(kActorMcCoy, 3420, 1.5f, 3);
- Actor_Says(kActorEarlyQ, 190, 30);
- Actor_Set_Goal_Number(kActorEarlyQ, 211);
- //return true;
- break;
- case 207:
- Loop_Actor_Walk_To_Waypoint(kActorEarlyQ, 445, 0, 1, false);
- Actor_Face_Heading(kActorEarlyQ, 49, false);
- Actor_Change_Animation_Mode(kActorEarlyQ, 85);
+ case kGoalEarlyQNR04Talk1:
+ Actor_Face_Actor(kActorEarlyQ, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorEarlyQ, true);
- Actor_Set_Goal_Number(kActorEarlyQ, 208);
- Actor_Clue_Acquire(kActorMcCoy, kClueEarlyQInterview, false, kActorEarlyQ);
+ Actor_Says(kActorEarlyQ, 30, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 3375, kAnimationModeTalk);
+ Actor_Says_With_Pause(kActorEarlyQ, 50, 1.5f, kAnimationModeTalk);
+ Actor_Says(kActorEarlyQ, 60, kAnimationModeTalk);
+ Actor_Says_With_Pause(kActorMcCoy, 3380, 1.0f, kAnimationModeTalk);
+ Actor_Says(kActorEarlyQ, 70, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 3415, kAnimationModeTalk);
+ Actor_Says(kActorEarlyQ, 80, kAnimationModeTalk);
+ Player_Gains_Control();
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04GoToBar);
//return true;
break;
- case 204:
+
+ case kGoalEarlyQNR04PourDrink:
Actor_Face_Actor(kActorMcCoy, kActorEarlyQ, true);
Actor_Says(kActorEarlyQ, 90, 73);
Actor_Says(kActorMcCoy, 3390, 3);
@@ -255,22 +240,55 @@ void SceneScriptNR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
Actor_Says(kActorMcCoy, 3385, 3);
Actor_Says(kActorEarlyQ, 120, 74);
Actor_Face_Actor(kActorEarlyQ, kActorMcCoy, true);
- Actor_Set_Goal_Number(kActorEarlyQ, 205);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04GoToMcCoy);
//return true;
break;
- case 202:
- Actor_Face_Actor(kActorEarlyQ, kActorMcCoy, true);
+
+ case kGoalEarlyQNR04SitDown:
+ Loop_Actor_Walk_To_Waypoint(kActorEarlyQ, 445, 0, true, false);
+ Actor_Face_Heading(kActorEarlyQ, 49, false);
+ Actor_Change_Animation_Mode(kActorEarlyQ, 85);
Actor_Face_Actor(kActorMcCoy, kActorEarlyQ, true);
- Actor_Says(kActorEarlyQ, 30, 3);
- Actor_Says(kActorMcCoy, 3375, 3);
- Actor_Says_With_Pause(kActorEarlyQ, 50, 1.5f, 3);
- Actor_Says(kActorEarlyQ, 60, 3);
- Actor_Says_With_Pause(kActorMcCoy, 3380, 1.0f, 3);
- Actor_Says(kActorEarlyQ, 70, 3);
- Actor_Says(kActorMcCoy, 3415, 3);
- Actor_Says(kActorEarlyQ, 80, 3);
- Player_Gains_Control();
- Actor_Set_Goal_Number(kActorEarlyQ, 203);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04ScorpionsCheck);
+ Actor_Clue_Acquire(kActorMcCoy, kClueEarlyQInterview, false, kActorEarlyQ);
+ //return true;
+ break;
+
+ case kGoalEarlyQNR04Talk2:
+ Actor_Face_Actor(kActorMcCoy, kActorEarlyQ, true);
+ Delay(3000);
+ Actor_Says(kActorEarlyQ, 170, 30);
+ Actor_Says(kActorMcCoy, 3415, kAnimationModeTalk);
+ Actor_Says(kActorEarlyQ, 180, 30);
+ Actor_Says_With_Pause(kActorMcCoy, 3420, 1.5f, kAnimationModeTalk);
+ Actor_Says(kActorEarlyQ, 190, 30);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04WaitForPulledGun);
+ //return true;
+ break;
+
+ case kGoalEarlyQNR04Talk3:
+ Actor_Clue_Acquire(kActorMcCoy, kClueDektorasDressingRoom, false, kActorEarlyQ);
+ Item_Pickup_Spin_Effect(984, 200, 160);
+ Actor_Says(kActorEarlyQ, 200, 30);
+ Actor_Says(kActorEarlyQ, 210, 30);
+ Actor_Says(kActorEarlyQ, 220, 30);
+ Actor_Says_With_Pause(kActorMcCoy, 3425, 1.5f, 23);
+ Actor_Says(kActorMcCoy, 3430, kAnimationModeTalk);
+ Actor_Says(kActorEarlyQ, 240, 30);
+ Actor_Says(kActorMcCoy, 3435, kAnimationModeTalk);
+ Actor_Says(kActorEarlyQ, 250, 30);
+ Actor_Says(kActorMcCoy, 3440, kAnimationModeTalk);
+ Actor_Says(kActorEarlyQ, 280, 30);
+ Actor_Says(kActorMcCoy, 3445, kAnimationModeTalk);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04AskForDisk);
+ //return true;
+ break;
+
+ case kGoalEarlyQNR04AskForDisk:
+ Actor_Change_Animation_Mode(kActorEarlyQ, 29);
+ Delay(2500);
+ Actor_Says(kActorEarlyQ, 290, kAnimationModeTalk);
+ dialogueWithEarlyQ();
//return true;
break;
}
@@ -279,9 +297,9 @@ void SceneScriptNR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptNR04::PlayerWalkedIn() {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 53.0f, 0.0f, -26.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 53.0f, 0.0f, -26.0f, 0, false, false, 0);
if (Game_Flag_Query(kFlagAR02DektoraBoughtScorpions)) {
- Overlay_Play("nr04over", 0, 1, 0, 0);
+ Overlay_Play("nr04over", 0, true, false, 0);
Delay(4000);
Overlay_Remove("nr04over");
}
@@ -294,28 +312,30 @@ void SceneScriptNR04::PlayerWalkedOut() {
void SceneScriptNR04::DialogueQueueFlushed(int a1) {
}
-void SceneScriptNR04::sub_401DB0() {
+void SceneScriptNR04::dialogueWithEarlyQ() {
Dialogue_Menu_Clear_List();
- DM_Add_To_List(1530, 10, 5, 3);
- DM_Add_To_List(1540, 3, 5, 10);
+ DM_Add_To_List(1530, 10, 5, 3); // GIVE DISC
+ DM_Add_To_List(1540, 3, 5, 10); // KEEP IT
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
- if (answer == 1530) {
- Loop_Actor_Walk_To_Actor(kActorEarlyQ, kActorMcCoy, 36, 0, false);
+
+ if (answer == 1530) { // GIVE DISC
+ Loop_Actor_Walk_To_Actor(kActorEarlyQ, kActorMcCoy, 36, false, false);
Actor_Change_Animation_Mode(kActorMcCoy, 23);
Actor_Change_Animation_Mode(kActorEarlyQ, 23);
Delay(1500);
- Actor_Says(kActorEarlyQ, 300, 3);
- Actor_Change_Animation_Mode(kActorMcCoy, 0);
- Actor_Change_Animation_Mode(kActorEarlyQ, 0);
- Actor_Says(kActorEarlyQ, 310, 3);
- ADQ_Add(kActorMcCoy, 3450, 3);
+ Actor_Says(kActorEarlyQ, 300, kAnimationModeTalk);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
+ Actor_Change_Animation_Mode(kActorEarlyQ, kAnimationModeIdle);
+ Actor_Says(kActorEarlyQ, 310, kAnimationModeTalk);
+ ADQ_Add(kActorMcCoy, 3450, kAnimationModeTalk);
Actor_Set_Targetable(kActorEarlyQ, false);
- Actor_Set_Goal_Number(kActorEarlyQ, 217);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04Leave);
Actor_Clue_Lose(kActorMcCoy, kClueEarlyQsClub);
Scene_Exits_Enable();
- } else if (answer == 1540) {
+ } else if (answer == 1540) { // KEEP IT
Actor_Says(kActorMcCoy, 8512, 15);
Actor_Says(kActorEarlyQ, 320, 12);
Actor_Says(kActorMcCoy, 3455, 13);
@@ -325,12 +345,12 @@ void SceneScriptNR04::sub_401DB0() {
Actor_Says(kActorMcCoy, 3465, 12);
Actor_Says(kActorEarlyQ, 350, 16);
Actor_Set_Targetable(kActorEarlyQ, false);
- Actor_Set_Goal_Number(kActorEarlyQ, 217);
+ Actor_Set_Goal_Number(kActorEarlyQ, kGoalEarlyQNR04Leave);
Scene_Exits_Enable();
}
}
-void SceneScriptNR04::sub_402860(int frame) {
+void SceneScriptNR04::druggedEffect(int frame) {
float colorMap[] = {
1.0f, 1.0f, 1.0f,
1.0f, 0.0f, 0.0f,
@@ -359,20 +379,20 @@ void SceneScriptNR04::sub_402860(int frame) {
}
}
-void SceneScriptNR04::sub_402960() {
- int v0 = Global_Variable_Query(53);
- if (!v0) {
+void SceneScriptNR04::playNextMusic() {
+ int track = Global_Variable_Query(kVariableEarlyQFrontMusic);
+ if (track == 0) {
Music_Play(14, 11, 80, 2, -1, 0, 0);
- } else if (v0 == 1) {
+ } else if (track == 1) {
Music_Play(13, 11, 80, 2, -1, 0, 0);
- } else if (v0 == 2) {
+ } else if (track == 2) {
Music_Play(5, 11, 80, 2, -1, 0, 0);
}
- v0++;
- if (v0 > 2) {
- v0 = 0;
+ track++;
+ if (track > 2) {
+ track = 0;
}
- Global_Variable_Set(53, v0);
+ Global_Variable_Set(kVariableEarlyQFrontMusic, track);
}
} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/scene/nr05.cpp b/engines/bladerunner/script/scene/nr05.cpp
index f88e8c0cee..eb16152f31 100644
--- a/engines/bladerunner/script/scene/nr05.cpp
+++ b/engines/bladerunner/script/scene/nr05.cpp
@@ -181,7 +181,7 @@ void SceneScriptNR05::SceneFrameAdvanced(int frame) {
if ( frame == 134
&& !Game_Flag_Query(kFlagNR05toNR03)
) {
- Actor_Set_Goal_Number(kActorMcCoy, 200);
+ Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNRxxSitAtTable);
}
//return true;
}
diff --git a/engines/bladerunner/script/scene/nr07.cpp b/engines/bladerunner/script/scene/nr07.cpp
index 4ba1438885..0b23d61b02 100644
--- a/engines/bladerunner/script/scene/nr07.cpp
+++ b/engines/bladerunner/script/scene/nr07.cpp
@@ -54,7 +54,7 @@ bool SceneScriptNR07::ClickedOn3DObject(const char *objectName, bool a2) {
bool SceneScriptNR07::ClickedOnActor(int actorId) {
if (actorId == kActorDektora) {
- if (Actor_Query_Goal_Number(kActorHolloway) < kGoalHollowayGoToNR07) { // Holloway is not yet comming
+ if (Actor_Query_Goal_Number(kActorHolloway) >= kGoalHollowayGoToNR07) { // Holloway is not yet comming
return true;
}
diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h
index 77cf8597d4..0767fee704 100644
--- a/engines/bladerunner/script/scene_script.h
+++ b/engines/bladerunner/script/scene_script.h
@@ -307,9 +307,9 @@ DECLARE_SCRIPT(NR03)
END_SCRIPT
DECLARE_SCRIPT(NR04)
- void sub_401DB0();
- void sub_402860(int frame);
- void sub_402960();
+ void dialogueWithEarlyQ();
+ void druggedEffect(int frame);
+ void playNextMusic();
END_SCRIPT
DECLARE_SCRIPT(NR05)