aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner/script')
-rw-r--r--engines/bladerunner/script/ai/clovis.cpp2
-rw-r--r--engines/bladerunner/script/ai/dektora.cpp2
-rw-r--r--engines/bladerunner/script/ai/gordo.cpp2
-rw-r--r--engines/bladerunner/script/ai/izo.cpp2
-rw-r--r--engines/bladerunner/script/ai/maggie.cpp27
-rw-r--r--engines/bladerunner/script/ai/sadik.cpp2
-rw-r--r--engines/bladerunner/script/ai/steele.cpp18
-rw-r--r--engines/bladerunner/script/ai/zuben.cpp2
-rw-r--r--engines/bladerunner/script/scene/kp01.cpp85
-rw-r--r--engines/bladerunner/script/scene/kp02.cpp40
-rw-r--r--engines/bladerunner/script/scene/kp03.cpp83
-rw-r--r--engines/bladerunner/script/scene/kp04.cpp34
-rw-r--r--engines/bladerunner/script/scene/kp05.cpp58
-rw-r--r--engines/bladerunner/script/scene/kp06.cpp57
-rw-r--r--engines/bladerunner/script/scene/kp07.cpp13
15 files changed, 256 insertions, 171 deletions
diff --git a/engines/bladerunner/script/ai/clovis.cpp b/engines/bladerunner/script/ai/clovis.cpp
index a2d8cf3e16..a8f0cf20a9 100644
--- a/engines/bladerunner/script/ai/clovis.cpp
+++ b/engines/bladerunner/script/ai/clovis.cpp
@@ -194,7 +194,7 @@ void AIScriptClovis::Retired(int byActorId) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(579);
+ Game_Flag_Set(kFlagKP07toKP06);
Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants);
Set_Enter(kSetKP05_KP06, kSceneKP06);
}
diff --git a/engines/bladerunner/script/ai/dektora.cpp b/engines/bladerunner/script/ai/dektora.cpp
index 3f58af389f..8054bc8627 100644
--- a/engines/bladerunner/script/ai/dektora.cpp
+++ b/engines/bladerunner/script/ai/dektora.cpp
@@ -304,7 +304,7 @@ void AIScriptDektora::Retired(int byActorId) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(579);
+ Game_Flag_Set(kFlagKP07toKP06);
Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants);
Set_Enter(kSetKP05_KP06, kSceneKP06);
diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp
index 0aab3d2665..17656576f1 100644
--- a/engines/bladerunner/script/ai/gordo.cpp
+++ b/engines/bladerunner/script/ai/gordo.cpp
@@ -298,7 +298,7 @@ void AIScriptGordo::Retired(int byActorId) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(579);
+ Game_Flag_Set(kFlagKP07toKP06);
Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants);
Set_Enter(kSetKP05_KP06, kSceneKP06);
return;// true;
diff --git a/engines/bladerunner/script/ai/izo.cpp b/engines/bladerunner/script/ai/izo.cpp
index 2717db6ad7..ede8b684c0 100644
--- a/engines/bladerunner/script/ai/izo.cpp
+++ b/engines/bladerunner/script/ai/izo.cpp
@@ -248,7 +248,7 @@ void AIScriptIzo::Retired(int byActorId) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(579);
+ Game_Flag_Set(kFlagKP07toKP06);
Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants);
Set_Enter(kSetKP05_KP06, kSceneKP06);
return; //true;
diff --git a/engines/bladerunner/script/ai/maggie.cpp b/engines/bladerunner/script/ai/maggie.cpp
index 5b045d526b..a1661eac7e 100644
--- a/engines/bladerunner/script/ai/maggie.cpp
+++ b/engines/bladerunner/script/ai/maggie.cpp
@@ -68,15 +68,22 @@ void AIScriptMaggie::Initialize() {
bool AIScriptMaggie::Update() {
int goal = Actor_Query_Goal_Number(kActorMaggie);
- if (Actor_Query_Which_Set_In(kActorMaggie) == kSetMA02_MA04 && Global_Variable_Query(kVariableChapter) == 4) {
+
+ if (Actor_Query_Which_Set_In(kActorMaggie) == kSetMA02_MA04
+ && Global_Variable_Query(kVariableChapter) == 4
+ ) {
Actor_Put_In_Set(kActorMaggie, kSetFreeSlotG);
Actor_Set_At_Waypoint(kActorMaggie, 39, 0);
}
+
if (goal == 414) {
Actor_Set_Goal_Number(kActorMaggie, 415);
- } else if (goal == 413 && Actor_Query_Inch_Distance_From_Actor(kActorMcCoy, kActorMaggie) < 60) {
+ } else if (goal == 413
+ && Actor_Query_Inch_Distance_From_Actor(kActorMcCoy, kActorMaggie) < 60
+ ) {
Actor_Set_Goal_Number(kActorMaggie, 415);
}
+
if (Global_Variable_Query(kVariableChapter) == 5) {
if (Actor_Query_Goal_Number(kActorMaggie) < 400) {
Actor_Set_Goal_Number(kActorMaggie, 400);
@@ -142,7 +149,9 @@ void AIScriptMaggie::ReceivedClue(int clueId, int fromActorId) {
}
void AIScriptMaggie::ClickedByPlayer() {
- if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Global_Variable_Query(kVariableChapter) == 5) {
+ if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)
+ && Global_Variable_Query(kVariableChapter) == 5
+ ) {
if (Actor_Query_Goal_Number(kActorMaggie) == 413) {
Actor_Set_Targetable(kActorMaggie, true);
AI_Movement_Track_Flush(kActorMaggie);
@@ -151,6 +160,7 @@ void AIScriptMaggie::ClickedByPlayer() {
}
return; // true
}
+
if (_animationState == kMaggieStateDead) {
return; // false
}
@@ -187,14 +197,17 @@ void AIScriptMaggie::ClickedByPlayer() {
AI_Countdown_Timer_Start(kActorMaggie, 0, Random_Query(3, 9));
return; // true
}
+
if (goal == 10) {
Actor_Change_Animation_Mode(kActorMaggie, kAnimationModeIdle);
return; // true
}
+
if (goal == 11) {
Actor_Change_Animation_Mode(kActorMaggie, 54);
return; // true
}
+
Actor_Set_Goal_Number(kActorMaggie, 8);
return; // true
}
@@ -206,7 +219,10 @@ void AIScriptMaggie::OtherAgentEnteredThisScene(int otherActorId) {
}
void AIScriptMaggie::OtherAgentExitedThisScene(int otherActorId) {
- if (otherActorId == kActorMcCoy && Actor_Query_Which_Set_In(kActorMaggie) == kSetMA02_MA04 && Global_Variable_Query(kVariableChapter) < 4) {
+ if (otherActorId == kActorMcCoy
+ && Actor_Query_Which_Set_In(kActorMaggie) == kSetMA02_MA04
+ && Global_Variable_Query(kVariableChapter) < 4
+ ) {
AI_Movement_Track_Flush(kActorMaggie);
Actor_Set_Goal_Number(kActorMaggie, 0);
}
@@ -236,6 +252,7 @@ bool AIScriptMaggie::GoalChanged(int currentGoalNumber, int newGoalNumber) {
if (currentGoalNumber == 599) {
return true;
}
+
switch (newGoalNumber) {
case 11:
Actor_Change_Animation_Mode(kActorMaggie, 55);
@@ -335,7 +352,7 @@ bool AIScriptMaggie::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Face_Actor(kActorMaggie, kActorMcCoy, true);
Actor_Change_Animation_Mode(kActorMaggie, 56);
Actor_Face_Actor(kActorMcCoy, kActorMaggie, true);
- Actor_Says(kActorMcCoy, 2225, 3);
+ Actor_Says(kActorMcCoy, 2225, kAnimationModeTalk);
Actor_Set_Goal_Number(kActorMaggie, 413);
break;
case 411:
diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp
index 4747d79dc3..fb5e725973 100644
--- a/engines/bladerunner/script/ai/sadik.cpp
+++ b/engines/bladerunner/script/ai/sadik.cpp
@@ -213,7 +213,7 @@ void AIScriptSadik::Retired(int byActorId) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(579);
+ Game_Flag_Set(kFlagKP07toKP06);
Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants);
Set_Enter(kSetKP05_KP06, kSceneKP06);
return; //true;
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index 2d6ce66fd5..58ef11593d 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -309,15 +309,7 @@ void AIScriptSteele::CompletedMovementTrack() {
Actor_Set_Goal_Number(kActorSteele, kGoalSteeleHF02LucyShotBySteele);
break;
- case 423:
- case 424:
- case 425:
- case 426:
- case 427:
- case 428:
- case 429:
- case 430:
- case 431:
+ case 422:
Actor_Set_Goal_Number(kActorSteele, 423);
break;
@@ -337,7 +329,7 @@ void AIScriptSteele::CompletedMovementTrack() {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -731.0f, 8.26f, -657.0f, 0, false, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(578);
+ Game_Flag_Set(kFlagKP06toKP07);
Set_Enter(kSetKP07, kSceneKP07);
break;
@@ -1393,16 +1385,16 @@ bool AIScriptSteele::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Actor_Retired_Here(kActorSteele, 60, 12, true, -1);
return true;
- case 420:
+ case kGoalSteeleKP01Wait:
Actor_Put_In_Set(kActorSteele, kSetKP01);
Actor_Set_At_XYZ(kActorSteele, 20.0f, -12.2f, -97.0f, 907);
Actor_Change_Animation_Mode(kActorSteele, 43);
return true;
- case 421:
+ case kGoalSteeleKP01TalkToMcCoy:
Game_Flag_Reset(kFlagSteeleSmoking);
Delay(2000);
- Actor_Face_Actor(kActorSteele, kActorMcCoy, 1);
+ Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
Actor_Says(kActorSteele, 360, -1);
Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 48, false, false);
Actor_Says(kActorMcCoy, 2150, 14);
diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp
index 5e7ca2d549..3214cb6354 100644
--- a/engines/bladerunner/script/ai/zuben.cpp
+++ b/engines/bladerunner/script/ai/zuben.cpp
@@ -297,7 +297,7 @@ void AIScriptZuben::Retired(int byActorId) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(579);
+ Game_Flag_Set(kFlagKP07toKP06);
Game_Flag_Reset(kFlagMcCoyIsNotHelpingReplicants);
Set_Enter(kSetKP05_KP06, kSceneKP06);
// return true;
diff --git a/engines/bladerunner/script/scene/kp01.cpp b/engines/bladerunner/script/scene/kp01.cpp
index e0f2dbd40b..80109af7ce 100644
--- a/engines/bladerunner/script/scene/kp01.cpp
+++ b/engines/bladerunner/script/scene/kp01.cpp
@@ -25,32 +25,36 @@
namespace BladeRunner {
void SceneScriptKP01::InitializeScene() {
- if (Game_Flag_Query(416)) {
- Setup_Scene_Information(-125.0f, -12.2f, -61.0f, 400);
- } else if (Game_Flag_Query(418)) {
+ if (Game_Flag_Query(kFlagKP04toKP01)) {
+ Setup_Scene_Information(-125.0f, -12.2f, -61.0f, 400);
+ } else if (Game_Flag_Query(kFlagKP03toKP01)) {
Setup_Scene_Information(-284.0f, -12.2f, -789.0f, 445);
} else {
- Setup_Scene_Information(239.0f, -12.2f, -146.0f, 820);
- Game_Flag_Reset(413);
- if (!Game_Flag_Query(674) && !Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) {
- Game_Flag_Set(674);
- Actor_Set_Goal_Number(kActorSteele, 420);
+ Setup_Scene_Information( 239.0f, -12.2f, -146.0f, 820);
+ Game_Flag_Reset(kFlagKP02toKP01);
+ if (!Game_Flag_Query(kFlagKP01Entered)
+ && !Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)
+ ) {
+ Game_Flag_Set(kFlagKP01Entered);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP01Wait);
}
}
- Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3);
+
+ Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3);
Scene_Exit_Add_2D_Exit(1, 150, 0, 200, 276, 0);
Scene_Exit_Add_2D_Exit(2, 589, 0, 639, 479, 1);
+
Ambient_Sounds_Add_Looping_Sound(464, 34, 1, 1);
Ambient_Sounds_Add_Looping_Sound(383, 27, 1, 1);
Ambient_Sounds_Add_Looping_Sound(384, 90, 1, 1);
- Ambient_Sounds_Add_Sound(440, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(441, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(442, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(440, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(441, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(442, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(443, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(444, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(443, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(444, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
}
void SceneScriptKP01::SceneLoaded() {
@@ -79,28 +83,30 @@ bool SceneScriptKP01::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptKP01::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -125.0f, -12.2f, -61.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -125.0f, -12.2f, -61.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(415);
+ Game_Flag_Set(kFlagKP01toKP04);
Set_Enter(kSetKP04, kSceneKP04);
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -284.0f, -12.2f, -789.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -284.0f, -12.2f, -789.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(417);
+ Game_Flag_Set(kFlagKP01toKP03);
Set_Enter(kSetKP03, kSceneKP03);
}
return true;
}
+
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 239.0f, 12.2f, -146.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 239.0f, 12.2f, -146.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(414);
+ Game_Flag_Set(kFlagKP01toKP02);
Set_Enter(kSetKP02, kSceneKP02);
}
return true;
@@ -135,7 +141,7 @@ void SceneScriptKP01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
Actor_Force_Stop_Walking(kActorMcCoy);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(417);
+ Game_Flag_Set(kFlagKP01toKP03);
Set_Enter(kSetKP03, kSceneKP03);
//return true;
}
@@ -144,21 +150,26 @@ void SceneScriptKP01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptKP01::PlayerWalkedIn() {
- if (Game_Flag_Query(416)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -93.0f, -12.2f, -61.0f, 0, 0, false, 0);
- Game_Flag_Reset(416);
- } else if (Game_Flag_Query(418)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -240.0f, -12.2f, -789.0f, 0, 0, false, 0);
- Game_Flag_Reset(418);
- } else {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 211.0f, -12.2f, -146.0f, 0, 0, false, 0);
- if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)
- && !Game_Flag_Query(714)
- && Actor_Query_Goal_Number(kActorSteele) == 420
- && Actor_Query_Goal_Number(kActorSteele) != 599) {
- Player_Loses_Control();
- Actor_Set_Goal_Number(kActorSteele, 421);
- }
+ if (Game_Flag_Query(kFlagKP04toKP01)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -93.0f, -12.2f, -61.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagKP04toKP01);
+ return;
+ }
+
+ if (Game_Flag_Query(kFlagKP03toKP01)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -240.0f, -12.2f, -789.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagKP03toKP01);
+ return;
+ }
+
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 211.0f, -12.2f, -146.0f, 0, false, false, 0);
+ if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)
+ && !Game_Flag_Query(714)
+ && Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleKP01Wait
+ && Actor_Query_Goal_Number(kActorSteele) != 599
+ ) {
+ Player_Loses_Control();
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP01TalkToMcCoy);
}
}
diff --git a/engines/bladerunner/script/scene/kp02.cpp b/engines/bladerunner/script/scene/kp02.cpp
index a19f0e8e88..9759a9f4df 100644
--- a/engines/bladerunner/script/scene/kp02.cpp
+++ b/engines/bladerunner/script/scene/kp02.cpp
@@ -25,25 +25,29 @@
namespace BladeRunner {
void SceneScriptKP02::InitializeScene() {
- if (Game_Flag_Query(414)) {
- Setup_Scene_Information(-884.0f, -615.49f, 3065.0f, 20);
+ if (Game_Flag_Query(kFlagKP01toKP02)) {
+ Setup_Scene_Information( -884.0f, -615.49f, 3065.0f, 20);
} else {
Setup_Scene_Information(-1040.0f, -615.49f, 2903.0f, 339);
Game_Flag_Reset(kFlagUG12toKP02);
}
+
+ // exit 0 is missing the game, no way back
Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3);
+
Ambient_Sounds_Add_Looping_Sound(464, 34, 1, 1);
Ambient_Sounds_Add_Looping_Sound(383, 27, 1, 1);
Ambient_Sounds_Add_Looping_Sound(384, 90, 1, 1);
- Ambient_Sounds_Add_Sound(440, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(441, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(442, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+
+ Ambient_Sounds_Add_Sound(440, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(441, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(442, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(443, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(444, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(443, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(444, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
}
void SceneScriptKP02::SceneLoaded() {
@@ -76,7 +80,9 @@ bool SceneScriptKP02::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptKP02::ClickedOnExit(int exitId) {
if (exitId == 0) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1040.0f, -615.49f, 2903.0f, 0, 1, false, 0)) {
- if (Actor_Query_Goal_Number(kActorFreeSlotB) == 406 || Actor_Query_Goal_Number(kActorFreeSlotA) == 406) {
+ if (Actor_Query_Goal_Number(kActorFreeSlotB) == 406
+ || Actor_Query_Goal_Number(kActorFreeSlotA) == 406
+ ) {
Non_Player_Actor_Combat_Mode_Off(kActorFreeSlotB);
Non_Player_Actor_Combat_Mode_Off(kActorFreeSlotA);
Actor_Set_Goal_Number(kActorFreeSlotB, 400);
@@ -94,21 +100,24 @@ bool SceneScriptKP02::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -884.0f, -615.49f, 3065.0f, 0, 1, false, 0)) {
- if (Actor_Query_Goal_Number(kActorFreeSlotB) == 406 || Actor_Query_Goal_Number(kActorFreeSlotA) == 406) {
+ if (Actor_Query_Goal_Number(kActorFreeSlotB) == 406
+ || Actor_Query_Goal_Number(kActorFreeSlotA) == 406
+ ) {
Non_Player_Actor_Combat_Mode_Off(kActorFreeSlotB);
Non_Player_Actor_Combat_Mode_Off(kActorFreeSlotA);
Actor_Set_Goal_Number(kActorFreeSlotB, 400);
Actor_Set_Goal_Number(kActorFreeSlotA, 400);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(413);
+ Game_Flag_Set(kFlagKP02toKP01);
Set_Enter(kSetKP01, kSceneKP01);
} else {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(413);
+ Game_Flag_Set(kFlagKP02toKP01);
Set_Enter(kSetKP01, kSceneKP01);
}
}
@@ -128,10 +137,11 @@ void SceneScriptKP02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptKP02::PlayerWalkedIn() {
- if (Game_Flag_Query(414)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -884.0f, -615.49f, 3035.0f, 0, 0, false, 0);
- Game_Flag_Reset(414);
+ if (Game_Flag_Query(kFlagKP01toKP02)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -884.0f, -615.49f, 3035.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagKP01toKP02);
}
+
if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)
&& Actor_Query_Goal_Number(kActorSteele) != 599
) {
diff --git a/engines/bladerunner/script/scene/kp03.cpp b/engines/bladerunner/script/scene/kp03.cpp
index fca41a02e5..1888380fca 100644
--- a/engines/bladerunner/script/scene/kp03.cpp
+++ b/engines/bladerunner/script/scene/kp03.cpp
@@ -25,7 +25,7 @@
namespace BladeRunner {
void SceneScriptKP03::InitializeScene() {
- if (Game_Flag_Query(420)) {
+ if (Game_Flag_Query(kFlagKP05toKP03)) {
Setup_Scene_Information( 1.0f, -36.55f, 111.0f, 200);
} else {
Setup_Scene_Information(-321.0f, -36.55f, 26.0f, 350);
@@ -53,10 +53,10 @@ void SceneScriptKP03::InitializeScene() {
&& !Game_Flag_Query(484)
)
&& ((Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)
- && Game_Flag_Query(420)
+ && Game_Flag_Query(kFlagKP05toKP03)
)
|| (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)
- && Game_Flag_Query(417)
+ && Game_Flag_Query(kFlagKP01toKP03)
)
)
) {
@@ -93,9 +93,9 @@ bool SceneScriptKP03::ClickedOn3DObject(const char *objectName, bool combatMode)
Scene_Exits_Enable();
sub_401E54();
} else {
- if (Game_Flag_Query(417)) {
+ if (Game_Flag_Query(kFlagKP01toKP03)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -137.0f, -36.55f, 26.0f, 0, 0, true, 0);
- } else if (Game_Flag_Query(420)) {
+ } else if (Game_Flag_Query(kFlagKP05toKP03)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -50.0f, -36.55f, 78.0f, 0, 0, true, 0);
}
if (Game_Flag_Query(421)) {
@@ -135,25 +135,26 @@ bool SceneScriptKP03::ClickedOnExit(int exitId) {
Actor_Set_Goal_Number(kActorSteele, 418);
} else {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1.0f, -36.55f, 111.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1.0f, -36.55f, 111.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Music_Stop(2);
- Game_Flag_Reset(417);
- Game_Flag_Reset(420);
- Game_Flag_Set(419);
+ Game_Flag_Reset(kFlagKP01toKP03);
+ Game_Flag_Reset(kFlagKP05toKP03);
+ Game_Flag_Set(kFlagKP03toKP05);
Set_Enter(kSetKP05_KP06, kSceneKP05);
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -321.0f, -36.55f, 26.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -321.0f, -36.55f, 26.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Music_Stop(2);
- Game_Flag_Reset(417);
- Game_Flag_Reset(420);
- Game_Flag_Set(418);
+ Game_Flag_Reset(kFlagKP01toKP03);
+ Game_Flag_Reset(kFlagKP05toKP03);
+ Game_Flag_Set(kFlagKP03toKP01);
Set_Enter(kSetKP01, kSceneKP01);
}
return true;
@@ -173,21 +174,44 @@ void SceneScriptKP03::SceneFrameAdvanced(int frame) {
if (frame == 123) {
Ambient_Sounds_Play_Sound(491, 99, -60, 100, 99);
}
- if (Game_Flag_Query(421) && !Game_Flag_Query(484)) {
+
+ if ( Game_Flag_Query(421)
+ && !Game_Flag_Query(484)
+ ) {
v1 = -1;
if (!Game_Flag_Query(422)) {
Actor_Query_XYZ(kActorMcCoy, &x, &y, &z);
- if ((Game_Flag_Query(417) && -130.0f < x) || (Game_Flag_Query(420) && -130.0f > x)) {
+ if ((Game_Flag_Query(kFlagKP01toKP03)
+ && -130.0f < x
+ )
+ || (Game_Flag_Query(kFlagKP05toKP03)
+ && -130.0f > x
+ )
+ ) {
v1 = 0;
}
}
if (!Game_Flag_Query(422)) { //todo ? same condition as before
Actor_Query_XYZ(kActorSteele, &x, &y, &z);
- if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Actor_Query_Which_Set_In(kActorSteele) == 46) {
- if ((Game_Flag_Query(417) && -130.0f > x) || (Game_Flag_Query(420) && -130.0f < x)) {
+ if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)
+ && Actor_Query_Which_Set_In(kActorSteele) == 46
+ ) {
+ if ((Game_Flag_Query(kFlagKP01toKP03)
+ && -130.0f > x
+ )
+ || (Game_Flag_Query(kFlagKP05toKP03)
+ && -130.0f < x
+ )
+ ) {
v1 = 1;
}
- } else if ((Game_Flag_Query(417) && -130.0f < x) || (Game_Flag_Query(420) && -130.0f > x)) {
+ } else if ((Game_Flag_Query(kFlagKP01toKP03)
+ && -130.0f < x
+ )
+ || (Game_Flag_Query(kFlagKP05toKP03)
+ && -130.0f > x
+ )
+ ) {
v1 = 1;
}
}
@@ -220,15 +244,24 @@ void SceneScriptKP03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptKP03::PlayerWalkedIn() {
- if (Game_Flag_Query(420)) {
+ if (Game_Flag_Query(kFlagKP05toKP03)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1.0f, -36.55f, 87.0f, 0, 0, false, 0);
}
- if (Actor_Query_Is_In_Current_Set(kActorSteele) && Actor_Query_Goal_Number(kActorSteele) != 419) {
+
+ if (Actor_Query_Is_In_Current_Set(kActorSteele)
+ && Actor_Query_Goal_Number(kActorSteele) != 419
+ ) {
if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) {
- if (Game_Flag_Query(420)) {
+ if (Game_Flag_Query(kFlagKP05toKP03)) {
Actor_Set_Goal_Number(kActorSteele, 410);
}
- } else if (!Game_Flag_Query(422) && !Game_Flag_Query(484) && Game_Flag_Query(417)) {
+ return;
+ }
+
+ if (!Game_Flag_Query(422)
+ && !Game_Flag_Query(484)
+ && Game_Flag_Query(kFlagKP01toKP03)
+ ) {
Scene_Exits_Disable();
Delay(1000);
Actor_Set_Goal_Number(kActorSteele, 411);
@@ -267,9 +300,9 @@ void SceneScriptKP03::sub_401E54() {
Actor_Set_Goal_Number(kActorSteele, 430);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Reset(417);
- Game_Flag_Reset(420);
- Game_Flag_Set(419);
+ Game_Flag_Reset(kFlagKP01toKP03);
+ Game_Flag_Reset(kFlagKP05toKP03);
+ Game_Flag_Set(kFlagKP03toKP05);
Set_Enter(kSetKP05_KP06, kSceneKP05);
Player_Gains_Control();
}
diff --git a/engines/bladerunner/script/scene/kp04.cpp b/engines/bladerunner/script/scene/kp04.cpp
index 4c138a1962..4de125d5bd 100644
--- a/engines/bladerunner/script/scene/kp04.cpp
+++ b/engines/bladerunner/script/scene/kp04.cpp
@@ -25,25 +25,26 @@
namespace BladeRunner {
void SceneScriptKP04::InitializeScene() {
- if (Game_Flag_Query(575)) {
- Setup_Scene_Information(-544.0f, 94.89f, 288.0f, 700);
+ if (Game_Flag_Query(kFlagKP05toKP04)) {
+ Setup_Scene_Information(-544.0f, 94.89f, 288.0f, 700);
} else {
Setup_Scene_Information(-905.0f, 94.89f, 1357.0f, 970);
}
- Scene_Exit_Add_2D_Exit(0, 0, 455, 639, 479, 2);
+ Scene_Exit_Add_2D_Exit(0, 0, 455, 639, 479, 2);
Scene_Exit_Add_2D_Exit(1, 475, 247, 514, 416, 1);
+
Ambient_Sounds_Add_Looping_Sound(464, 34, 1, 1);
Ambient_Sounds_Add_Looping_Sound(383, 27, 1, 1);
Ambient_Sounds_Add_Looping_Sound(384, 90, 1, 1);
- Ambient_Sounds_Add_Sound(440, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(441, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(442, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(440, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(441, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(442, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(443, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(444, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(443, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(444, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
}
void SceneScriptKP04::SceneLoaded() {
@@ -70,7 +71,7 @@ bool SceneScriptKP04::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptKP04::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -905.0f, 94.89f, 1357.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -905.0f, 94.89f, 1357.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(416);
@@ -78,11 +79,12 @@ bool SceneScriptKP04::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -544.0f, 94.89f, 288.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -544.0f, 94.89f, 288.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(574);
+ Game_Flag_Set(kFlagKP04toKP05);
Set_Enter(kSetKP05_KP06, kSceneKP05);
}
return true;
@@ -101,11 +103,11 @@ void SceneScriptKP04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptKP04::PlayerWalkedIn() {
- if (Game_Flag_Query(575)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -584.0f, 94.89f, 288.0f, 0, 0, false, 0);
- Game_Flag_Reset(575);
+ if (Game_Flag_Query(kFlagKP05toKP04)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -584.0f, 94.89f, 288.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagKP05toKP04);
} else {
- Game_Flag_Reset(415);
+ Game_Flag_Reset(kFlagKP01toKP04);
}
}
diff --git a/engines/bladerunner/script/scene/kp05.cpp b/engines/bladerunner/script/scene/kp05.cpp
index d2726060a2..03f3fb24ee 100644
--- a/engines/bladerunner/script/scene/kp05.cpp
+++ b/engines/bladerunner/script/scene/kp05.cpp
@@ -25,28 +25,30 @@
namespace BladeRunner {
void SceneScriptKP05::InitializeScene() {
- if (Game_Flag_Query(577)) {
- Setup_Scene_Information(-868.0f, 0.0f, -68.0f, 520);
- } else if (Game_Flag_Query(574)) {
+ if (Game_Flag_Query(kFlagKP06toKP05)) {
+ Setup_Scene_Information( -868.0f, 0.0f, -68.0f, 520);
+ } else if (Game_Flag_Query(kFlagKP04toKP05)) {
Setup_Scene_Information(-1142.0f, 0.0f, 932.0f, 276);
} else {
- Setup_Scene_Information(-802.0f, 0.0f, 972.0f, 800);
+ Setup_Scene_Information( -802.0f, 0.0f, 972.0f, 800);
}
+
Scene_Exit_Add_2D_Exit(0, 589, 0, 639, 479, 1);
- Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3);
- Scene_Exit_Add_2D_Exit(2, 0, 0, 257, 204, 0);
+ Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3);
+ Scene_Exit_Add_2D_Exit(2, 0, 0, 257, 204, 0);
+
Ambient_Sounds_Add_Looping_Sound(464, 34, 1, 1);
Ambient_Sounds_Add_Looping_Sound(383, 27, 1, 1);
Ambient_Sounds_Add_Looping_Sound(384, 90, 1, 1);
- Ambient_Sounds_Add_Sound(440, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(441, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(442, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(440, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(441, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(442, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(443, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(444, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(443, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(444, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
}
void SceneScriptKP05::SceneLoaded() {
@@ -72,7 +74,7 @@ bool SceneScriptKP05::ClickedOnActor(int actorId) {
bool SceneScriptKP05::ClickedOnItem(int itemId, bool a2) {
if (itemId == 118) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1058.0f, 0.0f, 852.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1058.0f, 0.0f, 852.0f, 0, true, false, 0)) {
Actor_Face_Item(kActorMcCoy, 118, true);
Actor_Clue_Acquire(kActorMcCoy, kCluePowerSource, true, -1);
Item_Remove_From_World(118);
@@ -84,28 +86,30 @@ bool SceneScriptKP05::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptKP05::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -802.0f, 0.0f, 972.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -802.0f, 0.0f, 972.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(420);
+ Game_Flag_Set(kFlagKP05toKP03);
Set_Enter(kSetKP03, kSceneKP03);
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1142.0f, 0.0f, 932.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1142.0f, 0.0f, 932.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(575);
+ Game_Flag_Set(kFlagKP05toKP04);
Set_Enter(kSetKP04, kSceneKP04);
}
return true;
}
+
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -868.0f, 0.0f, -68.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -868.0f, 0.0f, -68.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(576);
+ Game_Flag_Set(kFlagKP05toKP06);
Async_Actor_Walk_To_XYZ(kActorMcCoy, -868.0f, 0.0f, -216.0f, 0, false);
Set_Enter(kSetKP05_KP06, kSceneKP06);
}
@@ -125,18 +129,20 @@ void SceneScriptKP05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptKP05::PlayerWalkedIn() {
- if (Game_Flag_Query(577)) {
- Game_Flag_Reset(577);
- } else if (Game_Flag_Query(574)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1110.0f, 0.0f, 932.0f, 0, 0, false, 0);
- Game_Flag_Reset(574);
+ if (Game_Flag_Query(kFlagKP06toKP05)) {
+ Game_Flag_Reset(kFlagKP06toKP05);
+ } else if (Game_Flag_Query(kFlagKP04toKP05)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1110.0f, 0.0f, 932.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagKP04toKP05);
} else {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -846.0f, 0.0f, 972.0f, 0, 0, false, 0);
- Game_Flag_Query(419); // bug in game?
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -846.0f, 0.0f, 972.0f, 0, false, false, 0);
+ Game_Flag_Query(kFlagKP03toKP05); // bug in game?
}
+
if (Actor_Query_Goal_Number(kActorMaggie) == 411) {
Actor_Set_Goal_Number(kActorMaggie, 412);
}
+
if (Actor_Query_Goal_Number(kActorSteele) == 450) {
Scene_Exits_Disable();
Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
diff --git a/engines/bladerunner/script/scene/kp06.cpp b/engines/bladerunner/script/scene/kp06.cpp
index e1a1e56b17..2a2d2b46c4 100644
--- a/engines/bladerunner/script/scene/kp06.cpp
+++ b/engines/bladerunner/script/scene/kp06.cpp
@@ -25,29 +25,32 @@
namespace BladeRunner {
void SceneScriptKP06::InitializeScene() {
- if (Game_Flag_Query(579) ) {
+ if (Game_Flag_Query(kFlagKP07toKP06) ) {
Setup_Scene_Information(-755.0f, 8.26f, -665.0f, 640);
} else {
- Setup_Scene_Information(-868.0f, 8.26f, -8.0f, 0);
+ Setup_Scene_Information(-868.0f, 8.26f, -8.0f, 0);
}
+
Scene_Exit_Add_2D_Exit(0, 270, 445, 639, 479, 2);
Scene_Exit_Add_2D_Exit(1, 320, 158, 352, 220, 0);
+
Ambient_Sounds_Add_Looping_Sound(464, 34, 1, 1);
Ambient_Sounds_Add_Looping_Sound(383, 27, 1, 1);
Ambient_Sounds_Add_Looping_Sound(384, 90, 1, 1);
- Ambient_Sounds_Add_Sound(440, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(441, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(442, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(440, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(441, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(442, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(443, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(444, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
- if (Game_Flag_Query(576) ) {
- Scene_Loop_Start_Special(0, 0, 0);
+ Ambient_Sounds_Add_Sound(443, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(444, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(445, 2, 100, 25, 33, -100, 100, -101, -101, 0, 0);
+
+ if (Game_Flag_Query(kFlagKP05toKP06) ) {
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
Scene_Loop_Set_Default(1);
- Game_Flag_Reset(576);
+ Game_Flag_Reset(kFlagKP05toKP06);
} else {
Scene_Loop_Set_Default(1);
}
@@ -76,16 +79,16 @@ bool SceneScriptKP06::ClickedOnActor(int actorId) {
if (Actor_Clue_Query(kActorSadik, kCluePowerSource)) {
Actor_Face_Actor(kActorMcCoy, kActorSadik, true);
Actor_Says(kActorMcCoy, 8610, 15);
- Actor_Says(kActorSadik, 290, 3);
+ Actor_Says(kActorSadik, 290, kAnimationModeTalk);
} else if (Actor_Clue_Query(kActorMcCoy, kCluePowerSource) ) {
- Actor_Says(kActorSadik, 280, 3);
- Actor_Says(kActorSadik, 290, 3);
+ Actor_Says(kActorSadik, 280, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 290, kAnimationModeTalk);
Actor_Clue_Acquire(kActorSadik, kCluePowerSource, true, kActorMcCoy);
} else {
- Actor_Says(kActorMcCoy, 2320, 3);
- Actor_Says(kActorMcCoy, 2325, 3);
- Actor_Says(kActorSadik, 300, 3);
- Actor_Says(kActorSadik, 310, 3);
+ Actor_Says(kActorMcCoy, 2320, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 2325, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 300, kAnimationModeTalk);
+ Actor_Says(kActorSadik, 310, kAnimationModeTalk);
}
}
return false;
@@ -100,11 +103,12 @@ bool SceneScriptKP06::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -868.0f, 8.26f, -68.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(577);
+ Game_Flag_Set(kFlagKP06toKP05);
Set_Enter(kSetKP05_KP06, kSceneKP05);
}
return true;
}
+
if (exitId == 1) {
if (Actor_Clue_Query(kActorSadik, kCluePowerSource) || Actor_Query_Goal_Number(kActorSadik) != 416) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -731.0f, 8.26f, -657.0f, 0, 1, false, 0)) {
@@ -119,7 +123,7 @@ bool SceneScriptKP06::ClickedOnExit(int exitId) {
}
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(578);
+ Game_Flag_Set(kFlagKP06toKP07);
Set_Enter(kSetKP07, kSceneKP07);
}
} else if (Actor_Clue_Query(kActorMcCoy, kCluePowerSource) ) {
@@ -130,7 +134,7 @@ bool SceneScriptKP06::ClickedOnExit(int exitId) {
Player_Set_Combat_Mode(false);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(578);
+ Game_Flag_Set(kFlagKP06toKP07);
Set_Enter(kSetKP07, kSceneKP07);
} else {
Actor_Set_Goal_Number(kActorSadik, 417);
@@ -151,8 +155,11 @@ void SceneScriptKP06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptKP06::PlayerWalkedIn() {
- if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants) && Game_Flag_Query(579)) {
- Game_Flag_Reset(579);
+ if (!Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)
+ && Game_Flag_Query(kFlagKP07toKP06)
+ ) {
+ Game_Flag_Reset(kFlagKP07toKP06);
+
if (Actor_Query_Goal_Number(kActorSteele) == 499) {
Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
Actor_Says(kActorSteele, 2530, 13);
@@ -226,7 +233,9 @@ void SceneScriptKP06::PlayerWalkedIn() {
}
void SceneScriptKP06::PlayerWalkedOut() {
- if (Game_Flag_Query(578) && Actor_Query_Goal_Number(kActorSteele) == 433) {
+ if (Game_Flag_Query(kFlagKP06toKP07)
+ && Actor_Query_Goal_Number(kActorSteele) == 433
+ ) {
Actor_Set_Goal_Number(kActorSteele, 499);
}
}
diff --git a/engines/bladerunner/script/scene/kp07.cpp b/engines/bladerunner/script/scene/kp07.cpp
index a4ed0ceaad..9ad6f8dc8e 100644
--- a/engines/bladerunner/script/scene/kp07.cpp
+++ b/engines/bladerunner/script/scene/kp07.cpp
@@ -26,8 +26,11 @@ namespace BladeRunner {
void SceneScriptKP07::InitializeScene() {
Setup_Scene_Information(-12.0f, -41.58f, 72.0f, 0);
- Game_Flag_Reset(578);
+
+ Game_Flag_Reset(kFlagKP06toKP07);
+
Scene_Exit_Add_2D_Exit(0, 315, 185, 381, 285, 0);
+
if (Game_Flag_Query(kFlagMcCoyIsNotHelpingReplicants)) {
if (Game_Flag_Query(kFlagDektoraIsReplicant)
&& Actor_Query_Goal_Number(kActorDektora) < kGoalDektoraGone
@@ -77,9 +80,11 @@ void SceneScriptKP07::InitializeScene() {
Actor_Set_At_XYZ(kActorLuther, -47.0f, 0.0f, 151.0f, 531);
}
}
- Ambient_Sounds_Add_Looping_Sound(585, 7, 1, 1);
+
+ Ambient_Sounds_Add_Looping_Sound(585, 7, 1, 1);
Ambient_Sounds_Add_Looping_Sound(586, 52, 1, 1);
Ambient_Sounds_Add_Looping_Sound(109, 38, 1, 1);
+
if (Game_Flag_Query(582)) {
Scene_Loop_Set_Default(2);
} else {
@@ -131,10 +136,10 @@ bool SceneScriptKP07::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptKP07::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -41.58f, 72.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(579);
+ Game_Flag_Set(kFlagKP07toKP06);
Set_Enter(kSetKP05_KP06, kSceneKP06);
}
return true;