aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner')
-rw-r--r--engines/bladerunner/game_constants.h2
-rw-r--r--engines/bladerunner/script/scene/ps01.cpp96
-rw-r--r--engines/bladerunner/script/scene/ps02.cpp30
-rw-r--r--engines/bladerunner/script/scene/ps04.cpp2
-rw-r--r--engines/bladerunner/script/scene/tb02.cpp4
5 files changed, 83 insertions, 51 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index a1eb110a65..fc22ea4857 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -910,6 +910,7 @@ enum Flags {
kFlagKIAPrivacyAddonIntro = 599,
kFlagTB07toTB02 = 608,
kFlagTB07RachaelTalk = 612,
+ kFlagTB07TyrellMeeting = 625,
kFlagCT11DogWrapperTaken = 645,
kFlagMA04McCoySleeping = 647,
kFlagMA04PhoneMessageFromClovis = 649,
@@ -938,6 +939,7 @@ enum Flags {
kFlagMcCoyShotAtZuben = 712,
kFlagDR04McCoyShotMoraji = 713,
kFlagRC04BobTalk3 = 717,
+ kflagPS01toPS02 = 718,
kFlagCT02McCoyFell = 719,
kFlagCT02McCoyCombatReady = 720,
kFlagZubenBountyPaid = 723,
diff --git a/engines/bladerunner/script/scene/ps01.cpp b/engines/bladerunner/script/scene/ps01.cpp
index bafa4a5570..c80562f1ad 100644
--- a/engines/bladerunner/script/scene/ps01.cpp
+++ b/engines/bladerunner/script/scene/ps01.cpp
@@ -24,6 +24,14 @@
namespace BladeRunner {
+enum kPS01Loops {
+ kPS01LoopInshoot = 0,
+ kPS01LoopMainLoop = 1,
+ kPS01LoopDoorAnim = 3,
+ kPS01LoopOutshoot = 4,
+ kPS01LoopNoSpinner = 5
+};
+
void SceneScriptPS01::InitializeScene() {
Setup_Scene_Information(1872.0f, 16592.0f, -2975.0f, 200);
Scene_Exit_Add_2D_Exit(0, 36, 194, 138, 326, 0);
@@ -31,22 +39,23 @@ void SceneScriptPS01::InitializeScene() {
Scene_Exit_Add_2D_Exit(1, 344, 288, 584, 384, 2);
}
Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1);
- Ambient_Sounds_Add_Sound(68, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(69, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 68, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 69, 60, 180, 16, 25, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 60, 180, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0);
+
if (Game_Flag_Query(kFlagPS02toPS01)) {
if (Game_Flag_Query(kFlagSpinnerAtPS01)) {
- Scene_Loop_Set_Default(1);
+ Scene_Loop_Set_Default(kPS01LoopMainLoop);
} else {
- Scene_Loop_Set_Default(5);
+ Scene_Loop_Set_Default(kPS01LoopNoSpinner);
}
} else {
Actor_Set_Invisible(kActorMcCoy, true);
Game_Flag_Set(kFlagArrivedFromSpinner2);
- Scene_Loop_Start_Special(0, 0, 0);
- Scene_Loop_Set_Default(1);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kPS01LoopInshoot, false);
+ Scene_Loop_Set_Default(kPS01LoopMainLoop);
Player_Loses_Control();
}
}
@@ -78,12 +87,13 @@ bool SceneScriptPS01::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptPS01::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1920.0f, 16581.0f, -2653.0f, 12, 1, false, 0)) {
- Game_Flag_Set(718);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1920.0f, 16581.0f, -2653.0f, 12, true, false, 0)) {
+ Game_Flag_Set(kflagPS01toPS02);
Set_Enter(kSetPS02, kScenePS02);
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1877.9f, 16592.0f, -2975.0f, 0, true, false, 0)) {
Actor_Set_At_XYZ(kActorMcCoy, 1872.0f, 16592.0f, -2975.0f, 870);
@@ -95,77 +105,77 @@ bool SceneScriptPS01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
- int spinnerDest = Spinner_Interface_Choose_Dest(3, true);
+ int spinnerDest = Spinner_Interface_Choose_Dest(kPS01LoopDoorAnim, true);
switch (spinnerDest) {
case kSpinnerDestinationMcCoysApartment:
Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kPS01LoopOutshoot, true);
break;
case kSpinnerDestinationRuncitersAnimals:
Game_Flag_Set(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kPS01LoopOutshoot, true);
break;
case kSpinnerDestinationChinatown:
Game_Flag_Set(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kPS01LoopOutshoot, true);
break;
case kSpinnerDestinationAnimoidRow:
Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kPS01LoopOutshoot, true);
break;
case kSpinnerDestinationTyrellBuilding:
Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kPS01LoopOutshoot, true);
break;
case kSpinnerDestinationDNARow:
Game_Flag_Set(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kPS01LoopOutshoot, true);
break;
case kSpinnerDestinationBradburyBuilding:
Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kPS01LoopOutshoot, true);
break;
case kSpinnerDestinationNightclubRow:
Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kPS01LoopOutshoot, true);
break;
case kSpinnerDestinationHysteriaHall:
Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kPS01LoopOutshoot, true);
break;
default:
Actor_Face_Heading(kActorMcCoy, 870, false);
Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Set(kFlagArrivedFromSpinner2);
Player_Loses_Control();
- Scene_Loop_Start_Special(2, 3, 1);
+ Scene_Loop_Start_Special(kSceneLoopModeOnce, kPS01LoopDoorAnim, true);
break;
}
}
@@ -179,74 +189,87 @@ bool SceneScriptPS01::ClickedOn2DRegion(int region) {
}
void SceneScriptPS01::SceneFrameAdvanced(int frame) {
- if (frame == 71 || frame == 188) {
+ if (frame == 71
+ || frame == 188
+ ) {
Sound_Play(116, 100, 40, 0, 50);
}
- if (frame == 108 || frame == 228) {
+
+ if (frame == 108
+ || frame == 228
+ ) {
Sound_Play(119, 100, 40, 0, 50);
}
+
if (frame == 1) {
Sound_Play(118, 40, 0, 0, 50);
}
+
if (frame == 76) {
Sound_Play(121, 50, 0, 0, 50);
}
+
if (frame == 192) {
Sound_Play(120, 50, 0, 0, 50);
}
+
if (frame == 59) {
Sound_Play(122, 15, 0, 0, 50);
}
+
if (frame == 275) {
Sound_Play(117, 40, 0, 0, 50);
}
+
if (!Game_Flag_Query(kFlagArrivedFromSpinner2)) {
switch (frame) {
case 196:
Actor_Face_Heading(kActorMcCoy, 870, false);
Actor_Set_Frame_Rate_FPS(kActorMcCoy, -1);
- Actor_Change_Animation_Mode(kActorMcCoy, 41);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeSpinnerGetIn);
break;
+
case 220:
Actor_Set_Frame_Rate_FPS(kActorMcCoy, 0);
break;
+
case 240:
Actor_Set_Frame_Rate_FPS(kActorMcCoy, -2);
break;
}
- //return true;
- return;
+ return; // true;
}
+
if (frame == 75) {
Actor_Face_Heading(kActorMcCoy, 870, false);
- Actor_Change_Animation_Mode(kActorMcCoy, 42);
- //return true;
- return;
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeSpinnerGetOut);
+ return; // true;
}
+
if (frame == 119) {
Game_Flag_Reset(kFlagArrivedFromSpinner2);
Player_Gains_Control();
- //return true;
- return;
+ return; // true;
}
+
if (frame > 195) {
if (frame == 239) {
Game_Flag_Reset(kFlagArrivedFromSpinner2);
Player_Gains_Control();
}
- //return true;
- return;
+ return; // true;
}
+
if (frame == 181) {
Actor_Face_Heading(kActorMcCoy, 870, false);
- Actor_Change_Animation_Mode(kActorMcCoy, 42);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeSpinnerGetOut);
} else if (frame == 182) {
Actor_Set_Frame_Rate_FPS(kActorMcCoy, 0);
} else if (frame == 195) {
Actor_Set_Frame_Rate_FPS(kActorMcCoy, -2);
}
- //return true;
- return;
+
+ return; // true;
}
void SceneScriptPS01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
@@ -264,7 +287,10 @@ void SceneScriptPS01::PlayerWalkedOut() {
Actor_Set_Invisible(kActorMcCoy, false);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- if (!Game_Flag_Query(718) && Global_Variable_Query(kVariableChapter) == 1) {
+
+ if (!Game_Flag_Query(kflagPS01toPS02)
+ && Global_Variable_Query(kVariableChapter) == 1
+ ) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Outtake_Play(kOuttakeTowards3, true, -1);
diff --git a/engines/bladerunner/script/scene/ps02.cpp b/engines/bladerunner/script/scene/ps02.cpp
index a358321b10..d655b9686b 100644
--- a/engines/bladerunner/script/scene/ps02.cpp
+++ b/engines/bladerunner/script/scene/ps02.cpp
@@ -27,12 +27,15 @@ namespace BladeRunner {
void SceneScriptPS02::InitializeScene() {
Player_Loses_Control();
Setup_Scene_Information(-13.31f, -40.28f, -48.12f, 30);
+
Scene_Exit_Add_2D_Exit(0, 0, 0, 240, 479, 3);
+
Ambient_Sounds_Remove_All_Non_Looping_Sounds(0);
Ambient_Sounds_Add_Looping_Sound(386, 20, 1, 1);
Ambient_Sounds_Add_Looping_Sound(210, 20, 1, 1);
Ambient_Sounds_Add_Sound(0, 3, 20, 12, 16, 0, 0, -101, -101, 0, 0);
- Scene_Loop_Start_Special(0, 0, 0);
+
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
Scene_Loop_Set_Default(1);
}
@@ -48,7 +51,9 @@ bool SceneScriptPS02::MouseClick(int x, int y) {
}
bool SceneScriptPS02::ClickedOn3DObject(const char *objectName, bool a2) {
- if (Object_Query_Click("E.DOOR01", objectName) || Object_Query_Click("E.D00R02", objectName)) {
+ if (Object_Query_Click("E.DOOR01", objectName)
+ || Object_Query_Click("E.D00R02", objectName)
+ ) {
if (Game_Flag_Query(kFlagPS02toPS01)) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -5.0f, -40.0f, -15.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
@@ -109,6 +114,7 @@ void SceneScriptPS02::SceneFrameAdvanced(int frame) {
if (frame == 1) {
Ambient_Sounds_Play_Sound(208, 45, 0, 0, 0);
}
+
if (frame == 91) {
Ambient_Sounds_Play_Sound(209, 45, 0, 0, 0);
}
@@ -119,7 +125,7 @@ void SceneScriptPS02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptPS02::PlayerWalkedIn() {
- Game_Flag_Reset(718);
+ Game_Flag_Reset(kflagPS01toPS02);
Actor_Face_XYZ(kActorMcCoy, 0.0f, 0.0f, 450.0f, true);
Player_Gains_Control();
activateElevator();
@@ -155,22 +161,20 @@ void SceneScriptPS02::DialogueQueueFlushed(int a1) {
void SceneScriptPS02::activateElevator() {
Scene_Exits_Disable();
switch (Elevator_Activate(kElevatorPS)) {
- case 7:
- Game_Flag_Set(kFlagPS02toPS09);
+ case 3:
+ Game_Flag_Set(kFlagPS02toPS07);
break;
- case 6:
- Game_Flag_Set(kFlagPS02toPS03);
+ case 4:
+ Game_Flag_Set(kFlagPS02toPS01);
break;
case 5:
Game_Flag_Set(kFlagPS02toPS05);
break;
- case 4:
- Game_Flag_Set(kFlagPS02toPS01);
- break;
- case 3:
- Game_Flag_Set(kFlagPS02toPS07);
+ case 6:
+ Game_Flag_Set(kFlagPS02toPS03);
break;
- default:
+ case 7:
+ Game_Flag_Set(kFlagPS02toPS09);
break;
}
Scene_Exits_Enable();
diff --git a/engines/bladerunner/script/scene/ps04.cpp b/engines/bladerunner/script/scene/ps04.cpp
index bab6ce5784..d5eda1f971 100644
--- a/engines/bladerunner/script/scene/ps04.cpp
+++ b/engines/bladerunner/script/scene/ps04.cpp
@@ -171,7 +171,7 @@ void SceneScriptPS04::dialogueWithGuzza() {
Actor_Says(kActorGuzza, 450, 34);
Actor_Says(kActorGuzza, 460, 33);
Actor_Says(kActorMcCoy, 4040, 17);
- Game_Flag_Set(625);
+ Game_Flag_Set(kFlagTB07TyrellMeeting);
break;
case 120: // MONEY
diff --git a/engines/bladerunner/script/scene/tb02.cpp b/engines/bladerunner/script/scene/tb02.cpp
index d82ef220d4..7a68812a50 100644
--- a/engines/bladerunner/script/scene/tb02.cpp
+++ b/engines/bladerunner/script/scene/tb02.cpp
@@ -279,8 +279,8 @@ void SceneScriptTB02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptTB02::PlayerWalkedIn() {
- if (Game_Flag_Query(625)) {
- Game_Flag_Reset(625);
+ if (Game_Flag_Query(kFlagTB07TyrellMeeting)) {
+ Game_Flag_Reset(kFlagTB07TyrellMeeting);
if (Global_Variable_Query(kVariableChapter) == 2
|| Global_Variable_Query(kVariableChapter) == 3
) {