aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/scene
diff options
context:
space:
mode:
authorPeter Kohaut2019-01-24 22:57:41 +0100
committerPeter Kohaut2019-01-24 23:05:13 +0100
commit2cc09b6b1097007b6eeac12882c03475e56e1be0 (patch)
tree777e076f39c4c7dd246342cfe15b3321076b8c6b /engines/bladerunner/script/scene
parent2fd29c5193a0b9e6d3920f0512ce3ca37b00bf7e (diff)
downloadscummvm-rg350-2cc09b6b1097007b6eeac12882c03475e56e1be0.tar.gz
scummvm-rg350-2cc09b6b1097007b6eeac12882c03475e56e1be0.tar.bz2
scummvm-rg350-2cc09b6b1097007b6eeac12882c03475e56e1be0.zip
BLADERUNNER: Fixes for game scripts & cleanup
Diffstat (limited to 'engines/bladerunner/script/scene')
-rw-r--r--engines/bladerunner/script/scene/ar01.cpp44
-rw-r--r--engines/bladerunner/script/scene/ar02.cpp34
-rw-r--r--engines/bladerunner/script/scene/bb01.cpp63
-rw-r--r--engines/bladerunner/script/scene/bb02.cpp62
-rw-r--r--engines/bladerunner/script/scene/bb03.cpp56
-rw-r--r--engines/bladerunner/script/scene/bb04.cpp49
-rw-r--r--engines/bladerunner/script/scene/bb05.cpp71
-rw-r--r--engines/bladerunner/script/scene/bb06.cpp63
-rw-r--r--engines/bladerunner/script/scene/bb07.cpp37
-rw-r--r--engines/bladerunner/script/scene/bb12.cpp8
-rw-r--r--engines/bladerunner/script/scene/bb51.cpp10
-rw-r--r--engines/bladerunner/script/scene/ct01.cpp54
-rw-r--r--engines/bladerunner/script/scene/ct02.cpp2
-rw-r--r--engines/bladerunner/script/scene/ct03.cpp4
-rw-r--r--engines/bladerunner/script/scene/ct04.cpp40
-rw-r--r--engines/bladerunner/script/scene/ct05.cpp11
-rw-r--r--engines/bladerunner/script/scene/ct06.cpp10
-rw-r--r--engines/bladerunner/script/scene/ct11.cpp78
-rw-r--r--engines/bladerunner/script/scene/ct12.cpp10
-rw-r--r--engines/bladerunner/script/scene/dr01.cpp105
-rw-r--r--engines/bladerunner/script/scene/dr02.cpp25
-rw-r--r--engines/bladerunner/script/scene/dr03.cpp176
-rw-r--r--engines/bladerunner/script/scene/dr04.cpp135
-rw-r--r--engines/bladerunner/script/scene/dr05.cpp81
-rw-r--r--engines/bladerunner/script/scene/dr06.cpp31
-rw-r--r--engines/bladerunner/script/scene/hc01.cpp18
-rw-r--r--engines/bladerunner/script/scene/hc02.cpp12
-rw-r--r--engines/bladerunner/script/scene/hc03.cpp12
-rw-r--r--engines/bladerunner/script/scene/hc04.cpp8
-rw-r--r--engines/bladerunner/script/scene/hf01.cpp32
-rw-r--r--engines/bladerunner/script/scene/hf05.cpp14
-rw-r--r--engines/bladerunner/script/scene/hf07.cpp14
-rw-r--r--engines/bladerunner/script/scene/ma01.cpp36
-rw-r--r--engines/bladerunner/script/scene/ma02.cpp8
-rw-r--r--engines/bladerunner/script/scene/ma04.cpp28
-rw-r--r--engines/bladerunner/script/scene/ma07.cpp57
-rw-r--r--engines/bladerunner/script/scene/nr01.cpp120
-rw-r--r--engines/bladerunner/script/scene/nr04.cpp4
-rw-r--r--engines/bladerunner/script/scene/ps01.cpp36
-rw-r--r--engines/bladerunner/script/scene/ps04.cpp18
-rw-r--r--engines/bladerunner/script/scene/ps05.cpp2
-rw-r--r--engines/bladerunner/script/scene/ps07.cpp26
-rw-r--r--engines/bladerunner/script/scene/ps14.cpp39
-rw-r--r--engines/bladerunner/script/scene/rc01.cpp60
-rw-r--r--engines/bladerunner/script/scene/rc02.cpp10
-rw-r--r--engines/bladerunner/script/scene/rc03.cpp20
-rw-r--r--engines/bladerunner/script/scene/rc51.cpp12
-rw-r--r--engines/bladerunner/script/scene/tb02.cpp34
-rw-r--r--engines/bladerunner/script/scene/tb07.cpp91
-rw-r--r--engines/bladerunner/script/scene/ug01.cpp4
-rw-r--r--engines/bladerunner/script/scene/ug02.cpp10
-rw-r--r--engines/bladerunner/script/scene/ug03.cpp85
-rw-r--r--engines/bladerunner/script/scene/ug04.cpp63
-rw-r--r--engines/bladerunner/script/scene/ug05.cpp22
-rw-r--r--engines/bladerunner/script/scene/ug06.cpp73
-rw-r--r--engines/bladerunner/script/scene/ug09.cpp4
-rw-r--r--engines/bladerunner/script/scene/ug10.cpp36
-rw-r--r--engines/bladerunner/script/scene/ug12.cpp35
-rw-r--r--engines/bladerunner/script/scene/ug13.cpp23
-rw-r--r--engines/bladerunner/script/scene/ug14.cpp99
-rw-r--r--engines/bladerunner/script/scene/ug15.cpp116
-rw-r--r--engines/bladerunner/script/scene/ug16.cpp21
-rw-r--r--engines/bladerunner/script/scene/ug17.cpp17
-rw-r--r--engines/bladerunner/script/scene/ug19.cpp69
64 files changed, 1456 insertions, 1191 deletions
diff --git a/engines/bladerunner/script/scene/ar01.cpp b/engines/bladerunner/script/scene/ar01.cpp
index ed4a96b086..9cd104c850 100644
--- a/engines/bladerunner/script/scene/ar01.cpp
+++ b/engines/bladerunner/script/scene/ar01.cpp
@@ -143,7 +143,7 @@ bool SceneScriptAR01::ClickedOnActor(int actorId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -120.73f, 0.0f, 219.17f, 12, 1, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorFishDealer, true);
Actor_Face_Actor(kActorFishDealer, kActorMcCoy, true);
- if (!Game_Flag_Query(kFlagFishDealerTalk)) {
+ if (!Game_Flag_Query(kFlagAR01FishDealerTalk)) {
Actor_Says(kActorMcCoy, 0, 18);
Actor_Says(kActorFishDealer, 0, 14);
Actor_Says(kActorFishDealer, 10, 14);
@@ -159,7 +159,7 @@ bool SceneScriptAR01::ClickedOnActor(int actorId) {
Actor_Says(kActorFishDealer, 80, 14);
Actor_Says(kActorFishDealer, 90, 14);
Actor_Says(kActorMcCoy, 25, 13);
- Game_Flag_Set(kFlagFishDealerTalk);
+ Game_Flag_Set(kFlagAR01FishDealerTalk);
Actor_Set_Goal_Number(kActorFishDealer, 1);
} else {
if ( Actor_Clue_Query(kActorMcCoy, kClueStrangeScale1)
@@ -202,8 +202,8 @@ bool SceneScriptAR01::ClickedOnExit(int exitId) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -477.0, 0.0, -149.0, 0, false, false, 0);
Game_Flag_Set(kFlagAR01toHC01);
Game_Flag_Set(464);
- Game_Flag_Reset(kFlagMcCoyAtARxx);
- Game_Flag_Set(kFlagMcCoyAtHCxx);
+ Game_Flag_Reset(kFlagMcCoyInAnimoidRow);
+ Game_Flag_Set(kFlagMcCoyInHawkersCircle);
Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC01);
Actor_Set_Goal_Number(kActorFishDealer, 3);
}
@@ -251,83 +251,83 @@ bool SceneScriptAR01::ClickedOnExit(int exitId) {
Actor_Voice_Over(4350, kActorVoiceOver);
Game_Flag_Set(kFlagDNARowAvailableTalk);
}
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
- Game_Flag_Reset(kFlagMcCoyAtBBxx);
- Game_Flag_Reset(kFlagMcCoyAtHFxx);
- Game_Flag_Reset(kFlagMcCoyAtARxx);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
+ Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
+ Game_Flag_Reset(kFlagMcCoyInHysteriaHall);
+ Game_Flag_Reset(kFlagMcCoyInAnimoidRow);
int spinnerDest = Spinner_Interface_Choose_Dest(kAR01LoopDoorAnim, false);
Actor_Face_Heading(kActorMcCoy, 545, false);
switch (spinnerDest) {
case kSpinnerDestinationPoliceStation:
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationMcCoysApartment:
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationRuncitersAnimals:
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationChinatown:
- Game_Flag_Set(kFlagMcCoyAtCTxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationTyrellBuilding:
- Game_Flag_Set(kFlagMcCoyAtTBxx);
+ Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationDNARow:
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationBradburyBuilding:
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationNightclubRow:
- Game_Flag_Set(kFlagMcCoyAtNRxx);
+ Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
case kSpinnerDestinationHysteriaHall:
- Game_Flag_Set(kFlagMcCoyAtHFxx);
+ Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtAR01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kAR01LoopOutshoot, true);
break;
default:
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Actor_Set_Invisible(kActorMcCoy, false);
break;
}
@@ -389,7 +389,7 @@ void SceneScriptAR01::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(kFlagMcCoyAtHCxx)) {
+ if (!Game_Flag_Query(kFlagMcCoyInHawkersCircle)) {
Music_Stop(2);
}
if (!Game_Flag_Query(kFlagAR01toHC01)
diff --git a/engines/bladerunner/script/scene/ar02.cpp b/engines/bladerunner/script/scene/ar02.cpp
index a53aee8016..935064f7a2 100644
--- a/engines/bladerunner/script/scene/ar02.cpp
+++ b/engines/bladerunner/script/scene/ar02.cpp
@@ -79,11 +79,11 @@ void SceneScriptAR02::InitializeScene() {
void SceneScriptAR02::SceneLoaded() {
Obstacle_Object("DF_BOOTH", true);
- if (!Game_Flag_Query(374)) {
+ if (!Game_Flag_Query(kFlagAR02DektoraBoughtScorpions)) {
Item_Add_To_World(kItemScrorpions, 976, kSetAR01_AR02, -442.84f, 36.77f, -1144.51f, 360, 36, 36, false, true, false, true);
}
if ( Global_Variable_Query(kVariableChapter) == 4
- && !Game_Flag_Query(374)
+ && !Game_Flag_Query(kFlagAR02DektoraBoughtScorpions)
) {
Game_Flag_Set(kFlagNotUsed0);
Item_Remove_From_World(kItemScrorpions);
@@ -104,10 +104,10 @@ bool SceneScriptAR02::ClickedOnActor(int actorId) {
Actor_Face_Actor(kActorMcCoy, kActorInsectDealer, true);
Actor_Face_Actor(kActorInsectDealer, kActorMcCoy, true);
if (Global_Variable_Query(kVariableChapter) == 2) {
- if ( Game_Flag_Query(kFlagInsectDealerInterviewed)
- && !Game_Flag_Query(kFlagInsectDealerTalk)
+ if ( Game_Flag_Query(kFlagAR02InsectDealerInterviewed)
+ && !Game_Flag_Query(kFlagAR02InsectDealerTalk)
) {
- Game_Flag_Set(kFlagInsectDealerTalk);
+ Game_Flag_Set(kFlagAR02InsectDealerTalk);
Player_Loses_Control();
ADQ_Flush();
ADQ_Add(kActorInsectDealer, 210, 14);
@@ -121,7 +121,7 @@ bool SceneScriptAR02::ClickedOnActor(int actorId) {
Actor_Says(kActorInsectDealer, 250, 14);
Player_Gains_Control();
dialogueWithInsectDealer2();
- } else if (Game_Flag_Query(kFlagInsectDealerInterviewed)) {
+ } else if (Game_Flag_Query(kFlagAR02InsectDealerInterviewed)) {
Actor_Says(kActorMcCoy, 75, 18);
Actor_Says(kActorInsectDealer, 60, 12);
Actor_Says(kActorInsectDealer, 70, 14);
@@ -138,7 +138,7 @@ bool SceneScriptAR02::ClickedOnActor(int actorId) {
Actor_Says(kActorMcCoy, 210, 15);
Actor_Says(kActorInsectDealer, 310, 12);
Actor_Says(kActorMcCoy, 215, 13);
- if (Game_Flag_Query(374)) {
+ if (Game_Flag_Query(kFlagAR02DektoraBoughtScorpions)) {
Actor_Says(kActorMcCoy, 220, 14);
Actor_Says(kActorInsectDealer, 320, 12);
Actor_Says(kActorMcCoy, 225, 13);
@@ -167,10 +167,10 @@ bool SceneScriptAR02::ClickedOnActor(int actorId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -240.79f, 0.0f, -1328.89f, 12, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorHasan, true);
Actor_Face_Actor(kActorHasan, kActorMcCoy, true);
- if (!Game_Flag_Query(kFlagHassanTalk)) {
+ if (!Game_Flag_Query(kFlagAR02HassanTalk)) {
Actor_Says(kActorHasan, 0, 14);
Actor_Says(kActorMcCoy, 140, 18);
- Game_Flag_Set(kFlagHassanTalk);
+ Game_Flag_Set(kFlagAR02HassanTalk);
return true;
}
dialogueWithHassan();
@@ -183,22 +183,22 @@ bool SceneScriptAR02::ClickedOnItem(int itemId, bool a2) {
if (itemId == kItemScrorpions) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -386.96f, 0.0f, -1078.45f, 12, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorInsectDealer, true);
- if (!Game_Flag_Query(kFlagScorpionsChecked)) {
+ if (!Game_Flag_Query(kFlagAR02ScorpionsChecked)) {
Actor_Says(kActorInsectDealer, 0, 14);
Actor_Says(kActorMcCoy, 55, 18);
Actor_Says(kActorInsectDealer, 10, 14);
Actor_Says(kActorMcCoy, 60, 18);
Actor_Says(kActorInsectDealer, 20, 14);
- Game_Flag_Set(kFlagScorpionsChecked);
- } else if ( Game_Flag_Query(kFlagScorpionsChecked)
- && !Game_Flag_Query(kFlagStungByScorpion)
+ Game_Flag_Set(kFlagAR02ScorpionsChecked);
+ } else if ( Game_Flag_Query(kFlagAR02ScorpionsChecked)
+ && !Game_Flag_Query(kFlagAR02StungByScorpion)
) {
Actor_Says(kActorMcCoy, 65, 21);
Actor_Says(kActorInsectDealer, 30, 14);
Actor_Says(kActorInsectDealer, 40, 14);
Actor_Says(kActorMcCoy, 70, 18);
Actor_Says(kActorInsectDealer, 50, 14);
- Game_Flag_Set(kFlagStungByScorpion);
+ Game_Flag_Set(kFlagAR02StungByScorpion);
} else {
Actor_Says(kActorMcCoy, 8527, 14);
}
@@ -222,8 +222,8 @@ bool SceneScriptAR02::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -465.0f, 0.0f, -799.0f, 0, 1, false, 0)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -560.0f, 0.0f, -799.0f, 0, 0, false, 0);
Game_Flag_Set(kFlagAR02toRC03);
- Game_Flag_Reset(kFlagMcCoyAtARxx);
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Reset(kFlagMcCoyInAnimoidRow);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Music_Stop(3);
Set_Enter(kSetRC03, kSceneRC03);
}
@@ -302,7 +302,7 @@ void SceneScriptAR02::dialogueWithInsectDealer1() {
Actor_Says(kActorInsectDealer, 170, 14);
Actor_Says(kActorMcCoy, 100, 16);
Actor_Says(kActorInsectDealer, 180, 13);
- Game_Flag_Set(kFlagInsectDealerInterviewed);
+ Game_Flag_Set(kFlagAR02InsectDealerInterviewed);
Actor_Clue_Acquire(kActorMcCoy, kCluePeruvianLadyInterview, true, kActorInsectDealer);
break;
diff --git a/engines/bladerunner/script/scene/bb01.cpp b/engines/bladerunner/script/scene/bb01.cpp
index 6aa24e283d..47734a4d23 100644
--- a/engines/bladerunner/script/scene/bb01.cpp
+++ b/engines/bladerunner/script/scene/bb01.cpp
@@ -32,25 +32,28 @@ void SceneScriptBB01::InitializeScene() {
} else {
Setup_Scene_Information(43.0f, 0.0f, 1058.0f, 0);
}
- Scene_Exit_Add_2D_Exit(0, 0, 0, 72, 299, 3);
+
+ Scene_Exit_Add_2D_Exit(0, 0, 0, 72, 299, 3);
Scene_Exit_Add_2D_Exit(1, 151, 218, 322, 290, 3);
if (Game_Flag_Query(kFlagSpinnerAtBB01)) {
Scene_Exit_Add_2D_Exit(2, 0, 311, 312, 479, 2);
}
- Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1);
+
+ Ambient_Sounds_Add_Looping_Sound( 54, 50, 0, 1);
Ambient_Sounds_Add_Looping_Sound(105, 25, -100, 0);
- Ambient_Sounds_Add_Sound(82, 5, 60, 40, 60, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(83, 5, 60, 40, 65, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(84, 5, 60, 40, 60, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(67, 5, 80, 20, 25, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(66, 5, 80, 20, 25, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 82, 5, 60, 40, 60, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 83, 5, 60, 40, 65, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 84, 5, 60, 40, 60, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 67, 5, 80, 20, 25, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 66, 5, 80, 20, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(378, 5, 120, 25, 33, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(379, 5, 120, 25, 33, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(380, 5, 120, 25, 33, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
+ Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
+
if (Game_Flag_Query(kFlagSpinnerAtBB01)
&& !Game_Flag_Query(kFlagDR02toBB01)
&& !Game_Flag_Query(kFlagBB02toBB01)
@@ -95,12 +98,13 @@ bool SceneScriptBB01::ClickedOnExit(int exitId) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -140.0f, 9.0f, 818.0f, 0, true, false, 0);
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -233.0f, 9.0f, 846.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagBB01toDR02);
- Game_Flag_Reset(kFlagMcCoyAtBBxx);
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR02);
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -125.39f, 9.0f, 372.45f, 0, true, false, 0)) {
Game_Flag_Set(kFlagBB01toBB02);
@@ -108,80 +112,81 @@ bool SceneScriptBB01::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 43.0f, 0.0f, 1062.0f, 0, false, false, 0)) {
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
- Game_Flag_Reset(kFlagMcCoyAtBBxx);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
+ Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
int spinnerDest = Spinner_Interface_Choose_Dest(3, false);
switch (spinnerDest) {
case kSpinnerDestinationPoliceStation:
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Reset(kFlagSpinnerAtBB01);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationMcCoysApartment:
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Game_Flag_Reset(kFlagSpinnerAtBB01);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationRuncitersAnimals:
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagSpinnerAtBB01);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationChinatown:
- Game_Flag_Set(kFlagMcCoyAtCTxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagSpinnerAtBB01);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationAnimoidRow:
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Game_Flag_Reset(kFlagSpinnerAtBB01);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationTyrellBuilding:
- Game_Flag_Set(kFlagMcCoyAtTBxx);
+ Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagSpinnerAtBB01);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationDNARow:
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagSpinnerAtBB01);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationNightclubRow:
- Game_Flag_Set(kFlagMcCoyAtNRxx);
+ Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Reset(kFlagSpinnerAtBB01);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationHysteriaHall:
- Game_Flag_Set(kFlagMcCoyAtHFxx);
+ Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtBB01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
default:
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Scene_Loop_Start_Special(kSceneLoopModeOnce, 3, true);
break;
}
@@ -199,10 +204,14 @@ void SceneScriptBB01::SceneFrameAdvanced(int frame) {
if (frame == 193) {
Sound_Play(118, 40, 0, 0, 50);
}
- if (frame == 241 || frame == 363) {
+ if (frame == 241
+ || frame == 363
+ ) {
Sound_Play(116, 100, -50, -50, 50);
}
- if (frame == 286 || frame == 407) {
+ if (frame == 286
+ || frame == 407
+ ) {
Sound_Play(119, 100, -50, -50, 50);
}
if (frame == 433) {
diff --git a/engines/bladerunner/script/scene/bb02.cpp b/engines/bladerunner/script/scene/bb02.cpp
index 2eb92516eb..8ebecee27f 100644
--- a/engines/bladerunner/script/scene/bb02.cpp
+++ b/engines/bladerunner/script/scene/bb02.cpp
@@ -24,44 +24,54 @@
namespace BladeRunner {
+enum kBB02Loops {
+ kBB02LoopElevatorComingDown = 0,
+ kBB02LoopMainElevatorDown = 1,
+ kBB02LoopElevatorGoingUp = 3,
+ kBB02LoopMainElevatorUp = 4
+};
+
void SceneScriptBB02::InitializeScene() {
if (Game_Flag_Query(kFlagBB03toBB02)) {
Setup_Scene_Information(179.0f, -415.06f, 274.0f, 904);
- } else if (Game_Flag_Query(333)) {
+ } else if (Game_Flag_Query(kFlagBB04toBB02)) {
Setup_Scene_Information(-12.0f, -415.06f, -27.0f, 264);
- Scene_Loop_Start_Special(0, 0, 0);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kBB02LoopElevatorComingDown, false);
} else {
Setup_Scene_Information(98.0f, -415.06f, -593.0f, 530);
Game_Flag_Reset(kFlagBB01toBB02);
}
+
Scene_Exit_Add_2D_Exit(0, 313, 137, 353, 173, 0);
Scene_Exit_Add_2D_Exit(1, 207, 291, 275, 443, 3);
Scene_Exit_Add_2D_Exit(2, 303, 422, 639, 479, 2);
- Ambient_Sounds_Add_Looping_Sound(54, 20, 0, 1);
+
+ Ambient_Sounds_Add_Looping_Sound( 54, 20, 0, 1);
Ambient_Sounds_Add_Looping_Sound(103, 40, 0, 1);
Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(82, 5, 60, 20, 40, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(83, 5, 60, 20, 45, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(84, 5, 60, 20, 40, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(90, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(91, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 82, 5, 60, 20, 40, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 83, 5, 60, 20, 45, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 84, 5, 60, 20, 40, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 90, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 91, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(72, 5, 80, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(73, 5, 80, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(74, 5, 80, 14, 16, -100, 100, -101, -101, 0, 0);
- if (!Game_Flag_Query(494)) {
- Game_Flag_Set(493);
- Game_Flag_Set(494);
+ Ambient_Sounds_Add_Sound( 72, 5, 80, 14, 16, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 73, 5, 80, 14, 16, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 74, 5, 80, 14, 16, -100, 100, -101, -101, 0, 0);
+
+ if (!Game_Flag_Query(kFlagBB02Entered)) {
+ Game_Flag_Set(kFlagBB02ElevatorDown);
+ Game_Flag_Set(kFlagBB02Entered);
}
- if (Game_Flag_Query(493)) {
- Scene_Loop_Set_Default(1);
+ if (Game_Flag_Query(kFlagBB02ElevatorDown)) {
+ Scene_Loop_Set_Default(kBB02LoopMainElevatorDown);
} else {
- Scene_Loop_Set_Default(4);
+ Scene_Loop_Set_Default(kBB02LoopMainElevatorUp);
}
}
@@ -96,24 +106,26 @@ bool SceneScriptBB02::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, -415.06f, -27.0f, 0, 1, false, 0)) {
Player_Loses_Control();
- if (!Game_Flag_Query(493)) {
- Scene_Loop_Start_Special(kSceneLoopModeOnce, 0, true);
+ if (!Game_Flag_Query(kFlagBB02ElevatorDown)) {
+ Scene_Loop_Start_Special(kSceneLoopModeOnce, kBB02LoopElevatorComingDown, true);
}
- Game_Flag_Set(332);
- Game_Flag_Reset(493);
+ Game_Flag_Set(kFlagBB02toBB04);
+ Game_Flag_Reset(kFlagBB02ElevatorDown);
Set_Enter(kSetBB02_BB04_BB06_BB51, kSceneBB04);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, false);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kBB02LoopElevatorGoingUp, false);
}
return true;
}
+
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 86.0f, -415.06f, 174.0f, 0, 1, false, 0)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 179.0f, -415.06f, 274.0f, 0, 0, false, 0);
Game_Flag_Set(kFlagBB02toBB03);
- Game_Flag_Reset(493);
+ Game_Flag_Reset(kFlagBB02ElevatorDown);
Set_Enter(kSetBB03, kSceneBB03);
}
return true;
@@ -141,10 +153,10 @@ void SceneScriptBB02::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagBB03toBB02)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 86.0f, -415.06f, 174.0f, 0, 0, false, 0);
Game_Flag_Reset(kFlagBB03toBB02);
- } else if (Game_Flag_Query(333)) {
+ } else if (Game_Flag_Query(kFlagBB04toBB02)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 35.0f, -415.06f, -27.0f, 0, 0, false, 0);
Player_Gains_Control();
- Game_Flag_Reset(333);
+ Game_Flag_Reset(kFlagBB04toBB02);
}
}
diff --git a/engines/bladerunner/script/scene/bb03.cpp b/engines/bladerunner/script/scene/bb03.cpp
index 9ecbb953be..b21fcd387c 100644
--- a/engines/bladerunner/script/scene/bb03.cpp
+++ b/engines/bladerunner/script/scene/bb03.cpp
@@ -33,32 +33,34 @@ void SceneScriptBB03::InitializeScene() {
if (Game_Flag_Query(kFlagBB05toBB03)) {
Setup_Scene_Information(204.0f, 60.16f, -164.0f, 740);
}
- Scene_Exit_Add_2D_Exit(0, 589, 0, 639, 479, 1);
+
+ Scene_Exit_Add_2D_Exit(0, 589, 0, 639, 479, 1);
Scene_Exit_Add_2D_Exit(1, 167, 372, 439, 479, 2);
Scene_Exit_Add_2D_Exit(2, 451, 115, 547, 320, 1);
- Ambient_Sounds_Add_Looping_Sound(54, 20, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(103, 40, 0, 1);
+
+ Ambient_Sounds_Add_Looping_Sound( 54, 20, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound(103, 40, 0, 1);
Ambient_Sounds_Add_Looping_Sound(105, 34, 100, 1);
Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(90, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(91, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 90, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 91, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(72, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(73, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(74, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 72, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 73, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 74, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
}
void SceneScriptBB03::SceneLoaded() {
@@ -84,8 +86,8 @@ bool SceneScriptBB03::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptBB03::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 176.0f, 60.16f, -64.0f, 0, 1, false, 0)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 176.0f, 60.16f, 0.0f, 0, 0, false, 0);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 176.0f, 60.16f, -64.0f, 0, true, false, 0)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 176.0f, 60.16f, 0.0f, 0, false, false, 0);
Game_Flag_Set(kFlagBB03toBB04);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
@@ -93,8 +95,9 @@ bool SceneScriptBB03::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 20.0f, 60.16f, 0.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 20.0f, 60.16f, 0.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagBB03toBB02);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
@@ -102,19 +105,20 @@ bool SceneScriptBB03::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 204.0f, 60.16f, -164.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 204.0f, 60.16f, -164.0f, 0, true, false, 0)) {
if (Global_Variable_Query(kVariableChapter) < 4) {
if (Actor_Query_Goal_Number(kActorSebastian) == 200) {
- Actor_Says(kActorSebastian, 70, 3);
+ Actor_Says(kActorSebastian, 70, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 7010, 13);
- Actor_Says(kActorSebastian, 80, 3);
+ Actor_Says(kActorSebastian, 80, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 7015, 12);
- Actor_Says(kActorSebastian, 90, 3);
+ Actor_Says(kActorSebastian, 90, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 7020, 14);
- Actor_Says(kActorSebastian, 100, 3);
+ Actor_Says(kActorSebastian, 100, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 7025, 15);
- Actor_Says(kActorSebastian, 110, 3);
+ Actor_Says(kActorSebastian, 110, kAnimationModeTalk);
Actor_Set_Targetable(kActorBryant, false);
Actor_Set_Targetable(kActorGeneralDoll, false);
}
@@ -123,7 +127,7 @@ bool SceneScriptBB03::ClickedOnExit(int exitId) {
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(kSetBB05, kSceneBB05);
} else {
- Actor_Says(kActorMcCoy, 8522, 3);
+ Actor_Says(kActorMcCoy, 8522, kAnimationModeTalk);
}
}
return true;
diff --git a/engines/bladerunner/script/scene/bb04.cpp b/engines/bladerunner/script/scene/bb04.cpp
index 1bf12cb7f2..ab935ad55c 100644
--- a/engines/bladerunner/script/scene/bb04.cpp
+++ b/engines/bladerunner/script/scene/bb04.cpp
@@ -31,31 +31,33 @@ void SceneScriptBB04::InitializeScene() {
} else {
Setup_Scene_Information(-15.0f, -25.17f, 45.0f, 691);
}
+
Scene_Exit_Add_2D_Exit(0, 218, 102, 360, 254, 1);
- Scene_Exit_Add_2D_Exit(1, 0, 334, 639, 479, 2);
- Ambient_Sounds_Add_Looping_Sound(54, 20, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(103, 40, 0, 1);
+ Scene_Exit_Add_2D_Exit(1, 0, 334, 639, 479, 2);
+
+ Ambient_Sounds_Add_Looping_Sound( 54, 20, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound(103, 40, 0, 1);
Ambient_Sounds_Add_Looping_Sound(105, 44, -100, 1);
Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(90, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(91, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 90, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 91, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(72, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(73, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(74, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 72, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 73, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 74, 5, 80, 20, 20, -100, 100, -101, -101, 0, 0);
}
void SceneScriptBB04::SceneLoaded() {
@@ -80,19 +82,20 @@ bool SceneScriptBB04::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptBB04::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -92.0f, -26.6f, 45.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -92.0f, -26.6f, 45.0f, 0, true, false, 0)) {
Player_Loses_Control();
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -15.0f, -25.17f, 45.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -15.0f, -25.17f, 45.0f, 0, false, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(333);
+ Game_Flag_Set(kFlagBB04toBB02);
Game_Flag_Set(493);
Set_Enter(kSetBB02_BB04_BB06_BB51, kSceneBB02);
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -107.0f, -26.6f, 397.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -107.0f, -26.6f, 397.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagBB04toBB03);
@@ -114,10 +117,10 @@ void SceneScriptBB04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptBB04::PlayerWalkedIn() {
- if (Game_Flag_Query(332)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -92.0f, -26.6f, 45.0f, 0, 0, false, 0);
+ if (Game_Flag_Query(kFlagBB02toBB04)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -92.0f, -26.6f, 45.0f, 0, false, false, 0);
Player_Gains_Control();
- Game_Flag_Reset(332);
+ Game_Flag_Reset(kFlagBB02toBB04);
}
}
diff --git a/engines/bladerunner/script/scene/bb05.cpp b/engines/bladerunner/script/scene/bb05.cpp
index 95e3975b11..cf788291a2 100644
--- a/engines/bladerunner/script/scene/bb05.cpp
+++ b/engines/bladerunner/script/scene/bb05.cpp
@@ -26,39 +26,42 @@ namespace BladeRunner {
void SceneScriptBB05::InitializeScene() {
if (Game_Flag_Query(kFlagBB06toBB05)) {
- Setup_Scene_Information(95.0f, -60.31f, 331.0f, 0);
+ Setup_Scene_Information( 95.0f, -60.31f, 331.0f, 0);
} else if (Game_Flag_Query(kFlagBB12toBB05)) {
- Setup_Scene_Information(87.0f, -60.34f, -96.0f, 0);
+ Setup_Scene_Information( 87.0f, -60.34f, -96.0f, 0);
} else if (Game_Flag_Query(kFlagBB07toBB05)) {
- Setup_Scene_Information(271.0f, -60.31f, 203.0f, 0);
+ Setup_Scene_Information( 271.0f, -60.31f, 203.0f, 0);
} else {
Setup_Scene_Information(-212.0f, -60.31f, 131.0f, 0);
}
- Scene_Exit_Add_2D_Exit(0, 92, 125, 187, 317, 3);
- Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3);
- Scene_Exit_Add_2D_Exit(2, 589, 0, 639, 479, 1);
+
+ Scene_Exit_Add_2D_Exit(0, 92, 125, 187, 317, 3);
+ Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3);
+ Scene_Exit_Add_2D_Exit(2, 589, 0, 639, 479, 1);
Scene_Exit_Add_2D_Exit(3, 481, 113, 573, 307, 0);
- Ambient_Sounds_Add_Looping_Sound(54, 12, 0, 1);
+
+ Ambient_Sounds_Add_Looping_Sound( 54, 12, 0, 1);
Ambient_Sounds_Add_Looping_Sound(103, 28, 0, 1);
Ambient_Sounds_Add_Looping_Sound(105, 14, 0, 1);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(90, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(91, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 90, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 91, 5, 50, 17, 17, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 5, 180, 25, 25, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(72, 5, 80, 14, 14, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(73, 5, 80, 14, 14, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(74, 5, 80, 14, 14, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 72, 5, 80, 14, 14, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 73, 5, 80, 14, 14, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 74, 5, 80, 14, 14, -100, 100, -101, -101, 0, 0);
+
if (!Game_Flag_Query(495)) {
- Overlay_Play("BB05OVER", 0, 0, 0, 0);
+ Overlay_Play("BB05OVER", 0, false, false, 0);
Game_Flag_Set(495);
}
}
@@ -97,7 +100,7 @@ bool SceneScriptBB05::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptBB05::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -212.0f, -60.31f, 131.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -212.0f, -60.31f, 131.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagBB05toBB03);
@@ -105,8 +108,9 @@ bool SceneScriptBB05::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, -60.31f, 331.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, -60.31f, 331.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagBB05toBB06);
@@ -114,8 +118,9 @@ bool SceneScriptBB05::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 271.0f, -60.31f, 203.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 271.0f, -60.31f, 203.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagBB05toBB07);
@@ -123,8 +128,9 @@ bool SceneScriptBB05::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 3) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 151.0f, -60.34f, -108.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 151.0f, -60.34f, -108.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagBB05toBB12);
@@ -147,18 +153,19 @@ void SceneScriptBB05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptBB05::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagBB06toBB05)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, -60.31f, 303.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, -60.31f, 303.0f, 0, false, false, 0);
Game_Flag_Reset(kFlagBB06toBB05);
} else if (Game_Flag_Query(kFlagBB07toBB05)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 231.0f, -60.31f, 203.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 231.0f, -60.31f, 203.0f, 0, false, false, 0);
Game_Flag_Reset(kFlagBB07toBB05);
} else if (Game_Flag_Query(kFlagBB12toBB05)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 111.0f, -60.31f, -24.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 111.0f, -60.31f, -24.0f, 0, false, false, 0);
Game_Flag_Reset(kFlagBB12toBB05);
} else {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -76.0f, -60.31f, 131.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -76.0f, -60.31f, 131.0f, 0, false, false, 0);
Game_Flag_Reset(kFlagBB03toBB05);
}
+
if (Actor_Query_Goal_Number(kActorSebastian) == 200) {
Actor_Face_Actor(kActorSebastian, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorSebastian, true);
@@ -182,12 +189,12 @@ void SceneScriptBB05::PlayerWalkedIn() {
} else {
Actor_Put_In_Set(kActorGeneralDoll, kSetBB05);
Actor_Set_At_Waypoint(kActorGeneralDoll, 134, 0);
- Loop_Actor_Walk_To_Waypoint(kActorGeneralDoll, 135, 0, 0, false);
- Actor_Says(kActorGeneralDoll, 0, 3);
+ Loop_Actor_Walk_To_Waypoint(kActorGeneralDoll, 135, 0, false, false);
+ Actor_Says(kActorGeneralDoll, 0, kAnimationModeTalk);
Actor_Face_Actor(kActorMcCoy, kActorGeneralDoll, true);
Actor_Face_Actor(kActorSebastian, kActorGeneralDoll, true);
Actor_Says(kActorSebastian, 220, 13);
- Loop_Actor_Walk_To_Waypoint(kActorGeneralDoll, 134, 0, 0, false);
+ Loop_Actor_Walk_To_Waypoint(kActorGeneralDoll, 134, 0, false, false);
Actor_Face_Actor(kActorSebastian, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorSebastian, true);
Actor_Says(kActorSebastian, 230, 15);
diff --git a/engines/bladerunner/script/scene/bb06.cpp b/engines/bladerunner/script/scene/bb06.cpp
index 7821b735e2..51fc0db2c0 100644
--- a/engines/bladerunner/script/scene/bb06.cpp
+++ b/engines/bladerunner/script/scene/bb06.cpp
@@ -25,49 +25,54 @@
namespace BladeRunner {
void SceneScriptBB06::InitializeScene() {
- if (Game_Flag_Query(394)) {
- Setup_Scene_Information(76.0f, 0.0f, 79.0f, 622);
- } else if (Game_Flag_Query(395)) {
- Setup_Scene_Information(55.0f, 0.0f, -96.0f, 761);
- } else if (Game_Flag_Query(362)) {
+ if (Game_Flag_Query(kFlagBB51toBB06a)) {
+ Setup_Scene_Information( 76.0f, 0.0f, 79.0f, 622);
+ } else if (Game_Flag_Query(kFlagBB51toBB06b)) {
+ Setup_Scene_Information( 55.0f, 0.0f, -96.0f, 761);
+ } else if (Game_Flag_Query(kFlagBB07toBB06)) {
Setup_Scene_Information(-115.0f, 0.0f, -103.0f, 375);
- Game_Flag_Reset(362);
+ Game_Flag_Reset(kFlagBB07toBB06);
} else {
Setup_Scene_Information(-37.0f, 0.0f, 178.0f, 0);
}
- Scene_Exit_Add_2D_Exit(0, 0, 43, 14, 478, 3);
- Scene_Exit_Add_2D_Exit(1, 425, 0, 639, 361, 0);
+
+ Scene_Exit_Add_2D_Exit(0, 0, 43, 14, 478, 3);
+ Scene_Exit_Add_2D_Exit(1, 425, 0, 639, 361, 0);
Scene_Exit_Add_2D_Exit(3, 195, 164, 239, 280, 3);
+
Ambient_Sounds_Add_Looping_Sound(103, 28, 0, 1);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- if (Game_Flag_Query(394) || Game_Flag_Query(395)) {
- Scene_Loop_Start_Special(0, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+
+ if (Game_Flag_Query(kFlagBB51toBB06a)
+ || Game_Flag_Query(kFlagBB51toBB06b)
+ ) {
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
Scene_Loop_Set_Default(1);
- Game_Flag_Reset(394);
- Game_Flag_Reset(395);
+ Game_Flag_Reset(kFlagBB51toBB06a);
+ Game_Flag_Reset(kFlagBB51toBB06b);
} else {
Scene_Loop_Set_Default(1);
}
if (Game_Flag_Query(410)) {
- Overlay_Play("BB06OVER", 1, 1, 0, 0);
+ Overlay_Play("BB06OVER", 1, true, false, 0);
}
}
void SceneScriptBB06::SceneLoaded() {
Obstacle_Object("V2CHESSTBL01", true);
Clickable_Object("BOX31");
- Item_Add_To_World(77, 931, 2, -127.0f, 68.42f, 57.0f, 0, 8, 8, true, true, false, true);
+ Item_Add_To_World(77, 931, kSetBB02_BB04_BB06_BB51, -127.0f, 68.42f, 57.0f, 0, 8, 8, true, true, false, true);
}
bool SceneScriptBB06::MouseClick(int x, int y) {
@@ -96,7 +101,7 @@ bool SceneScriptBB06::ClickedOnActor(int actorId) {
bool SceneScriptBB06::ClickedOnItem(int itemId, bool a2) {
if (itemId == 77) {
if (Player_Query_Combat_Mode()) {
- Overlay_Play("BB06OVER", 1, 1, 1, 0);
+ Overlay_Play("BB06OVER", 1, true, true, 0);
Game_Flag_Set(410);
Item_Remove_From_World(77);
return true;
@@ -107,7 +112,7 @@ bool SceneScriptBB06::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptBB06::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -37.0f, 0.0f, 178.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -37.0f, 0.0f, 178.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(kFlagBB06toBB05);
@@ -115,20 +120,22 @@ bool SceneScriptBB06::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 101.0f, 0.0f, -25.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 101.0f, 0.0f, -25.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(393);
+ Game_Flag_Set(kFlagBB06toBB51);
Set_Enter(kSetBB02_BB04_BB06_BB51, kSceneBB51);
}
return true;
}
+
if (exitId == 3) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -115.0f, 0.0f, -103.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -115.0f, 0.0f, -103.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(363);
+ Game_Flag_Set(kFlagBB06toBB07);
Set_Enter(kSetBB06_BB07, kSceneBB07);
}
return true;
diff --git a/engines/bladerunner/script/scene/bb07.cpp b/engines/bladerunner/script/scene/bb07.cpp
index ba1d7bcd28..37bf9b5be6 100644
--- a/engines/bladerunner/script/scene/bb07.cpp
+++ b/engines/bladerunner/script/scene/bb07.cpp
@@ -25,33 +25,36 @@
namespace BladeRunner {
void SceneScriptBB07::InitializeScene() {
- if (Game_Flag_Query(365)) {
+ if (Game_Flag_Query(kFlagBB12toBB07)) {
Setup_Scene_Information(-655.0f, 252.59f, -1136.0f, 323);
- } else if (Game_Flag_Query(363)) {
+ } else if (Game_Flag_Query(kFlagBB06toBB07)) {
Setup_Scene_Information(-551.0f, 252.59f, -1004.0f, 29);
- Game_Flag_Reset(363);
+ Game_Flag_Reset(kFlagBB06toBB07);
} else {
Setup_Scene_Information(-652.0f, 252.59f, -1018.0f, 268);
}
- Scene_Exit_Add_2D_Exit(0, 0, 16, 51, 426, 3);
+
+ Scene_Exit_Add_2D_Exit(0, 0, 16, 51, 426, 3);
Scene_Exit_Add_2D_Exit(1, 124, 101, 172, 305, 3);
Scene_Exit_Add_2D_Exit(2, 282, 408, 476, 479, 2);
Scene_2D_Region_Add(0, 308, 283, 354, 308);
+
Ambient_Sounds_Add_Looping_Sound(332, 44, 0, 1);
Ambient_Sounds_Add_Looping_Sound(331, 24, 0, 1);
Ambient_Sounds_Add_Sound(443, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(444, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(445, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(446, 2, 180, 14, 16, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Overlay_Play("BB07OVER", 0, 1, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(309, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(310, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
+
+ Overlay_Play("BB07OVER", 0, true, false, 0);
}
void SceneScriptBB07::SceneLoaded() {
@@ -120,7 +123,7 @@ bool SceneScriptBB07::ClickedOnExit(int exitId) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Overlay_Remove("BB07OVER");
- Game_Flag_Set(364);
+ Game_Flag_Set(kFlagBB07toBB12);
Set_Enter(kSetBB12, kSceneBB12);
}
return true;
@@ -130,7 +133,7 @@ bool SceneScriptBB07::ClickedOnExit(int exitId) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Overlay_Remove("BB07OVER");
- Game_Flag_Set(362);
+ Game_Flag_Set(kFlagBB07toBB06);
Set_Enter(kSetBB06_BB07, kSceneBB06);
}
return true;
@@ -169,9 +172,9 @@ void SceneScriptBB07::PlayerWalkedIn() {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -594.0f, 252.59f, -1018.0f, 6, 0, false, 0);
Game_Flag_Reset(kFlagBB05toBB07);
}
- if (Game_Flag_Query(365)) {
+ if (Game_Flag_Query(kFlagBB12toBB07)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -602.0f, 252.59f, -1124.0f, 6, 0, false, 0);
- Game_Flag_Reset(365);
+ Game_Flag_Reset(kFlagBB12toBB07);
}
}
diff --git a/engines/bladerunner/script/scene/bb12.cpp b/engines/bladerunner/script/scene/bb12.cpp
index 8d9f3eeec1..7f7f1d9a41 100644
--- a/engines/bladerunner/script/scene/bb12.cpp
+++ b/engines/bladerunner/script/scene/bb12.cpp
@@ -25,7 +25,7 @@
namespace BladeRunner {
void SceneScriptBB12::InitializeScene() {
- if (Game_Flag_Query(364)) {
+ if (Game_Flag_Query(kFlagBB07toBB12)) {
Setup_Scene_Information(138.0f, 0.0f, 104.0f, 760);
} else if (Game_Flag_Query(506)) {
Setup_Scene_Information(-129.0f, 0.0f, 64.0f, 307);
@@ -92,7 +92,7 @@ bool SceneScriptBB12::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 138.0f, 0.0f, 104.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(365);
+ Game_Flag_Set(kFlagBB12toBB07);
Set_Enter(kSetBB07, kSceneBB07);
}
return true;
@@ -126,9 +126,9 @@ void SceneScriptBB12::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptBB12::PlayerWalkedIn() {
- if (Game_Flag_Query(364)) {
+ if (Game_Flag_Query(kFlagBB07toBB12)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 114.0f, 0.0f, 104.0f, 0, 0, false, 0);
- Game_Flag_Reset(364);
+ Game_Flag_Reset(kFlagBB07toBB12);
} else if (Game_Flag_Query(506)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -101.0f, 0.0f, 64.0f, 0, 0, false, 0);
Game_Flag_Reset(506);
diff --git a/engines/bladerunner/script/scene/bb51.cpp b/engines/bladerunner/script/scene/bb51.cpp
index ae93dfae70..a28f66961b 100644
--- a/engines/bladerunner/script/scene/bb51.cpp
+++ b/engines/bladerunner/script/scene/bb51.cpp
@@ -26,7 +26,7 @@ namespace BladeRunner {
void SceneScriptBB51::InitializeScene() {
Setup_Scene_Information(101.0f, 0.0f, -25.0f, 152);
- Game_Flag_Reset(393);
+ Game_Flag_Reset(kFlagBB06toBB51);
Scene_Exit_Add_2D_Exit(0, 615, 0, 639, 479, 1);
Scene_Exit_Add_2D_Exit(1, 0, 323, 241, 479, 2);
Ambient_Sounds_Add_Looping_Sound(103, 28, 0, 1);
@@ -81,19 +81,19 @@ bool SceneScriptBB51::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptBB51::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 76.0f, 0.0f, 79.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 76.0f, 0.0f, 79.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(394);
+ Game_Flag_Set(kFlagBB51toBB06a);
Set_Enter(kSetBB02_BB04_BB06_BB51, kSceneBB06);
}
return true;
}
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 55.0f, 0.0f, -96.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 55.0f, 0.0f, -96.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(395);
+ Game_Flag_Set(kFlagBB51toBB06b);
Set_Enter(kSetBB02_BB04_BB06_BB51, kSceneBB06);
}
return true;
diff --git a/engines/bladerunner/script/scene/ct01.cpp b/engines/bladerunner/script/scene/ct01.cpp
index df8986430a..f43450f6da 100644
--- a/engines/bladerunner/script/scene/ct01.cpp
+++ b/engines/bladerunner/script/scene/ct01.cpp
@@ -72,7 +72,7 @@ void SceneScriptCT01::InitializeScene() {
if (Actor_Clue_Query(kActorMcCoy, kClueZubenRunsAway)) {
Scene_Exit_Add_2D_Exit(kCT01ExitCT03, 571, 233, 639, 367, 1);
}
- if (Game_Flag_Query(kFlagWarehouseOpen)) {
+ if (Game_Flag_Query(kFlagCT05WarehouseOpen)) {
Scene_Exit_Add_2D_Exit(kCT01ExitCT12, 506, 400, 639, 479, 2);
}
if (Game_Flag_Query(kFlagSpinnerAtCT01)) {
@@ -188,19 +188,17 @@ bool SceneScriptCT01::ClickedOnActor(int actorId) {
}
if (actorId == kActorGordo) {
- if (Actor_Query_Goal_Number(kActorGordo) == 0) {
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoDefault) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -338.1f, -6.5f, 419.65f, 6, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
- if (!Game_Flag_Query(kFlagCT01McCoyTalkedToGordo)) {
+ if (!Game_Flag_Query(kFlagCT01GordoTalk)) {
Actor_Says(kActorMcCoy, 335, 18);
Actor_Says(kActorGordo, 20, 30);
- Game_Flag_Set(kFlagCT01McCoyTalkedToGordo);
+ Game_Flag_Set(kFlagCT01GordoTalk);
Actor_Clue_Acquire(kActorGordo, kClueMcCoysDescription, true, kActorMcCoy);
Actor_Clue_Acquire(kActorMcCoy, kClueMcCoyIsABladeRunner, true, kActorMcCoy);
Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -1);
- } else if (Actor_Query_Goal_Number(kActorGordo) != 0) {
- Actor_Says(kActorMcCoy, 365, 14);
- } else {
+ } else if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoDefault) {
Actor_Says(kActorMcCoy, 340, 13);
Actor_Says(kActorMcCoy, 345, 11);
Actor_Says(kActorGordo, 30, 30);
@@ -208,6 +206,8 @@ bool SceneScriptCT01::ClickedOnActor(int actorId) {
Actor_Says(kActorGordo, 40, 30);
Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -5);
Player_Loses_Control();
+ } else {
+ Actor_Says(kActorMcCoy, 365, 14);
}
if (Actor_Query_Is_In_Current_Set(kActorZuben)) {
Actor_Modify_Friendliness_To_Other(kActorZuben, kActorMcCoy, -2);
@@ -257,19 +257,19 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -314.0f, -6.5f, 326.0f, 0, true, false, 0)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -330.0f, -6.5f, 221.0f, 0, false, true, 0);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -530.0f, -6.5f, 241.0f, 0, false, true, 0);
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
- Game_Flag_Reset(kFlagMcCoyAtARxx);
- Game_Flag_Reset(kFlagMcCoyAtTBxx);
- Game_Flag_Reset(kFlagMcCoyAtDRxx);
- Game_Flag_Reset(kFlagMcCoyAtBBxx);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
+ Game_Flag_Reset(kFlagMcCoyInAnimoidRow);
+ Game_Flag_Reset(kFlagMcCoyInTyrellBuilding);
+ Game_Flag_Reset(kFlagMcCoyInDNARow);
+ Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
int spinnerDest = Spinner_Interface_Choose_Dest(-1, false);
switch (spinnerDest) {
case kSpinnerDestinationPoliceStation:
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtPS01);
@@ -277,7 +277,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kCT01LoopOutshot, true);
break;
case kSpinnerDestinationMcCoysApartment:
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtMA01);
@@ -285,7 +285,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kCT01LoopOutshot, true);
break;
case kSpinnerDestinationRuncitersAnimals:
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtRC01);
@@ -293,7 +293,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kCT01LoopOutshot, true);
break;
case kSpinnerDestinationAnimoidRow:
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtAR01);
@@ -301,7 +301,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kCT01LoopOutshot, true);
break;
case kSpinnerDestinationTyrellBuilding:
- Game_Flag_Set(kFlagMcCoyAtTBxx);
+ Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtTB02);
@@ -309,7 +309,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kCT01LoopOutshot, true);
break;
case kSpinnerDestinationDNARow:
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtDR01);
@@ -317,7 +317,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kCT01LoopOutshot, true);
break;
case kSpinnerDestinationBradburyBuilding:
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtBB01);
@@ -325,7 +325,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kCT01LoopOutshot, true);
break;
case kSpinnerDestinationNightclubRow:
- Game_Flag_Set(kFlagMcCoyAtNRxx);
+ Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtNR01);
@@ -333,7 +333,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kCT01LoopOutshot, true);
break;
case kSpinnerDestinationHysteriaHall:
- Game_Flag_Set(kFlagMcCoyAtHFxx);
+ Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Reset(kFlagSpinnerAtCT01);
Game_Flag_Set(kFlagSpinnerAtHF01);
@@ -341,7 +341,7 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kCT01LoopOutshot, true);
break;
default:
- Game_Flag_Set(kFlagMcCoyAtCTxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
Player_Loses_Control();
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -530.0f, -6.5f, 241.0f, 0, false, true, 0);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -330.0f, -6.5f, 221.0f, 0, false, true, 0);
@@ -433,7 +433,7 @@ void SceneScriptCT01::PlayerWalkedOut() {
Ambient_Sounds_Remove_All_Looping_Sounds(1);
}
Music_Stop(5);
- if (!Game_Flag_Query(kFlagMcCoyAtCTxx) && Global_Variable_Query(kVariableChapter) == 1) {
+ if (!Game_Flag_Query(kFlagMcCoyInChinaTown) && 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);
@@ -544,7 +544,7 @@ void SceneScriptCT01::dialogueWithHowieLee() {
if (Query_Difficulty_Level() != 0) {
Global_Variable_Decrement(kVariableChinyen, 10);
}
- Game_Flag_Set(kFlagBoughtHowieLeeFood);
+ Game_Flag_Set(kFlagCT01BoughtHowieLeeFood);
} else {
Actor_Says(kActorHowieLee, 130, 15);
}
diff --git a/engines/bladerunner/script/scene/ct02.cpp b/engines/bladerunner/script/scene/ct02.cpp
index da1fcac014..0e62302d1d 100644
--- a/engines/bladerunner/script/scene/ct02.cpp
+++ b/engines/bladerunner/script/scene/ct02.cpp
@@ -194,7 +194,7 @@ void SceneScriptCT02::dialogueWithZuben() {
}
bool SceneScriptCT02::ClickedOnActor(int actorId) {
- if (actorId == kActorZuben && Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT01Leave) {
+ if (actorId == kActorZuben && Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT01WalkToCT02) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -255.02f, -145.11f, 212.42f, 0, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorZuben, true);
Actor_Face_Actor(kActorZuben, kActorMcCoy, true);
diff --git a/engines/bladerunner/script/scene/ct03.cpp b/engines/bladerunner/script/scene/ct03.cpp
index 506ff1cfdd..62a8022425 100644
--- a/engines/bladerunner/script/scene/ct03.cpp
+++ b/engines/bladerunner/script/scene/ct03.cpp
@@ -116,8 +116,8 @@ void SceneScriptCT03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptCT03::PlayerWalkedIn() {
- if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT02Flee) {
- Actor_Set_Goal_Number(kActorZuben, kGoalZubenCT06Hide);
+ if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT02RunToFreeSlotG) {
+ Actor_Set_Goal_Number(kActorZuben, kGoalZubenCT06HideAtFreeSlotA);
}
}
diff --git a/engines/bladerunner/script/scene/ct04.cpp b/engines/bladerunner/script/scene/ct04.cpp
index 24c1d3485e..613fd05829 100644
--- a/engines/bladerunner/script/scene/ct04.cpp
+++ b/engines/bladerunner/script/scene/ct04.cpp
@@ -73,18 +73,18 @@ bool SceneScriptCT04::MouseClick(int x, int y) {
bool SceneScriptCT04::ClickedOn3DObject(const char *objectName, bool a2) {
if (objectName) { // this can be only "DUMPSTER"
- if (!Game_Flag_Query(kFlagHomelessTalkedTo)
- && !Game_Flag_Query(kFlagMcCoyKilledHomeless)
+ if (!Game_Flag_Query(kFlagCT04HomelessTalk)
+ && !Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy)
&& Actor_Query_Goal_Number(kActorTransient) == kGoalTransientDefault
) {
- Game_Flag_Set(kFlagHomelessTalkedTo);
+ Game_Flag_Set(kFlagCT04HomelessTalk);
Actor_Set_Goal_Number(kActorTransient, kGoalTransientCT04Leave);
}
- if ( Game_Flag_Query(kFlagMcCoyKilledHomeless)
- && !Game_Flag_Query(kFlagHomelessBodyInDumpster)
- && !Game_Flag_Query(kFlagHomelessBodyFound)
- && !Game_Flag_Query(kFlagDumpsterEmptied)
+ if ( Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy)
+ && !Game_Flag_Query(kFlagCT04HomelessBodyInDumpster)
+ && !Game_Flag_Query(kFlagCT04HomelessBodyFound)
+ && !Game_Flag_Query(kFlagCT04HomelessBodyThrownAway)
&& Global_Variable_Query(kVariableChapter) == 1
) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -147.41f, -621.3f, 724.57f, 0, true, false, 0)) {
@@ -96,34 +96,34 @@ bool SceneScriptCT04::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Voice_Over(320, kActorVoiceOver);
Actor_Voice_Over(330, kActorVoiceOver);
Actor_Voice_Over(340, kActorVoiceOver);
- Game_Flag_Set(kFlagHomelessBodyInDumpster);
- Game_Flag_Set(kFlagHomelessBodyInDumpsterNotChecked);
+ Game_Flag_Set(kFlagCT04HomelessBodyInDumpster);
+ Game_Flag_Set(kFlagCT04HomelessBodyInDumpsterNotChecked);
}
return false;
}
- if (Game_Flag_Query(kFlagHomelessBodyInDumpster)) {
- if (Game_Flag_Query(kFlagDumpsterEmptied)) {
+ if (Game_Flag_Query(kFlagCT04HomelessBodyInDumpster)) {
+ if (Game_Flag_Query(kFlagCT04HomelessBodyThrownAway)) {
Actor_Voice_Over(270, kActorVoiceOver);
Actor_Voice_Over(280, kActorVoiceOver);
- } else if (Game_Flag_Query(kFlagHomelessBodyFound)) {
+ } else if (Game_Flag_Query(kFlagCT04HomelessBodyFound)) {
Actor_Voice_Over(250, kActorVoiceOver);
Actor_Voice_Over(260, kActorVoiceOver);
} else {
Actor_Voice_Over(230, kActorVoiceOver);
Actor_Voice_Over(240, kActorVoiceOver);
- Game_Flag_Reset(kFlagHomelessBodyInDumpsterNotChecked);
+ Game_Flag_Reset(kFlagCT04HomelessBodyInDumpsterNotChecked);
}
return true;
}
- if (!Game_Flag_Query(kFlagLicensePlaceFound)) {
+ if (!Game_Flag_Query(kFlagCT04LicensePlaceFound)) {
if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 75, 0, true, false)) {
Actor_Face_Heading(kActorMcCoy, 707, false);
Actor_Change_Animation_Mode(kActorMcCoy, 38);
Actor_Clue_Acquire(kActorMcCoy, kClueLicensePlate, true, -1);
Item_Pickup_Spin_Effect(952, 392, 225);
- Game_Flag_Set(kFlagLicensePlaceFound);
+ Game_Flag_Set(kFlagCT04LicensePlaceFound);
return true;
}
}
@@ -173,7 +173,7 @@ void SceneScriptCT04::dialogueWithHomeless() {
bool SceneScriptCT04::ClickedOnActor(int actorId) {
if (actorId == kActorTransient) {
- if (Game_Flag_Query(kFlagMcCoyKilledHomeless)) {
+ if (Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy)) {
if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorTransient, 36, true, false)) {
Actor_Voice_Over(290, kActorVoiceOver);
Actor_Voice_Over(300, kActorVoiceOver);
@@ -183,7 +183,7 @@ bool SceneScriptCT04::ClickedOnActor(int actorId) {
Actor_Set_Targetable(kActorTransient, false);
if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorTransient, 36, true, false)) {
Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
- if (!Game_Flag_Query(kFlagHomelessTalkedTo)) {
+ if (!Game_Flag_Query(kFlagCT04HomelessTalk)) {
if (Game_Flag_Query(kFlagZubenRetired)) {
Actor_Says(kActorMcCoy, 435, kAnimationModeTalk);
Actor_Set_Goal_Number(kActorTransient, kGoalTransientCT04Leave);
@@ -194,7 +194,7 @@ bool SceneScriptCT04::ClickedOnActor(int actorId) {
dialogueWithHomeless();
Actor_Set_Goal_Number(kActorTransient, kGoalTransientCT04Leave);
}
- Game_Flag_Set(kFlagHomelessTalkedTo);
+ Game_Flag_Set(kFlagCT04HomelessTalk);
} else {
Actor_Face_Actor(kActorMcCoy, kActorTransient, true);
Actor_Says(kActorMcCoy, 435, kAnimationModeTalk);
@@ -240,8 +240,8 @@ bool SceneScriptCT04::ClickedOn2DRegion(int region) {
}
void SceneScriptCT04::SceneFrameAdvanced(int frame) {
- if (Game_Flag_Query(325)) {
- Game_Flag_Reset(325);
+ if (Game_Flag_Query(kFlagCT04BodyDumped)) {
+ Game_Flag_Reset(kFlagCT04BodyDumped);
Sound_Play(180, 100, 80, 80, 50);
}
}
diff --git a/engines/bladerunner/script/scene/ct05.cpp b/engines/bladerunner/script/scene/ct05.cpp
index a30e4f99bb..a398d45559 100644
--- a/engines/bladerunner/script/scene/ct05.cpp
+++ b/engines/bladerunner/script/scene/ct05.cpp
@@ -33,7 +33,7 @@ void SceneScriptCT05::InitializeScene() {
} else {
Setup_Scene_Information(-375.0f, -109.91f, 750.0f, 600);
}
- if (Game_Flag_Query(kFlagWarehouseOpen)) {
+ if (Game_Flag_Query(kFlagCT05WarehouseOpen)) {
Scene_Exit_Add_2D_Exit(0, 228, 205, 293, 300, 0);
}
Scene_Exit_Add_2D_Exit(1, 320, 458, 639, 479, 2);
@@ -44,7 +44,7 @@ void SceneScriptCT05::InitializeScene() {
Ambient_Sounds_Add_Sound( 90, 5, 20, 8, 10, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound( 91, 5, 20, 8, 10, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(205, 5, 30, 18, 30, -100, 100, -101, -101, 0, 0);
- if (Game_Flag_Query(kFlagWarehouseOpen)) {
+ if (Game_Flag_Query(kFlagCT05WarehouseOpen)) {
Scene_Loop_Set_Default(2);
} else {
Scene_Loop_Set_Default(0);
@@ -217,6 +217,7 @@ void SceneScriptCT05::PlayerWalkedIn() {
}
Player_Gains_Control();
}
+
if (Game_Flag_Query(kFlagCT06toCT05)) {
Footstep_Sound_Override_On(2);
Loop_Actor_Travel_Stairs(kActorMcCoy, 7, false, kAnimationModeIdle);
@@ -224,10 +225,10 @@ void SceneScriptCT05::PlayerWalkedIn() {
Loop_Actor_Travel_Stairs(kActorMcCoy, 10, false, kAnimationModeIdle);
Game_Flag_Reset(kFlagCT06toCT05);
Footstep_Sound_Override_Off();
- if (Actor_Query_Goal_Number(kActorGordo) == 2
- && Game_Flag_Query(kFlagZubenPhoto)
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoLeftCT01
+ && Game_Flag_Query(kFlagCT06ZubenPhoto)
) {
- Actor_Set_Goal_Number(kActorGordo, 3);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoWalkThroughCT05);
}
}
}
diff --git a/engines/bladerunner/script/scene/ct06.cpp b/engines/bladerunner/script/scene/ct06.cpp
index a5856b3717..1c5ace1941 100644
--- a/engines/bladerunner/script/scene/ct06.cpp
+++ b/engines/bladerunner/script/scene/ct06.cpp
@@ -51,7 +51,7 @@ void SceneScriptCT06::InitializeScene() {
Ambient_Sounds_Add_Sound(379, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(380, 70, 180, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 60, 180, 50, 100, 0, 0, -101, -101, 0, 0);
- if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT06Hide) {
+ if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT06HideAtFreeSlotA) {
Ambient_Sounds_Add_Sound(196, 1, 5, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(197, 1, 5, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(198, 1, 5, 25, 25, -100, 100, -101, -101, 0, 0);
@@ -67,7 +67,7 @@ void SceneScriptCT06::SceneLoaded() {
Unobstacle_Object("INSULPIP01", true);
Unobstacle_Object("CB BOX04", true);
Unclickable_Object("DOOR");
- if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT06Hide) {
+ if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT06HideAtFreeSlotA) {
Preload(3);
Preload(4);
Preload(389);
@@ -90,7 +90,7 @@ bool SceneScriptCT06::ClickedOnActor(int actorId) {
if (actorId == kActorZuben) {
Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorZuben, 24, true, false);
Actor_Face_Actor(kActorMcCoy, kActorZuben, true);
- if (!Game_Flag_Query(kFlagZubenPhoto)) {
+ if (!Game_Flag_Query(kFlagCT06ZubenPhoto)) {
Actor_Clue_Acquire(kActorMcCoy, kClueZuben, true, -1);
Item_Pickup_Spin_Effect(984, 340, 369);
Actor_Voice_Over(350, kActorVoiceOver);
@@ -102,7 +102,7 @@ bool SceneScriptCT06::ClickedOnActor(int actorId) {
Actor_Voice_Over(400, kActorVoiceOver);
Actor_Voice_Over(410, kActorVoiceOver);
}
- Game_Flag_Set(kFlagZubenPhoto);
+ Game_Flag_Set(kFlagCT06ZubenPhoto);
return true;
}
Actor_Says(kActorMcCoy, 8570, 13);
@@ -127,7 +127,7 @@ bool SceneScriptCT06::ClickedOnExit(int exitId) {
return true;
}
if (exitId == 1) {
- if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT06Hide) {
+ if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT06HideAtFreeSlotA) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 203.91f, -58.02f, 0.47f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_Sound(196, true);
Ambient_Sounds_Remove_Sound(197, true);
diff --git a/engines/bladerunner/script/scene/ct11.cpp b/engines/bladerunner/script/scene/ct11.cpp
index 46fc21dc3e..758162811d 100644
--- a/engines/bladerunner/script/scene/ct11.cpp
+++ b/engines/bladerunner/script/scene/ct11.cpp
@@ -25,26 +25,29 @@
namespace BladeRunner {
void SceneScriptCT11::InitializeScene() {
- if (Game_Flag_Query(91)) {
+ if (Game_Flag_Query(kFlagCT12toCT11)) {
Setup_Scene_Information(-378.0f, 9.68f, -55.0f, 440);
- } else if (Game_Flag_Query(558)) {
- Setup_Scene_Information(315.0f, 0.0f, 628.0f, 0);
+ } else if (Game_Flag_Query(kFlagDR01toCT11)) {
+ Setup_Scene_Information( 315.0f, 0.0f, 628.0f, 0);
} else {
- Setup_Scene_Information(152.0f, 9.68f, -8.0f, 0);
+ Setup_Scene_Information( 152.0f, 9.68f, -8.0f, 0);
}
+
Scene_Exit_Add_2D_Exit(0, 257, 240, 364, 330, 1);
Scene_Exit_Add_2D_Exit(1, 97, 0, 155, 324, 0);
Scene_Exit_Add_2D_Exit(2, 0, 0, 20, 479, 3);
+
Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1);
- Ambient_Sounds_Add_Sound(67, 5, 80, 16, 25, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(66, 5, 80, 16, 25, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 67, 5, 80, 16, 25, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 66, 5, 80, 16, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(378, 5, 80, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(379, 5, 80, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(380, 5, 80, 50, 100, -100, 100, -101, -101, 0, 0);
- if (Global_Variable_Query(kVariableChapter) <= 3) {
- Scene_Loop_Set_Default(0);
- } else {
+
+ if (Global_Variable_Query(kVariableChapter) > 3) {
Scene_Loop_Set_Default(2);
+ } else {
+ Scene_Loop_Set_Default(0);
}
}
@@ -99,25 +102,27 @@ bool SceneScriptCT11::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptCT11::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 121.0f, 9.68f, -42.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 121.0f, 9.68f, -42.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagCT11toCT09);
Set_Enter(kSetCT09, kSceneCT09);
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -300.0f, 9.68f, 66.0f, 0, 1, false, 0)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -400.0f, 9.68f, -70.0f, 0, 1, false, 0);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -300.0f, 9.68f, 66.0f, 0, true, false, 0)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -400.0f, 9.68f, -70.0f, 0, true, false, 0);
Game_Flag_Set(kFlagCT11toCT12);
Set_Enter(kSetCT01_CT12, kSceneCT12);
}
return true;
}
+
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 290.0f, 0.0f, 635.0f, 0, 1, false, 0)) {
- Game_Flag_Set(531);
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 290.0f, 0.0f, 635.0f, 0, true, false, 0)) {
+ Game_Flag_Set(kFlagCT11toDR01);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
}
return true;
@@ -127,7 +132,7 @@ bool SceneScriptCT11::ClickedOnExit(int exitId) {
bool SceneScriptCT11::ClickedOn2DRegion(int region) {
if (region == 0 && Game_Flag_Query(725)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 686.0f, 0.0f, 658.0f, 12, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 686.0f, 0.0f, 658.0f, 12, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 47, false);
Item_Remove_From_World(115);
Actor_Clue_Acquire(kActorMcCoy, kClueLichenDogWrapper, false, -1);
@@ -141,37 +146,40 @@ bool SceneScriptCT11::ClickedOn2DRegion(int region) {
}
return true;
}
+
if (region == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 686.0f, 0.0f, 658.0f, 12, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 686.0f, 0.0f, 658.0f, 12, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 47, false);
- int temp = 0;
+ int cluesFound = 0;
if (Actor_Clue_Query(kActorMcCoy, kClueCrowdInterviewB)) {
- temp = 1;
+ ++cluesFound;
}
if (Actor_Clue_Query(kActorMcCoy, kCluePaintTransfer)) {
- ++temp;
+ ++cluesFound;
}
if (Actor_Clue_Query(kActorMcCoy, kClueLabPaintTransfer)) {
- ++temp;
+ ++cluesFound;
}
if (Actor_Clue_Query(kActorMcCoy, kClueLicensePlate)) {
- temp += 2;
+ cluesFound += 2;
}
if (Actor_Clue_Query(kActorMcCoy, kClueCarColorAndMake)) {
- temp += 2;
+ cluesFound += 2;
}
if (Actor_Clue_Query(kActorMcCoy, kCluePartialLicenseNumber)) {
- temp += 2;
+ cluesFound += 2;
}
- if (temp <= 2 || Actor_Clue_Query(kActorMcCoy, kClueCar)) {
- Actor_Says(kActorMcCoy, 8525, 12);
- } else {
+ if ( cluesFound > 2
+ && !Actor_Clue_Query(kActorMcCoy, kClueCar)
+ ) {
Actor_Voice_Over(510, kActorVoiceOver);
Actor_Voice_Over(520, kActorVoiceOver);
Actor_Voice_Over(530, kActorVoiceOver);
Actor_Voice_Over(540, kActorVoiceOver);
Actor_Clue_Acquire(kActorMcCoy, kClueCar, false, -1);
Scene_2D_Region_Remove(1);
+ } else {
+ Actor_Says(kActorMcCoy, 8525, 12);
}
}
return true;
@@ -186,16 +194,16 @@ void SceneScriptCT11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptCT11::PlayerWalkedIn() {
- if (Game_Flag_Query(91)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -358.0f, 9.68f, 32.0f, 0, 0, false, 0);
- Game_Flag_Reset(91);
- } else if (Game_Flag_Query(558)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 329.0f, 0.0f, 617.0f, 0, 0, false, 0);
- Game_Flag_Reset(558);
+ if (Game_Flag_Query(kFlagCT12toCT11)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -358.0f, 9.68f, 32.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagCT12toCT11);
+ } else if (Game_Flag_Query(kFlagDR01toCT11)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 329.0f, 0.0f, 617.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagDR01toCT11);
} else {
Player_Loses_Control();
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, true);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 125.0f, 9.68f, 74.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 125.0f, 9.68f, 74.0f, 0, false, false, 0);
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, false);
Player_Gains_Control();
Game_Flag_Reset(kFlagCT09toCT11);
diff --git a/engines/bladerunner/script/scene/ct12.cpp b/engines/bladerunner/script/scene/ct12.cpp
index fa722f740c..c90473d3d0 100644
--- a/engines/bladerunner/script/scene/ct12.cpp
+++ b/engines/bladerunner/script/scene/ct12.cpp
@@ -64,7 +64,7 @@ void SceneScriptCT12::InitializeScene() {
) {
Actor_Put_In_Set(kActorGaff, kSetCT01_CT12);
Actor_Set_At_XYZ(kActorGaff, -534.0f, -6.5f, 952.0f, 367);
- Game_Flag_Set(kFlagGaffSpinnerCT12);
+ Game_Flag_Set(kFlagCT12GaffSpinner);
}
if (Game_Flag_Query(kFlagCT01toCT12)
&& Game_Flag_Query(kFlagSpinnerAtCT01)
@@ -87,12 +87,12 @@ void SceneScriptCT12::InitializeScene() {
Scene_Loop_Set_Default(2);
Game_Flag_Reset(kFlagCT01toCT12);
} else if (Game_Flag_Query(kFlagCT05toCT12)
- && Game_Flag_Query(kFlagGaffSpinnerCT12)
+ && Game_Flag_Query(kFlagCT12GaffSpinner)
) {
Game_Flag_Reset(kFlagCT05toCT12);
Scene_Loop_Set_Default(4);
} else if ( Game_Flag_Query(kFlagCT05toCT12)
- && !Game_Flag_Query(kFlagGaffSpinnerCT12)
+ && !Game_Flag_Query(kFlagCT12GaffSpinner)
) {
Game_Flag_Reset(kFlagCT05toCT12);
Scene_Loop_Set_Default(2);
@@ -288,8 +288,8 @@ void SceneScriptCT12::PlayerWalkedIn() {
void SceneScriptCT12::PlayerWalkedOut() {
Game_Flag_Reset(kFlagGenericWalkerWaiting);
if (Game_Flag_Query(kFlagCT12ToUG09)) {
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Set(kFlagMcCoyAtUGxx);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Set(kFlagMcCoyInUnderground);
}
}
diff --git a/engines/bladerunner/script/scene/dr01.cpp b/engines/bladerunner/script/scene/dr01.cpp
index b2b308ce15..e1cdbb5027 100644
--- a/engines/bladerunner/script/scene/dr01.cpp
+++ b/engines/bladerunner/script/scene/dr01.cpp
@@ -24,54 +24,71 @@
namespace BladeRunner {
+enum kDR01Loops {
+ kDR01LoopInshotWithCrowd = 0,
+ kDR01LoopWithCrowd = 1,
+ kDR01LoopDoorAnimWithCrowd = 3,
+ kDR01LoopOutshotWithCrowd = 4,
+ kDR01LoopInshotNoCrowd = 5,
+ kDR01LoopNoCrowd = 6,
+ kDR01LoopDoorAnimNoCrowd = 8,
+ kDR01LoopOutshotNoCrowd = 9,
+ kDR01LoopNoCrowdNoSpinner = 10
+};
+
void SceneScriptDR01::InitializeScene() {
if (Game_Flag_Query(kFlagDR02toDR01)) {
- Setup_Scene_Information(-835.0f, -0.04f, -118.0f, 664);
+ Setup_Scene_Information( -835.0f, -0.04f, -118.0f, 664);
} else if (Game_Flag_Query(kFlagDR04toDR01)) {
- Setup_Scene_Information(-711.0f, -0.04f, 70.0f, 307);
- } else if (Game_Flag_Query(531)) {
+ Setup_Scene_Information( -711.0f, -0.04f, 70.0f, 307);
+ } else if (Game_Flag_Query(kFlagCT11toDR01)) {
Setup_Scene_Information(-1765.28f, -0.04f, -23.82f, 269);
} else {
- Setup_Scene_Information(-386.0f, -0.04f, -82.0f, 792);
+ Setup_Scene_Information( -386.0f, -0.04f, -82.0f, 792);
}
+
Scene_Exit_Add_2D_Exit(0, 240, 60, 450, 250, 0);
- Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3);
- if (Game_Flag_Query(kFlagSpinnerAtDR01) && Global_Variable_Query(kVariableChapter) < 4) {
+ Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3);
+ if (Game_Flag_Query(kFlagSpinnerAtDR01)
+ && Global_Variable_Query(kVariableChapter) < 4
+ ) {
Scene_Exit_Add_2D_Exit(2, 610, 0, 639, 479, 1);
}
if (Global_Variable_Query(kVariableChapter) >= 3) {
Scene_Exit_Add_2D_Exit(3, 0, 45, 142, 201, 0);
}
+
Ambient_Sounds_Remove_All_Non_Looping_Sounds(0);
- Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound( 54, 50, 0, 1);
Ambient_Sounds_Add_Looping_Sound(219, 12, 85, 1);
- Ambient_Sounds_Add_Looping_Sound(98, 14, 85, 1);
- Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
+ Ambient_Sounds_Add_Looping_Sound( 98, 14, 85, 1);
+ Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
- Ambient_Sounds_Add_Sound(67, 5, 80, 16, 25, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(66, 5, 80, 16, 25, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 67, 5, 80, 16, 25, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 66, 5, 80, 16, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(378, 5, 80, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(379, 5, 80, 50, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(380, 5, 80, 50, 100, -100, 100, -101, -101, 0, 0);
+
if (Game_Flag_Query(kFlagDR05BombExploded)
&& Game_Flag_Query(kFlagDR04toDR01)
) {
- Scene_Loop_Start_Special(0, 3, 0);
+ Scene_Loop_Start_Special(0, 3, false);
Scene_Loop_Set_Default(4);
} else if (!Game_Flag_Query(kFlagDR05BombExploded)
&& Game_Flag_Query(kFlagDR04toDR01)
) {
- Scene_Loop_Start_Special(0, 2, 0);
+ Scene_Loop_Start_Special(0, 2, false);
Scene_Loop_Set_Default(4);
} else if (Game_Flag_Query(kFlagDR02toDR01)) {
- Scene_Loop_Start_Special(0, 1, 0);
+ Scene_Loop_Start_Special(0, 1, false);
Scene_Loop_Set_Default(4);
- } else if (Game_Flag_Query(531)) {
+ } else if (Game_Flag_Query(kFlagCT11toDR01)) {
Scene_Loop_Set_Default(4);
} else {
- Scene_Loop_Start_Special(0, 0, 0);
+ Scene_Loop_Start_Special(0, 0, false);
Scene_Loop_Set_Default(4);
}
}
@@ -110,7 +127,7 @@ bool SceneScriptDR01::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptDR01::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -835.0f, -0.04f, -118.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -835.0f, -0.04f, -118.0f, 0, true, false, 0)) {
Async_Actor_Walk_To_XYZ(kActorMcCoy, -911.0f, -0.04f, -118.0f, 0, false);
Ambient_Sounds_Adjust_Looping_Sound(112, 10, -100, 1);
Game_Flag_Set(kFlagDR01toDR02);
@@ -118,83 +135,85 @@ bool SceneScriptDR01::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -711.0f, -0.04f, 70.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -711.0f, -0.04f, 70.0f, 0, true, false, 0)) {
Async_Actor_Walk_To_XYZ(kActorMcCoy, -796.0f, -0.04f, 166.0f, 0, false);
Game_Flag_Set(kFlagDR01toDR04);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR04);
}
return true;
}
+
if (exitId == 2) {
- if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, -372.0f, -0.04f, -82.0f, 0, 1, false, 0)) {
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
- Game_Flag_Reset(kFlagMcCoyAtARxx);
- Game_Flag_Reset(kFlagMcCoyAtTBxx);
- Game_Flag_Reset(kFlagMcCoyAtDRxx);
- Game_Flag_Reset(kFlagMcCoyAtBBxx);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -372.0f, -0.04f, -82.0f, 0, true, false, 0)) {
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
+ Game_Flag_Reset(kFlagMcCoyInAnimoidRow);
+ Game_Flag_Reset(kFlagMcCoyInTyrellBuilding);
+ Game_Flag_Reset(kFlagMcCoyInDNARow);
+ Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
int spinnerDest = Spinner_Interface_Choose_Dest(-1, false);
switch (spinnerDest) {
case kSpinnerDestinationPoliceStation:
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Reset(kFlagSpinnerAtDR01);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
break;
case kSpinnerDestinationMcCoysApartment:
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Game_Flag_Reset(kFlagSpinnerAtDR01);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
break;
case kSpinnerDestinationRuncitersAnimals:
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagSpinnerAtDR01);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
break;
case kSpinnerDestinationChinatown:
- Game_Flag_Set(kFlagMcCoyAtCTxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagSpinnerAtDR01);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
break;
case kSpinnerDestinationAnimoidRow:
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Game_Flag_Reset(kFlagSpinnerAtDR01);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
break;
case kSpinnerDestinationTyrellBuilding:
- Game_Flag_Set(kFlagMcCoyAtTBxx);
+ Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagSpinnerAtDR01);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
break;
case kSpinnerDestinationBradburyBuilding:
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Game_Flag_Reset(kFlagSpinnerAtDR01);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
break;
case kSpinnerDestinationNightclubRow:
- Game_Flag_Set(kFlagMcCoyAtNRxx);
+ Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Reset(kFlagSpinnerAtDR01);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
break;
case kSpinnerDestinationHysteriaHall:
- Game_Flag_Set(kFlagMcCoyAtHFxx);
+ Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtDR01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
break;
default:
Player_Loses_Control();
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -447.39f, 0.16f, -92.38f, 0, false, true, 0);
Player_Gains_Control();
break;
@@ -211,9 +230,9 @@ bool SceneScriptDR01::ClickedOnExit(int exitId) {
v7 = Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1236.4f, -0.04f, -13.91f, 0, 1, false, 0);
}
if (!v7) {
- Game_Flag_Set(558);
- Game_Flag_Set(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtDRxx);
+ Game_Flag_Set(kFlagDR01toCT11);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInDNARow);
Set_Enter(kSetCT11, kSceneCT11);
}
return true;
@@ -240,7 +259,7 @@ void SceneScriptDR01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptDR01::PlayerWalkedIn() {
- if (Game_Flag_Query(531)) {
+ if (Game_Flag_Query(kFlagCT11toDR01)) {
Async_Actor_Walk_To_XYZ(kActorMcCoy, -757.15f, -0.04f, 24.64f, 0, false);
} else if (!Game_Flag_Query(kFlagDR02toDR01)
&& !Game_Flag_Query(kFlagDR04toDR01)
@@ -251,13 +270,13 @@ void SceneScriptDR01::PlayerWalkedIn() {
}
Game_Flag_Reset(kFlagDR02toDR01);
Game_Flag_Reset(kFlagDR04toDR01);
- Game_Flag_Reset(531);
+ Game_Flag_Reset(kFlagCT11toDR01);
}
void SceneScriptDR01::PlayerWalkedOut() {
if (!Game_Flag_Query(kFlagDR01toDR04)
&& !Game_Flag_Query(kFlagDR01toDR02)
- && !Game_Flag_Query(558)
+ && !Game_Flag_Query(kFlagDR01toCT11)
) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
diff --git a/engines/bladerunner/script/scene/dr02.cpp b/engines/bladerunner/script/scene/dr02.cpp
index 45867c15e8..731ed16c70 100644
--- a/engines/bladerunner/script/scene/dr02.cpp
+++ b/engines/bladerunner/script/scene/dr02.cpp
@@ -26,19 +26,21 @@ namespace BladeRunner {
void SceneScriptDR02::InitializeScene() {
if (Game_Flag_Query(kFlagDR03toDR02)) {
- Setup_Scene_Information(-1162.0f, 7.18f, -322.0f, 552);
+ Setup_Scene_Information(-1162.0f, 7.18f, -322.0f, 552);
} else if (Game_Flag_Query(kFlagDR01toDR02)) {
- Setup_Scene_Information(-835.0f, -0.04f, -118.0f, 193);
+ Setup_Scene_Information( -835.0f, -0.04f, -118.0f, 193);
} else if (Game_Flag_Query(kFlagBB01toDR02)) {
- Setup_Scene_Information(-1258.0f, 7.18f, -314.0f, 400);
+ Setup_Scene_Information(-1258.0f, 7.18f, -314.0f, 400);
} else {
- Setup_Scene_Information(168.78f, 0.16f, -775.72f, 193);
+ Setup_Scene_Information( 168.78f, 0.16f, -775.72f, 193);
}
- Scene_Exit_Add_2D_Exit(0, 605, 0, 639, 479, 1);
+
+ Scene_Exit_Add_2D_Exit(0, 605, 0, 639, 479, 1);
Scene_Exit_Add_2D_Exit(1, 222, 176, 279, 314, 0);
- if (Game_Flag_Query(326)) {
+ if (Game_Flag_Query(kFlagBB01Available)) {
Scene_Exit_Add_2D_Exit(2, 95, 0, 148, 292, 0);
}
+
Ambient_Sounds_Remove_All_Non_Looping_Sounds(0);
Ambient_Sounds_Remove_All_Looping_Sounds(0);
Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1);
@@ -47,8 +49,9 @@ void SceneScriptDR02::InitializeScene() {
Ambient_Sounds_Add_Sound(378, 2, 50, 33, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(379, 2, 50, 33, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(380, 2, 50, 33, 100, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(67, 5, 100, 16, 25, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(66, 5, 100, 16, 25, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 67, 5, 100, 16, 25, -100, 100, -101, -101, 0, 0);
+
+ Ambient_Sounds_Add_Sound( 66, 5, 100, 16, 25, -100, 100, -101, -101, 0, 0);
if (Game_Flag_Query(kFlagDR01toDR02)) {
Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
Scene_Loop_Set_Default(1);
@@ -126,6 +129,7 @@ bool SceneScriptDR02::ClickedOnExit(int exitId) {
Ambient_Sounds_Adjust_Looping_Sound(98, 14, -101, 1);
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1162.0f, 7.18f, -322.0f, 0, true, false, 0)) {
if (Global_Variable_Query(kVariableChapter) > 2) {
@@ -137,11 +141,12 @@ bool SceneScriptDR02::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1258.0f, 7.18f, -314.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagDR02toBB01);
- Game_Flag_Reset(kFlagMcCoyAtDRxx);
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Reset(kFlagMcCoyInDNARow);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Set_Enter(kSetBB01, kSceneBB01);
}
return true;
diff --git a/engines/bladerunner/script/scene/dr03.cpp b/engines/bladerunner/script/scene/dr03.cpp
index f012c68ea5..008cf45840 100644
--- a/engines/bladerunner/script/scene/dr03.cpp
+++ b/engines/bladerunner/script/scene/dr03.cpp
@@ -29,8 +29,11 @@ void SceneScriptDR03::InitializeScene() {
Game_Flag_Reset(kFlagDR02toDR03);
Setup_Scene_Information(330.31f, 4.27f, -910.91f, 297);
}
+
Setup_Scene_Information(330.31f, 4.27f, -910.91f, 297);
+
Scene_Exit_Add_2D_Exit(0, 377, 122, 445, 266, 0);
+
if (Global_Variable_Query(kVariableChapter) == 3) {
Actor_Put_In_Set(kActorChew, kSetDR03);
Actor_Set_At_XYZ(kActorChew, 431.21f, 4.27f, -776.26f, 0);
@@ -38,10 +41,11 @@ void SceneScriptDR03::InitializeScene() {
Actor_Put_In_Set(kActorChew, kSetDR03);
Actor_Set_At_XYZ(kActorChew, 360.77f, 4.4f, -806.67f, 126);
}
+
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Ambient_Sounds_Add_Looping_Sound(110, 7, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(109, 50, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(95, 20, 70, 1);
+ Ambient_Sounds_Add_Looping_Sound(110, 7, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound(109, 50, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound( 95, 20, 70, 1);
}
void SceneScriptDR03::SceneLoaded() {
@@ -62,6 +66,7 @@ bool SceneScriptDR03::ClickedOnActor(int actorId) {
if (actorId == kActorChew) {
Actor_Face_Actor(kActorMcCoy, kActorChew, true);
Actor_Face_Actor(kActorChew, kActorMcCoy, true);
+
if (!Game_Flag_Query(kFlagDR03ChewTalk1)) {
Actor_Says(kActorMcCoy, 755, 18);
Actor_Says(kActorChew, 10, 14);
@@ -72,52 +77,62 @@ bool SceneScriptDR03::ClickedOnActor(int actorId) {
Game_Flag_Set(kFlagDR03ChewTalk1);
return true;
}
- if (Actor_Clue_Query(kActorMcCoy, kClueChewInterview)) {
- if (Game_Flag_Query(kFlagMorajiExploded)
- && Game_Flag_Query(kFlagDR03ChewTalk1)) {
- Actor_Says(kActorMcCoy, 815, 18);
- Actor_Says(kActorChew, 60, 14);
- Actor_Says(kActorChew, 70, 14);
- Actor_Says(kActorChew, 80, 14);
- Actor_Says(kActorMcCoy, 820, 18);
- Actor_Says(kActorChew, 90, 14);
- Actor_Says(kActorMcCoy, 825, 18);
- Actor_Says(kActorChew, 100, 14);
- Game_Flag_Reset(kFlagMorajiExploded);
- Game_Flag_Set(505);
- return true;
- }
- if ((Actor_Clue_Query(kActorMcCoy, kClueDNATyrell) || Actor_Clue_Query(kActorMcCoy, kClueAnsweringMachineMessage) || Actor_Clue_Query(kActorMcCoy, kClueEnvelope) || Actor_Clue_Query(kActorMcCoy, kClueChewInterview))
- && Game_Flag_Query(505)) {
- sub_401B18();
- } else {
- Actor_Says(kActorMcCoy, 810, 18);
- Actor_Says(kActorChew, 40, 14);
- Actor_Says(kActorChew, 50, 14);
+
+ if (!Actor_Clue_Query(kActorMcCoy, kClueChewInterview)) {
+ Actor_Says(kActorMcCoy, 770, 12);
+ Actor_Says(kActorChew, 110, 12);
+ Actor_Says(kActorChew, 120, 13);
+ Actor_Says(kActorMcCoy, 835, 13);
+ Actor_Says(kActorChew, 130, 14);
+ Actor_Says(kActorMcCoy, 840, 16);
+ Actor_Says(kActorChew, 140, 15);
+ if (!Game_Flag_Query(kFlagDR03ChewTalkExplosion)) {
+ Actor_Says(kActorChew, 150, 13);
+ Actor_Says(kActorMcCoy, 845, 17);
+ Actor_Says(kActorChew, 170, 18);
+ Actor_Says(kActorChew, 180, 16);
+ Actor_Says(kActorMcCoy, 850, 15);
+ Actor_Says(kActorChew, 190, 14);
+ Actor_Says(kActorChew, 200, 13);
+ Actor_Says(kActorMcCoy, 855, 18);
+ Actor_Says(kActorChew, 210, 12);
}
+ Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, true, kActorChew);
return true;
}
- Actor_Says(kActorMcCoy, 770, 12);
- Actor_Says(kActorChew, 110, 12);
- Actor_Says(kActorChew, 120, 13);
- Actor_Says(kActorMcCoy, 835, 13);
- Actor_Says(kActorChew, 130, 14);
- Actor_Says(kActorMcCoy, 840, 16);
- Actor_Says(kActorChew, 140, 15);
- if (!Game_Flag_Query(505)) {
- Actor_Says(kActorChew, 150, 13);
- Actor_Says(kActorMcCoy, 845, 17);
- Actor_Says(kActorChew, 170, 18);
- Actor_Says(kActorChew, 180, 16);
- Actor_Says(kActorMcCoy, 850, 15);
- Actor_Says(kActorChew, 190, 14);
- Actor_Says(kActorChew, 200, 13);
- Actor_Says(kActorMcCoy, 855, 18);
- Actor_Says(kActorChew, 210, 12);
+
+ if (Game_Flag_Query(kFlagDR05JustExploded)
+ && Game_Flag_Query(kFlagDR03ChewTalk1)
+ ) {
+ Actor_Says(kActorMcCoy, 815, 18);
+ Actor_Says(kActorChew, 60, 14);
+ Actor_Says(kActorChew, 70, 14);
+ Actor_Says(kActorChew, 80, 14);
+ Actor_Says(kActorMcCoy, 820, 18);
+ Actor_Says(kActorChew, 90, 14);
+ Actor_Says(kActorMcCoy, 825, 18);
+ Actor_Says(kActorChew, 100, 14);
+ Game_Flag_Reset(kFlagDR05JustExploded);
+ Game_Flag_Set(kFlagDR03ChewTalkExplosion);
+ return true;
+ }
+
+ if ((Actor_Clue_Query(kActorMcCoy, kClueDNATyrell)
+ || Actor_Clue_Query(kActorMcCoy, kClueAnsweringMachineMessage)
+ || Actor_Clue_Query(kActorMcCoy, kClueEnvelope)
+ || Actor_Clue_Query(kActorMcCoy, kClueChewInterview)
+ )
+ && Game_Flag_Query(kFlagDR03ChewTalkExplosion)
+ ) {
+ dialogueWithChew();
+ } else {
+ Actor_Says(kActorMcCoy, 810, 18);
+ Actor_Says(kActorChew, 40, 14);
+ Actor_Says(kActorChew, 50, 14);
}
- Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, true, kActorChew);
return true;
}
+
return false;
}
@@ -141,7 +156,21 @@ bool SceneScriptDR03::ClickedOn2DRegion(int region) {
}
void SceneScriptDR03::SceneFrameAdvanced(int frame) {
- if (frame == 1 || frame == 4 || frame == 8 || frame == 10 || frame == 19 || frame == 21 || frame == 22 || frame == 23 || frame == 30 || frame == 31 || frame == 32 || frame == 33 || frame == 46 || frame == 49) {
+ if (frame == 1
+ || frame == 4
+ || frame == 8
+ || frame == 10
+ || frame == 19
+ || frame == 21
+ || frame == 22
+ || frame == 23
+ || frame == 30
+ || frame == 31
+ || frame == 32
+ || frame == 33
+ || frame == 46
+ || frame == 49
+ ) {
if (Random_Query(0, 1)) {
Sound_Play(97, Random_Query(20, 33), 80, 80, 50);
} else {
@@ -174,31 +203,36 @@ void SceneScriptDR03::PlayerWalkedOut() {
void SceneScriptDR03::DialogueQueueFlushed(int a1) {
}
-void SceneScriptDR03::sub_401B18() {
+void SceneScriptDR03::dialogueWithChew() {
Dialogue_Menu_Clear_List();
- if (Actor_Clue_Query(kActorMcCoy, kClueChewInterview) || Actor_Clue_Query(kActorMcCoy, kClueAnsweringMachineMessage) || Actor_Clue_Query(kActorMcCoy, kClueMorajiInterview)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(650, 5, 5, 5);
+ if (Actor_Clue_Query(kActorMcCoy, kClueChewInterview)
+ || Actor_Clue_Query(kActorMcCoy, kClueAnsweringMachineMessage)
+ || Actor_Clue_Query(kActorMcCoy, kClueMorajiInterview)
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(650, 5, 5, 5); // TWINS
}
if (Actor_Clue_Query(kActorMcCoy, kClueChewInterview)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(660, 5, 5, 5);
+ DM_Add_To_List_Never_Repeat_Once_Selected(660, 5, 5, 5); // MORAJI
}
if (Actor_Clue_Query(kActorMcCoy, kClueTyrellInterview)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(670, 6, 5, 2);
+ DM_Add_To_List_Never_Repeat_Once_Selected(670, 6, 5, 2); // TYRELL
}
- if (Game_Flag_Query(505)) {
+ if (Game_Flag_Query(kFlagDR03ChewTalkExplosion)) {
if (Actor_Clue_Query(kActorMcCoy, kClueAnsweringMachineMessage)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(680, 8, 8, 8);
+ DM_Add_To_List_Never_Repeat_Once_Selected(680, 8, 8, 8); // SEBASTIAN
}
if (Actor_Clue_Query(kActorMcCoy, kClueEnvelope)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1270, 2, 5, 7);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1270, 2, 5, 7); // LANCE'S ENVELOPE
}
}
- Dialogue_Menu_Add_DONE_To_List(690);
+ Dialogue_Menu_Add_DONE_To_List(690); // DONE
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
+
switch (answer) {
- case 640:
+ case 640: // EISENDULLER
Actor_Says(kActorMcCoy, 770, 12);
Actor_Says(kActorChew, 110, 12);
Actor_Says(kActorChew, 120, 13);
@@ -206,7 +240,7 @@ void SceneScriptDR03::sub_401B18() {
Actor_Says(kActorChew, 130, 14);
Actor_Says(kActorMcCoy, 840, 16);
Actor_Says(kActorChew, 140, 15);
- if (!Game_Flag_Query(505)) {
+ if (!Game_Flag_Query(kFlagDR03ChewTalkExplosion)) {
Actor_Says(kActorChew, 150, 13);
Actor_Says(kActorMcCoy, 845, 17);
Actor_Says(kActorChew, 170, 18);
@@ -219,7 +253,8 @@ void SceneScriptDR03::sub_401B18() {
}
Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, true, kActorChew);
break;
- case 650:
+
+ case 650: // TWINS
Actor_Says(kActorMcCoy, 775, 11);
Actor_Says(kActorChew, 220, 14);
Actor_Says(kActorMcCoy, 860, 11);
@@ -228,9 +263,10 @@ void SceneScriptDR03::sub_401B18() {
Actor_Says(kActorChew, 240, 14);
Actor_Says(kActorChew, 250, 14);
break;
- case 660:
+
+ case 660: // MORAJI
Actor_Says(kActorMcCoy, 780, 13);
- if (Game_Flag_Query(505)) {
+ if (Game_Flag_Query(kFlagDR03ChewTalkExplosion)) {
Actor_Says(kActorChew, 260, 14);
Actor_Says(kActorChew, 270, 13);
Actor_Says(kActorChew, 280, 12);
@@ -240,34 +276,41 @@ void SceneScriptDR03::sub_401B18() {
Actor_Says(kActorChew, 280, 12);
Actor_Says(kActorMcCoy, 870, 18);
Actor_Says(kActorChew, 290, 15);
- if (!Game_Flag_Query(kFlagMorajiExploded)) {
+ if (!Game_Flag_Query(kFlagDR05JustExploded)) {
Actor_Says(kActorChew, 300, 12);
}
}
Actor_Clue_Acquire(kActorMcCoy, kClueChewInterview, true, kActorChew);
break;
- case 670:
+
+ case 670: // TYRELL
Actor_Says(kActorMcCoy, 765, 12);
Actor_Says(kActorMcCoy, 790, 13);
Actor_Says(kActorChew, 310, 12);
Actor_Says(kActorChew, 320, 3);
break;
- case 680:
+
+ case 680: // SEBASTIAN
Actor_Says(kActorMcCoy, 795, 3);
- if (Game_Flag_Query(505) == 1) {
+ if (Game_Flag_Query(kFlagDR03ChewTalkExplosion)) {
Actor_Says(kActorChew, 330, 12);
Actor_Says(kActorChew, 340, 15);
Actor_Says(kActorMcCoy, 875, 16);
Actor_Says(kActorChew, 350, 12);
Actor_Says(kActorChew, 360, 15);
- Game_Flag_Set(326);
+ Game_Flag_Set(kFlagBB01Available);
} else {
Actor_Says(kActorChew, 320, 13);
Actor_Says(kActorChew, 150, 14);
- Game_Flag_Set(326);
+ Game_Flag_Set(kFlagBB01Available);
}
break;
- case 1270:
+
+ case 690: // DONE
+ Actor_Says(kActorMcCoy, 805, 3);
+ break;
+
+ case 1270: // LANCE'S ENVELOPE
Actor_Says(kActorMcCoy, 800, 16);
Actor_Says(kActorChew, 370, 3);
Actor_Says(kActorMcCoy, 880, 15);
@@ -280,9 +323,6 @@ void SceneScriptDR03::sub_401B18() {
Actor_Says(kActorChew, 420, 13);
Actor_Says(kActorChew, 430, 12);
break;
- case 690:
- Actor_Says(kActorMcCoy, 805, 3);
- break;
}
}
diff --git a/engines/bladerunner/script/scene/dr04.cpp b/engines/bladerunner/script/scene/dr04.cpp
index 0f3addc3b7..3b033d0c9f 100644
--- a/engines/bladerunner/script/scene/dr04.cpp
+++ b/engines/bladerunner/script/scene/dr04.cpp
@@ -24,44 +24,55 @@
namespace BladeRunner {
+enum kDR04Loops {
+ kDR04LoopPanFromDR01PostExplosion = 0,
+ kDR04LoopMainPostExplosion = 1,
+ kDR04LoopPanFromDR01PreExplosion = 3,
+ kDR04LoopMainPreExplosion = 4,
+ kDR04LoopDR04Explosion = 6
+};
+
void SceneScriptDR04::InitializeScene() {
- if (Game_Flag_Query(kFlagDR05BombExplosionView)) {
- Setup_Scene_Information(0.0f, 0.0f, 0.0f, 0);
+ if (Game_Flag_Query(kFlagDR05ViewExplosion)) {
+ Setup_Scene_Information( 0.0f, 0.0f, 0.0f, 0);
} else if (Game_Flag_Query(kFlagDR01toDR04)) {
- Setup_Scene_Information(-711.0f, -0.04f, 70.0f, 472);
+ Setup_Scene_Information( -711.0f, -0.04f, 70.0f, 472);
} else if (Game_Flag_Query(kFlagDR05toDR04)) {
- Setup_Scene_Information(-1067.0f, 7.18f, 421.0f, 125);
+ Setup_Scene_Information(-1067.0f, 7.18f, 421.0f, 125);
} else if (Game_Flag_Query(kFlagDR06toDR04)) {
Setup_Scene_Information(-897.75f, 134.45f, 569.75f, 512);
} else {
- Setup_Scene_Information(-810.0f, -0.04f, 242.0f, 125);
+ Setup_Scene_Information( -810.0f, -0.04f, 242.0f, 125);
}
- Scene_Exit_Add_2D_Exit(0, 589, 0, 639, 479, 1);
+
+ Scene_Exit_Add_2D_Exit(0, 589, 0, 639, 479, 1);
Scene_Exit_Add_2D_Exit(1, 443, 264, 488, 353, 0);
Scene_Exit_Add_2D_Exit(2, 222, 110, 269, 207, 0);
+
Ambient_Sounds_Remove_All_Non_Looping_Sounds(0);
- Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1);
- Ambient_Sounds_Add_Looping_Sound(288, 55, -100, 1);
+ Ambient_Sounds_Add_Looping_Sound( 54, 50, 1, 1);
+ Ambient_Sounds_Add_Looping_Sound(288, 55, -100, 1);
Ambient_Sounds_Add_Looping_Sound(217, 28, -100, 100);
- Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
+ Ambient_Sounds_Add_Speech_Sound(60, 0, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1);
- Ambient_Sounds_Add_Sound(67, 40, 180, 16, 25, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(66, 40, 180, 16, 25, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(378, 5, 80, 50, 100, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(379, 5, 80, 50, 100, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(380, 5, 80, 50, 100, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 67, 40, 180, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 66, 40, 180, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(378, 5, 80, 50, 100, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(379, 5, 80, 50, 100, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(380, 5, 80, 50, 100, 0, 0, -101, -101, 0, 0);
+
if (Game_Flag_Query(kFlagDR05BombExploded)) {
- Scene_Loop_Set_Default(1);
+ Scene_Loop_Set_Default(kDR04LoopMainPostExplosion);
} else {
- Scene_Loop_Set_Default(4);
+ Scene_Loop_Set_Default(kDR04LoopMainPreExplosion);
}
if (Game_Flag_Query(kFlagDR01toDR04)) {
if (Game_Flag_Query(kFlagDR05BombExploded)) {
- Scene_Loop_Start_Special(0, 0, 0);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kDR04LoopPanFromDR01PostExplosion, false);
} else {
- Scene_Loop_Start_Special(0, 3, 0);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kDR04LoopPanFromDR01PreExplosion, false);
}
}
}
@@ -95,26 +106,26 @@ bool SceneScriptDR04::ClickedOnActor(int actorId) {
if ( actorId == kActorMoraji
&& !Player_Query_Combat_Mode()
) {
- if (Actor_Query_Goal_Number(kActorMoraji) == 21) {
+ if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiLayDown) {
if (!Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 109, 0, true, true)) {
Actor_Face_Actor(kActorMcCoy, kActorMoraji, true);
Actor_Says(kActorMcCoy, 945, 13);
- Actor_Says(kActorMoraji, 0, 3);
- Actor_Says(kActorMoraji, 10, 3);
+ Actor_Says(kActorMoraji, 0, kAnimationModeTalk);
+ Actor_Says(kActorMoraji, 10, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 950, 13);
- Actor_Says(kActorMoraji, 20, 3);
- Actor_Says(kActorMoraji, 30, 3);
+ Actor_Says(kActorMoraji, 20, kAnimationModeTalk);
+ Actor_Says(kActorMoraji, 30, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 955, 13);
- Actor_Says_With_Pause(kActorMoraji, 40, 0.0f, 3);
- Actor_Says(kActorMoraji, 50, 3);
+ Actor_Says_With_Pause(kActorMoraji, 40, 0.0f, kAnimationModeTalk);
+ Actor_Says(kActorMoraji, 50, kAnimationModeTalk);
Actor_Clue_Acquire(kActorMcCoy, kClueMorajiInterview, true, kActorMoraji);
- Actor_Set_Goal_Number(kActorMoraji, 22);
+ Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiDie);
Actor_Set_Goal_Number(kActorOfficerGrayford, 101);
return true;
}
}
- if (Actor_Query_Goal_Number(kActorMoraji) == 23) {
+ if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiDead) {
if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorMoraji, 36, true, false)) {
Actor_Set_Goal_Number(kActorOfficerGrayford, 106);
return true;
@@ -129,37 +140,40 @@ bool SceneScriptDR04::ClickedOnItem(int itemId, bool a2) {
}
bool SceneScriptDR04::ClickedOnExit(int exitId) {
- if (Actor_Query_Goal_Number(kActorMoraji) == 21) {
+ if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiLayDown) {
Actor_Force_Stop_Walking(kActorMcCoy);
- Actor_Set_Goal_Number(kActorMoraji, 22);
+ Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiDie);
Actor_Set_Goal_Number(kActorOfficerGrayford, 101);
return true;
}
+
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -761.0f, -0.04f, 97.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -761.0f, -0.04f, 97.0f, 0, true, false, 0)) {
Async_Actor_Walk_To_XYZ(kActorMcCoy, -683.0f, -0.04f, 43.0f, 0, false);
Game_Flag_Set(kFlagDR04toDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1067.0f, 7.18f, 421.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1067.0f, 7.18f, 421.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagNotUsed232);
Game_Flag_Set(kFlagDR04toDR05);
Set_Enter(kSetDR05, kSceneDR05);
}
return true;
}
+
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -851.0f, 6.98f, 560.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -851.0f, 6.98f, 560.0f, 0, true, false, 0)) {
Footstep_Sound_Override_On(3);
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, true);
Actor_Face_Heading(kActorMcCoy, 512, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 1, kAnimationModeIdle);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -899.0f, 71.64f, 647.0f, 0, 0, false, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 7, true, kAnimationModeIdle);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -899.0f, 71.64f, 647.0f, 0, false, false, 0);
Actor_Face_Heading(kActorMcCoy, 0, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 1, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 7, true, kAnimationModeIdle);
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, false);
Footstep_Sound_Override_Off();
Game_Flag_Set(kFlagDR04toDR06);
@@ -174,58 +188,61 @@ bool SceneScriptDR04::ClickedOn2DRegion(int region) {
return false;
}
-bool SceneScriptDR04::sub_401160() {
+bool SceneScriptDR04::farEnoughFromExplosion() {
float x, y, z;
Actor_Query_XYZ(kActorMcCoy, &x, &y, &z);
return (x + 1089.94f) * (x + 1089.94f) + (z - 443.49f) * (z - 443.49f) >= (360.0f * 360.0f);
}
void SceneScriptDR04::SceneFrameAdvanced(int frame) {
- if (Game_Flag_Query(kFlagDR05BombExplosionView)) {
- Game_Flag_Reset(kFlagDR05BombExplosionView);
+ if (Game_Flag_Query(kFlagDR05ViewExplosion)) {
+ Game_Flag_Reset(kFlagDR05ViewExplosion);
Game_Flag_Reset(kFlagDR05BombWillExplode);
- Scene_Loop_Set_Default(1);
- Scene_Loop_Start_Special(kSceneLoopModeOnce, 6, true);
+ Scene_Loop_Set_Default(kDR04LoopMainPostExplosion);
+ Scene_Loop_Start_Special(kSceneLoopModeOnce, kDR04LoopDR04Explosion, true);
Music_Stop(4);
- Actor_Set_Goal_Number(kActorMoraji, 99);
+ Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiPerished);
} else {
if (Game_Flag_Query(kFlagDR05BombWillExplode)) {
Game_Flag_Reset(kFlagDR05BombWillExplode);
Game_Flag_Set(kFlagDR05BombExploded);
- Scene_Loop_Set_Default(1);
- Scene_Loop_Start_Special(kSceneLoopModeOnce, 6, true);
- Item_Remove_From_World(78);
+ Scene_Loop_Set_Default(kDR04LoopMainPostExplosion);
+ Scene_Loop_Start_Special(kSceneLoopModeOnce, kDR04LoopDR04Explosion, true);
+ Item_Remove_From_World(kItemBomb);
}
+
switch (frame) {
case 193:
Sound_Play(301, 100, 0, 100, 50);
- Actor_Set_Goal_Number(kActorMoraji, 30);
+ Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiChooseFate);
Player_Loses_Control();
Actor_Force_Stop_Walking(kActorMcCoy);
- if (sub_401160()) {
+ if (farEnoughFromExplosion()) {
if (Player_Query_Combat_Mode()) {
- Actor_Change_Animation_Mode(kActorMcCoy, 22);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatHit);
} else {
- Actor_Change_Animation_Mode(kActorMcCoy, 21);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeHit);
}
} else {
Sound_Play_Speech_Line(kActorMcCoy, 9905, 100, 0, 99);
- Actor_Change_Animation_Mode(kActorMcCoy, 48);
- Actor_Retired_Here(kActorMcCoy, 6, 6, 1, -1);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
+ Actor_Retired_Here(kActorMcCoy, 6, 6, true, -1);
}
Player_Gains_Control();
break;
+
case 235:
- if (Actor_Query_Goal_Number(kActorMoraji) != 20
- && Actor_Query_Goal_Number(kActorMoraji) != 21
- && Actor_Query_Goal_Number(kActorMoraji) != 99
+ if (Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiJump
+ && Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiLayDown
+ && Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiPerished
) {
Actor_Set_Goal_Number(kActorOfficerGrayford, 101);
}
Scene_Exits_Enable();
break;
+
case 237:
- Overlay_Play("DR04OVER", 0, 1, 1, 0);
+ Overlay_Play("DR04OVER", 0, true, true, 0);
break;
}
}
@@ -235,7 +252,7 @@ void SceneScriptDR04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptDR04::PlayerWalkedIn() {
- if (Game_Flag_Query(kFlagDR05BombExplosionView)) {
+ if (Game_Flag_Query(kFlagDR05ViewExplosion)) {
Player_Loses_Control();
Delay(4000);
Actor_Retired_Here(kActorMcCoy, 6, 6, 1, -1);
@@ -250,11 +267,11 @@ void SceneScriptDR04::PlayerWalkedIn() {
Footstep_Sound_Override_On(3);
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, true);
Actor_Face_Heading(kActorMcCoy, 512, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 0, kAnimationModeIdle);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -851.0f, 71.64f, 647.0f, 0, 0, false, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 7, false, kAnimationModeIdle);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -851.0f, 71.64f, 647.0f, 0, false, false, 0);
Actor_Face_Heading(kActorMcCoy, 0, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 7, 0, kAnimationModeIdle);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -774.85f, 7.18f, 386.67f, 0, 0, false, 0);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 7, false, kAnimationModeIdle);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -774.85f, 7.18f, 386.67f, 0, false, false, 0);
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, false);
Footstep_Sound_Override_Off();
}
diff --git a/engines/bladerunner/script/scene/dr05.cpp b/engines/bladerunner/script/scene/dr05.cpp
index 0204cf5b26..9f00bc2c66 100644
--- a/engines/bladerunner/script/scene/dr05.cpp
+++ b/engines/bladerunner/script/scene/dr05.cpp
@@ -24,18 +24,27 @@
namespace BladeRunner {
+enum kDR05Loops {
+ kDR05LoopMain = 0,
+ kDR05LoopMainDestroyed = 2
+};
+
void SceneScriptDR05::InitializeScene() {
Setup_Scene_Information(-22.0f, 0.3f, 221.0f, 0);
+
Game_Flag_Reset(kFlagDR04toDR05);
+
Scene_Exit_Add_2D_Exit(0, 0, 38, 80, 467, 3);
+
Ambient_Sounds_Add_Looping_Sound(383, 25, 0, 1);
+
if (!Game_Flag_Query(kFlagDR05BombExploded)) {
- Overlay_Play("DR05OVER", 0, 1, 0, 0);
+ Overlay_Play("DR05OVER", 0, true, false, 0);
}
if (Game_Flag_Query(kFlagDR05BombExploded)) {
- Scene_Loop_Set_Default(2);
+ Scene_Loop_Set_Default(kDR05LoopMainDestroyed);
} else {
- Scene_Loop_Set_Default(0);
+ Scene_Loop_Set_Default(kDR05LoopMain);
}
}
@@ -44,10 +53,11 @@ void SceneScriptDR05::SceneLoaded() {
Unobstacle_Object("BOX06", true);
Unobstacle_Object("BOX183", true);
Clickable_Object("T2 DOORWAY");
+
if (!Game_Flag_Query(kFlagDR05BombExploded)) {
- Item_Add_To_World(78, 932, 35, -1.57f, 31.33f, 75.21f, 540, 16, 16, true, true, false, true);
- if (Actor_Query_Goal_Number(kActorMoraji) == 0) {
- Item_Add_To_World(122, 931, 35, 37.35f, 1.59f, 46.72f, 0, 20, 20, true, true, false, true);
+ Item_Add_To_World(kItemBomb, 932, kSetDR05, -1.57f, 31.33f, 75.21f, 540, 16, 16, true, true, false, true);
+ if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiDefault) {
+ Item_Add_To_World(kItemChain, 931, kSetDR05, 37.35f, 1.59f, 46.72f, 0, 20, 20, true, true, false, true);
}
}
}
@@ -58,19 +68,20 @@ bool SceneScriptDR05::MouseClick(int x, int y) {
bool SceneScriptDR05::ClickedOn3DObject(const char *objectName, bool a2) {
if (Object_Query_Click("T2 DOORWAY", objectName)) {
- if (Game_Flag_Query(kFlagNotUsed276)
- || Actor_Query_Goal_Number(kActorMoraji) != 0
+ if (!Game_Flag_Query(kFlagNotUsed276)
+ && Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiDefault
) {
+ Actor_Face_Object(kActorMcCoy, "T2 DOORWAY", true);
+ Actor_Says(kActorMcCoy, 1020, 14);
+ Actor_Says(kActorMoraji, 90, 13);
+ } else {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 57.61f, 0.3f, 69.27f, 0, true, false, 0)) {
Actor_Face_Object(kActorMcCoy, "T2 DOORWAY", true);
Actor_Says(kActorMcCoy, 8522, 13);
Actor_Says(kActorMcCoy, 8521, 14);
}
- } else {
- Actor_Face_Object(kActorMcCoy, "T2 DOORWAY", true);
- Actor_Says(kActorMcCoy, 1020, 14);
- Actor_Says(kActorMoraji, 90, 13);
}
+
return true;
}
return false;
@@ -81,30 +92,31 @@ bool SceneScriptDR05::ClickedOnActor(int actorId) {
}
bool SceneScriptDR05::ClickedOnItem(int itemId, bool a2) {
- if (itemId == 78) {
+ if (itemId == kItemBomb) {
if (Player_Query_Combat_Mode()) {
Game_Flag_Set(kFlagDR05BombWillExplode);
- Actor_Set_Goal_Number(kActorMoraji, 30);
+ Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiChooseFate);
} else if (!Game_Flag_Query(kFlagDR05BombExploded)
- && !Loop_Actor_Walk_To_Item(kActorMcCoy, 78, 24, 1, true)
- && Actor_Query_Goal_Number(kActorMoraji) != 11
+ && !Loop_Actor_Walk_To_Item(kActorMcCoy, kItemBomb, 24, true, true)
+ && Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiRunOut
) {
if (!Actor_Query_Goal_Number(kActorMoraji)) {
Actor_Says_With_Pause(kActorMcCoy, 1015, 0.1f, 12);
Actor_Says(kActorMoraji, 70, 13);
}
- Actor_Set_Goal_Number(kActorMoraji, 30);
+ Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiChooseFate);
}
//return true; //bug?
}
- if (itemId == 122
+
+ if (itemId == kItemChain
&& Player_Query_Combat_Mode()
- && Actor_Query_Goal_Number(kActorMoraji) == 0
+ && Actor_Query_Goal_Number(kActorMoraji) == kGoalOfficerLearyDefault
) {
- Overlay_Play("DR05OVER", 1, 0, 1, 0);
- Item_Remove_From_World(122);
+ Overlay_Play("DR05OVER", 1, false, true, 0);
+ Item_Remove_From_World(kItemChain);
Game_Flag_Set(kFlagDR05ChainShot);
- Actor_Set_Goal_Number(kActorMoraji, 10);
+ Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiFreed);
Music_Play(18, 71, 0, 0, -1, 0, 2);
return true;
}
@@ -131,11 +143,12 @@ void SceneScriptDR05::SceneFrameAdvanced(int frame) {
if (frame == 49) {
Sound_Play(148, Random_Query(50, 50), 80, 80, 50);
}
+
if (Game_Flag_Query(kFlagDR05BombWillExplode)) {
- Item_Remove_From_World(78);
+ Item_Remove_From_World(kItemBomb);
Game_Flag_Reset(kFlagDR05BombWillExplode);
Game_Flag_Set(kFlagDR05BombExploded);
- Actor_Set_Goal_Number(kActorMoraji, 30);
+ Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiChooseFate);
}
}
@@ -147,11 +160,11 @@ void SceneScriptDR05::PlayerWalkedIn() {
&& !Game_Flag_Query(kFlagDR05ChainShot)
&& Game_Flag_Query(kFlagDR05BombExploded)
) {
- Item_Remove_From_World(122);
+ Item_Remove_From_World(kItemChain);
}
if (Game_Flag_Query(kFlagDR05BombExploded)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, 0.3f, 133.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, 0.3f, 133.0f, 0, false, false, 0);
if (!Game_Flag_Query(kFlagDR05ExplodedEntered)) {
Game_Flag_Set(kFlagDR05ExplodedEntered);
if (Game_Flag_Query(kFlagSadikIsReplicant)) {
@@ -170,18 +183,18 @@ void SceneScriptDR05::PlayerWalkedIn() {
}
}
} else {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, 0.3f, 133.0f, 0, 0, true, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, 0.3f, 133.0f, 0, false, true, 0);
}
if (!Game_Flag_Query(kFlagDR05MorajiTalk)
- && !Actor_Query_Goal_Number(kActorMoraji)
+ && Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiDefault
) {
Actor_Face_Actor(kActorMcCoy, kActorMoraji, true);
Actor_Says(kActorMcCoy, 1010, 13);
- Actor_Face_Item(kActorMcCoy, 78, true);
+ Actor_Face_Item(kActorMcCoy, kItemBomb, true);
Player_Set_Combat_Mode(true);
Actor_Says(kActorMoraji, 60, 12);
- Actor_Change_Animation_Mode(kActorMcCoy, 0);
+ Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
Game_Flag_Set(kFlagDR05MorajiTalk);
//return true;
}
@@ -191,8 +204,12 @@ void SceneScriptDR05::PlayerWalkedIn() {
void SceneScriptDR05::PlayerWalkedOut() {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- if (Actor_Query_Goal_Number(kActorMoraji) == 10 || Actor_Query_Goal_Number(kActorMoraji) == 18 || Actor_Query_Goal_Number(kActorMoraji) == 19) {
- Actor_Set_Goal_Number(kActorMoraji, 11);
+
+ if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiFreed
+ || Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiGetUp
+ || Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiScream
+ ) {
+ Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiRunOut);
//return true;
}
//return false;
diff --git a/engines/bladerunner/script/scene/dr06.cpp b/engines/bladerunner/script/scene/dr06.cpp
index c28ec2db4f..441d7bdf4a 100644
--- a/engines/bladerunner/script/scene/dr06.cpp
+++ b/engines/bladerunner/script/scene/dr06.cpp
@@ -26,27 +26,30 @@ namespace BladeRunner {
void SceneScriptDR06::InitializeScene() {
if (Game_Flag_Query(kFlagDR04toDR06)) {
- Setup_Scene_Information(-733.57f, 136.6f, -968.64f, 0);
+ Setup_Scene_Information(-733.57f, 136.6f, -968.64f, 0);
} else {
Setup_Scene_Information(-707.57f, 136.6f, -1132.64f, 472);
}
+
Scene_Exit_Add_2D_Exit(0, 601, 11, 639, 479, 1);
if (Global_Variable_Query(kVariableChapter) > 3
&& Game_Flag_Query(715)
) {
Scene_Exit_Add_2D_Exit(1, 0, 272, 46, 477, 2);
}
+
Ambient_Sounds_Add_Looping_Sound(383, 25, 0, 1);
Ambient_Sounds_Add_Sound(73, 5, 60, 20, 20, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(74, 5, 60, 20, 20, -100, 100, -101, -101, 0, 0);
+
if (Game_Flag_Query(kFlagDR06JesterActive)) {
- Overlay_Play("DR06over", 1, 1, 0, 0);
+ Overlay_Play("DR06over", 1, true, false, 0);
Ambient_Sounds_Add_Looping_Sound(300, 47, -75, 0);
} else {
- Overlay_Play("DR06over", 0, 1, 0, 0);
+ Overlay_Play("DR06over", 0, true, false, 0);
}
- if (Game_Flag_Query(548)) {
- Overlay_Play("DR06ovr2", 0, 1, 0, 0);
+ if (Game_Flag_Query(kFlagDR06MannequinHeadOpen)) {
+ Overlay_Play("DR06ovr2", 0, true, false, 0);
}
}
@@ -72,11 +75,11 @@ bool SceneScriptDR06::ClickedOn3DObject(const char *objectName, bool a2) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -743.0f, 136.6f, -1091.0f, 0, true, false, 0);
Actor_Face_Object(kActorMcCoy, "BOX16", true);
if (!Game_Flag_Query(kFlagDR06JesterActive)) {
- Overlay_Play("DR06over", 1, 1, 1, 0);
+ Overlay_Play("DR06over", 1, true, true, 0);
Ambient_Sounds_Add_Looping_Sound(300, 47, -75, 0);
Game_Flag_Set(kFlagDR06JesterActive);
} else {
- Overlay_Play("DR06over", 0, 1, 1, 0);
+ Overlay_Play("DR06over", 0, true, true, 0);
Ambient_Sounds_Remove_Looping_Sound(300, false);
Game_Flag_Reset(kFlagDR06JesterActive);
}
@@ -144,13 +147,13 @@ bool SceneScriptDR06::ClickedOn3DObject(const char *objectName, bool a2) {
if (Object_Query_Click("X2_TORSO04HIRES", objectName)) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -700.0f, 136.6f, -1133.0f, 4, true, false, 0)) {
Actor_Face_Object(kActorMcCoy, "x2_TORSO04HIRES", true);
- if (Global_Variable_Query(39) > 12) {
+ if (Global_Variable_Query(kVariableDR06MannequinHeadOpened) > 12) {
return true;
}
- if (!Game_Flag_Query(548)) {
+ if (!Game_Flag_Query(kFlagDR06MannequinHeadOpen)) {
Overlay_Play("DR06ovr2", 0, 1, 0, 0);
- Game_Flag_Set(548);
+ Game_Flag_Set(kFlagDR06MannequinHeadOpen);
Sound_Play(160, 100, 0, 0, 50);
if (!Actor_Clue_Query(kActorMcCoy, kClueEnvelope)) {
Actor_Voice_Over(850, kActorVoiceOver);
@@ -160,17 +163,17 @@ bool SceneScriptDR06::ClickedOn3DObject(const char *objectName, bool a2) {
Actor_Voice_Over(880, kActorVoiceOver);
Actor_Clue_Acquire(kActorMcCoy, kClueEnvelope, true, kActorLance);
if (Query_Difficulty_Level() != 0) {
- Global_Variable_Increment(2, 200);
+ Global_Variable_Increment(kVariableChinyen, 200);
}
}
} else {
Overlay_Remove("DR06ovr2");
- Game_Flag_Reset(548);
+ Game_Flag_Reset(kFlagDR06MannequinHeadOpen);
Sound_Play(161, 100, 0, 0, 50);
}
- Global_Variable_Increment(39, 1);
- if (Global_Variable_Query(39) > 12) {
+ Global_Variable_Increment(kVariableDR06MannequinHeadOpened, 1);
+ if (Global_Variable_Query(kVariableDR06MannequinHeadOpened) > 12) {
Sound_Play(204, 100, 0, 0, 50);
Unclickable_Object("X2_TORSO04HIRES");
}
diff --git a/engines/bladerunner/script/scene/hc01.cpp b/engines/bladerunner/script/scene/hc01.cpp
index 8318130397..19345ebb39 100644
--- a/engines/bladerunner/script/scene/hc01.cpp
+++ b/engines/bladerunner/script/scene/hc01.cpp
@@ -99,8 +99,8 @@ bool SceneScriptHC01::ClickedOnActor(int actorId) {
)
) {
AI_Movement_Track_Pause(kActorIzo);
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 624.43f, 0.14f, 83.0f, 0, 1, false, 0)) {
- if (!Game_Flag_Query(kFlagIzoTalk1)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 624.43f, 0.14f, 83.0f, 0, true, false, 0)) {
+ if (!Game_Flag_Query(kFlagHC01IzoTalk1)) {
Actor_Face_Actor(kActorIzo, kActorMcCoy, true);
Actor_Says_With_Pause(kActorIzo, 10, 0.2f, 13);
Actor_Face_Actor(kActorMcCoy, kActorIzo, true);
@@ -114,7 +114,7 @@ bool SceneScriptHC01::ClickedOnActor(int actorId) {
Actor_Says_With_Pause(kActorIzo, 70, 1.0f, 13);
Actor_Says_With_Pause(kActorMcCoy, 1045, 0.6f, 14);
Actor_Says(kActorIzo, 80, 18);
- Game_Flag_Set(kFlagIzoTalk1);
+ Game_Flag_Set(kFlagHC01IzoTalk1);
} else {
Actor_Face_Actor(kActorMcCoy, kActorIzo, true);
Actor_Face_Actor(kActorIzo, kActorMcCoy, true);
@@ -134,7 +134,7 @@ bool SceneScriptHC01::ClickedOnItem(int itemId, bool a2) {
Item_Pickup_Spin_Effect(984, 377, 397);
Delay(1500);
Item_Pickup_Spin_Effect(984, 330, 384);
- if (Game_Flag_Query(374)) {
+ if (Game_Flag_Query(kFlagAR02DektoraBoughtScorpions)) {
Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy1, true, kActorIzo);
} else {
Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy2, true, kActorIzo);
@@ -151,8 +151,8 @@ bool SceneScriptHC01::ClickedOnExit(int exitId) {
Music_Adjust(12, 0, 2);
Game_Flag_Set(kFlagHC01toAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
- Game_Flag_Reset(kFlagMcCoyAtHCxx);
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Reset(kFlagMcCoyInHawkersCircle);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
}
return true;
}
@@ -197,7 +197,7 @@ void SceneScriptHC01::SceneFrameAdvanced(int frame) {
}
if (frame == 80) {
Ambient_Sounds_Play_Sound(316, 40, 100, 100, 0);
- Item_Add_To_World(kItemHC03Lock, 931, kSetHC01_HC02_HC03_HC04, 582.0f, 27.0f, -41.0f, 0, 8, 8, true, true, false, true);
+ Item_Add_To_World(kItemGreenPawnLock, 931, kSetHC01_HC02_HC03_HC04, 582.0f, 27.0f, -41.0f, 0, 8, 8, true, true, false, true);
}
}
@@ -227,12 +227,12 @@ void SceneScriptHC01::DialogueQueueFlushed(int a1) {
}
void SceneScriptHC01::dialogueWithIzo() {
- if (!Game_Flag_Query(kFlagIzoTalk2)) {
+ if (!Game_Flag_Query(kFlagHC01IzoTalk2)) {
Actor_Says(kActorMcCoy, 1055, 13);
Actor_Says(kActorIzo, 130, 13);
Actor_Says_With_Pause(kActorMcCoy, 1060, 0.2f, 13);
Actor_Says(kActorIzo, 140, 13);
- Game_Flag_Set(kFlagIzoTalk2);
+ Game_Flag_Set(kFlagHC01IzoTalk2);
}
Dialogue_Menu_Clear_List();
diff --git a/engines/bladerunner/script/scene/hc02.cpp b/engines/bladerunner/script/scene/hc02.cpp
index 76cf09c6e0..fa64162076 100644
--- a/engines/bladerunner/script/scene/hc02.cpp
+++ b/engines/bladerunner/script/scene/hc02.cpp
@@ -89,7 +89,7 @@ bool SceneScriptHC02::ClickedOnActor(int actorId) {
if (actorId == kActorHawkersBarkeep) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -150.51f, 0.14f, 62.74f, 0, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorHawkersBarkeep, true);
- if (!Game_Flag_Query(kFlagHawkersBarkeepIntroduction)) {
+ if (!Game_Flag_Query(kFlagHC02HawkersBarkeepIntroduction)) {
Actor_Says(kActorMcCoy, 1225, 13);
Actor_Says_With_Pause(kActorHawkersBarkeep, 0, 0.0f, 13);
Actor_Says(kActorHawkersBarkeep, 10, 16);
@@ -99,7 +99,7 @@ bool SceneScriptHC02::ClickedOnActor(int actorId) {
Actor_Change_Animation_Mode(kActorMcCoy, 75);
Delay(1500);
Global_Variable_Increment(kVariableMcCoyDrinks, 1);
- Game_Flag_Set(kFlagHawkersBarkeepIntroduction);
+ Game_Flag_Set(kFlagHC02HawkersBarkeepIntroduction);
} else if ( Actor_Clue_Query(kActorMcCoy, kClueChinaBarSecurityCamera)
&& !Actor_Clue_Query(kActorMcCoy, kClueChinaBarSecurityDisc)
) {
@@ -110,8 +110,8 @@ bool SceneScriptHC02::ClickedOnActor(int actorId) {
Item_Pickup_Spin_Effect(975, 229, 215);
} else if ( Actor_Clue_Query(kActorMcCoy, kClueHomelessManInterview1)
&& !Actor_Clue_Query(kActorMcCoy, kClueFlaskOfAbsinthe)
- && (Global_Variable_Query(kVariableChinyen) > 20
- || Query_Difficulty_Level() == 0
+ && (Global_Variable_Query(kVariableChinyen) > 20
+ || Query_Difficulty_Level() == 0
)
) {
Actor_Clue_Acquire(kActorMcCoy, kClueFlaskOfAbsinthe, true, kActorHawkersBarkeep);
@@ -132,12 +132,12 @@ bool SceneScriptHC02::ClickedOnActor(int actorId) {
Actor_Says(kActorMcCoy, 1245, 13);
} else {
if ( Actor_Clue_Query(kActorMcCoy, kClueMaggieBracelet)
- && !Game_Flag_Query(kFlagHawkersBarkeepBraceletTalk)
+ && !Game_Flag_Query(kFlagHC02HawkersBarkeepBraceletTalk)
) {
Actor_Says(kActorHawkersBarkeep, 80, 16);
Actor_Says(kActorMcCoy, 1265, 13);
Actor_Says(kActorHawkersBarkeep, 90, 13);
- Game_Flag_Set(kFlagHawkersBarkeepBraceletTalk);
+ Game_Flag_Set(kFlagHC02HawkersBarkeepBraceletTalk);
}
if (Global_Variable_Query(kVariableChinyen) > 5
|| Query_Difficulty_Level() == 0
diff --git a/engines/bladerunner/script/scene/hc03.cpp b/engines/bladerunner/script/scene/hc03.cpp
index 07016f6c5f..c0d08c5a69 100644
--- a/engines/bladerunner/script/scene/hc03.cpp
+++ b/engines/bladerunner/script/scene/hc03.cpp
@@ -46,7 +46,7 @@ void SceneScriptHC03::InitializeScene() {
if (Game_Flag_Query(kFlagHC03CageOpen)
|| Global_Variable_Query(kVariableChapter) > 3
) {
- Item_Remove_From_World(kItemHC03Lock);
+ Item_Remove_From_World(kItemGreenPawnLock);
Game_Flag_Set(kFlagHC03CageOpen);
Scene_Exit_Add_2D_Exit(1, 400, 275, 515, 375, 2);
}
@@ -115,12 +115,12 @@ bool SceneScriptHC03::ClickedOnActor(int actorId) {
}
bool SceneScriptHC03::ClickedOnItem(int itemId, bool combatMode) {
- if (itemId == kItemHC03Lock) {
+ if (itemId == kItemGreenPawnLock) {
if (combatMode) {
Scene_Loop_Set_Default(kHC03LoopMainCageOpen);
Scene_Loop_Start_Special(kSceneLoopModeOnce, kHC03LoopCageDoorOpening, true);
Game_Flag_Set(kFlagHC03CageOpen);
- Item_Remove_From_World(kItemHC03Lock);
+ Item_Remove_From_World(kItemGreenPawnLock);
Unobstacle_Object("GPscisGate", true);
} else {
Actor_Says(kActorMcCoy, 8522, 12);
@@ -135,7 +135,7 @@ bool SceneScriptHC03::ClickedOnItem(int itemId, bool combatMode) {
Item_Pickup_Spin_Effect(984, 78, 435);
Delay(1500);
Item_Pickup_Spin_Effect(984, 58, 435);
- if (Game_Flag_Query(374)) {
+ if (Game_Flag_Query(kFlagAR02DektoraBoughtScorpions)) {
Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy1, true, kActorIzo);
} else {
Actor_Clue_Acquire(kActorMcCoy, kCluePhotoOfMcCoy2, true, kActorIzo);
@@ -163,8 +163,8 @@ bool SceneScriptHC03::ClickedOnExit(int exitId) {
Game_Flag_Set(kFlagHC03TrapDoorOpen);
} else {
Game_Flag_Set(kFlagHC03toUG02);
- Game_Flag_Reset(kFlagMcCoyAtHCxx);
- Game_Flag_Set(kFlagMcCoyAtUGxx);
+ Game_Flag_Reset(kFlagMcCoyInHawkersCircle);
+ Game_Flag_Set(kFlagMcCoyInUnderground);
Game_Flag_Set(kFlagHC03TrapDoorOpen);
Music_Stop(2);
Set_Enter(kSetUG02, kSceneUG02);
diff --git a/engines/bladerunner/script/scene/hc04.cpp b/engines/bladerunner/script/scene/hc04.cpp
index 35965ea472..224aa11540 100644
--- a/engines/bladerunner/script/scene/hc04.cpp
+++ b/engines/bladerunner/script/scene/hc04.cpp
@@ -87,11 +87,11 @@ bool SceneScriptHC04::ClickedOnActor(int actorId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -155.0f, 0.0f, -475.0f, 12, true, false, 0)) {
Actor_Face_Actor(kActorMcCoy, kActorIsabella, true);
Actor_Face_Actor(kActorIsabella, kActorMcCoy, true);
- if (!Game_Flag_Query(kFlagIsabellaIntroduced)) {
+ if (!Game_Flag_Query(kFlagHC04IsabellaTalk)) {
Actor_Says(kActorIsabella, 0, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 1280, kAnimationModeTalk);
Actor_Says(kActorIsabella, 20, kAnimationModeTalk);
- Game_Flag_Set(kFlagIsabellaIntroduced);
+ Game_Flag_Set(kFlagHC04IsabellaTalk);
return true;
} else {
dialogueWithIsabella();
@@ -111,8 +111,8 @@ bool SceneScriptHC04::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -108.0f, 0.14f, -639.0f, 0, true, false, 0)) {
Music_Stop(2);
Game_Flag_Set(kFlagHC04toRC03);
- Game_Flag_Reset(kFlagMcCoyAtHCxx);
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Reset(kFlagMcCoyInHawkersCircle);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Set_Enter(kSetRC03, kSceneRC03);
}
return true;
diff --git a/engines/bladerunner/script/scene/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp
index 25f663c9c4..5bb9dce1fc 100644
--- a/engines/bladerunner/script/scene/hf01.cpp
+++ b/engines/bladerunner/script/scene/hf01.cpp
@@ -191,79 +191,79 @@ bool SceneScriptHF01::ClickedOnExit(int exitId) {
}
if (exitId == 3) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 100.0f, 0.0f, -260.0f, 0, true, false, 0)) {
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
- Game_Flag_Reset(kFlagMcCoyAtBBxx);
- Game_Flag_Reset(kFlagMcCoyAtHFxx);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
+ Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
+ Game_Flag_Reset(kFlagMcCoyInHysteriaHall);
int spinnerDest = Spinner_Interface_Choose_Dest(3, false);
switch (spinnerDest) {
case kSpinnerDestinationPoliceStation:
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Reset(kFlagSpinnerAtHF01);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationMcCoysApartment:
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Game_Flag_Reset(kFlagSpinnerAtHF01);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationRuncitersAnimals:
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagSpinnerAtHF01);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationChinatown:
- Game_Flag_Set(kFlagMcCoyAtCTxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagSpinnerAtHF01);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationAnimoidRow:
- Game_Flag_Set(kFlagMcCoyAtTBxx);
+ Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagSpinnerAtHF01);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationTyrellBuilding:
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Game_Flag_Reset(kFlagSpinnerAtHF01);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationDNARow:
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagSpinnerAtHF01);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationBradburyBuilding:
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Game_Flag_Reset(kFlagSpinnerAtHF01);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationNightclubRow:
- Game_Flag_Set(kFlagMcCoyAtNRxx);
+ Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Reset(kFlagSpinnerAtHF01);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
default:
- Game_Flag_Set(kFlagMcCoyAtHFxx);
+ Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 100.0f, 0.0f, -300.0f, 0, true, false, 0);
break;
}
diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp
index 9815c91f80..4838c27089 100644
--- a/engines/bladerunner/script/scene/hf05.cpp
+++ b/engines/bladerunner/script/scene/hf05.cpp
@@ -27,7 +27,7 @@ namespace BladeRunner {
void SceneScriptHF05::InitializeScene() {
if (Game_Flag_Query(530)) {
Setup_Scene_Information(257.0f, 40.63f, 402.0f, 1000);
- } else if (Game_Flag_Query(358)) {
+ } else if (Game_Flag_Query(kFlagHF07toHF05)) {
Setup_Scene_Information(330.0f, 40.63f, -107.0f, 603);
} else {
Setup_Scene_Information(483.0f, 40.63f, -189.0f, 600);
@@ -162,13 +162,13 @@ bool SceneScriptHF05::ClickedOnExit(int exitId) {
if (!Game_Flag_Query(684)) {
int affectionTowardsActor = getAffectionTowardsActor();
if (Game_Flag_Query(663)
- && Game_Flag_Query(368)
- && affectionTowardsActor != -1
+ && Game_Flag_Query(368)
+ && affectionTowardsActor != -1
) {
Actor_Face_Actor(kActorMcCoy, affectionTowardsActor, true);
Actor_Says(kActorMcCoy, 1810, 16);
}
- Game_Flag_Set(359);
+ Game_Flag_Set(kFlagHF05toHF07);
Set_Enter(kSetHF07, kSceneHF07);
}
}
@@ -255,7 +255,7 @@ void SceneScriptHF05::PlayerWalkedIn() {
Async_Actor_Walk_To_Waypoint(affectionTowardsActor, 437, 36, 0);
} else if (Game_Flag_Query(530)) {
Actor_Set_At_XYZ(affectionTowardsActor, 288.0f, 40.63f, 410.0f, 909);
- } else if (Game_Flag_Query(358)) {
+ } else if (Game_Flag_Query(kFlagHF07toHF05)) {
Actor_Set_At_XYZ(affectionTowardsActor, 298.0f, 40.63f, -107.0f, 512);
} else {
Actor_Set_At_XYZ(affectionTowardsActor, 284.0f, 40.63f, 286.0f, 0);
@@ -281,7 +281,7 @@ void SceneScriptHF05::PlayerWalkedIn() {
}
} else if (Game_Flag_Query(kFlagHF01toHF05)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 399.0f, 40.63f, -85.0f, 0, 0, false, 0);
- } else if (Game_Flag_Query(358)) {
+ } else if (Game_Flag_Query(kFlagHF07toHF05)) {
Actor_Set_At_XYZ(kActorMcCoy, 346.0f, 4.63f, -151.0f, 603);
Loop_Actor_Travel_Stairs(kActorMcCoy, 4, 1, kAnimationModeIdle);
}
@@ -298,7 +298,7 @@ void SceneScriptHF05::PlayerWalkedIn() {
}
Game_Flag_Reset(kFlagHF01toHF05);
Game_Flag_Reset(530);
- Game_Flag_Reset(358);
+ Game_Flag_Reset(kFlagHF07toHF05);
//return false;
}
diff --git a/engines/bladerunner/script/scene/hf07.cpp b/engines/bladerunner/script/scene/hf07.cpp
index 14da5c20de..1eb88677b1 100644
--- a/engines/bladerunner/script/scene/hf07.cpp
+++ b/engines/bladerunner/script/scene/hf07.cpp
@@ -25,7 +25,7 @@
namespace BladeRunner {
void SceneScriptHF07::InitializeScene() {
- if (Game_Flag_Query(361) ) {
+ if (Game_Flag_Query(kFlagUG06toHF07) ) {
Setup_Scene_Information(-84.0f, 58.43f, -105.0f, 524);
} else {
Setup_Scene_Information(298.0f, 58.43f, -71.0f, 700);
@@ -74,7 +74,7 @@ bool SceneScriptHF07::ClickedOnExit(int exitId) {
Async_Actor_Walk_To_XYZ(kActorLucy, 235.0f, 58.43f, -100.0f, 0, false);
}
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 318.0f, 71.43f, -102.0f, 0, 1, false, 0)) {
- Game_Flag_Set(358);
+ Game_Flag_Set(kFlagHF07toHF05);
if (!Game_Flag_Query(662)) {
Actor_Face_Heading(kActorMcCoy, 0, false);
Footstep_Sound_Override_On(3);
@@ -96,7 +96,7 @@ bool SceneScriptHF07::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -84.0f, 58.43f, -105.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(360);
+ Game_Flag_Set(kFlagHF07toUG06);
Set_Enter(kSetUG05, kSceneUG05);
}
return true;
@@ -119,20 +119,20 @@ void SceneScriptHF07::PlayerWalkedIn() {
int actorId = getAffectionTowardsActor();
if (Game_Flag_Query(662) && actorId != -1) {
Actor_Put_In_Set(actorId, kSetHF07);
- if (Game_Flag_Query(361)) {
+ if (Game_Flag_Query(kFlagUG06toHF07)) {
Actor_Set_At_XYZ(actorId, -73.0f, 58.43f, -7.0f, 224);
} else {
Actor_Set_At_XYZ(actorId, 235.0f, 58.43f, -100.0f, 512);
}
}
- } else if (Game_Flag_Query(359)) {
+ } else if (Game_Flag_Query(kFlagHF05toHF07)) {
Actor_Set_At_XYZ(kActorMcCoy, 267.72f, 329.43f, -86.75f, 940);
Footstep_Sound_Override_On(3);
Loop_Actor_Travel_Stairs(kActorMcCoy, 30, false, kAnimationModeIdle);
Footstep_Sound_Override_Off();
}
- Game_Flag_Reset(359);
- Game_Flag_Reset(361);
+ Game_Flag_Reset(kFlagHF05toHF07);
+ Game_Flag_Reset(kFlagUG06toHF07);
}
void SceneScriptHF07::PlayerWalkedOut() {
diff --git a/engines/bladerunner/script/scene/ma01.cpp b/engines/bladerunner/script/scene/ma01.cpp
index c4594810c7..566edeb0c2 100644
--- a/engines/bladerunner/script/scene/ma01.cpp
+++ b/engines/bladerunner/script/scene/ma01.cpp
@@ -118,74 +118,74 @@ bool SceneScriptMA01::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 381.0f, 0.0f, 54.0f, 0, 1, false, 0)) {
Player_Loses_Control();
Actor_Face_Heading(kActorMcCoy, 736, false);
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagMcCoyAtARxx);
- Game_Flag_Reset(kFlagMcCoyAtTBxx);
- Game_Flag_Reset(kFlagMcCoyAtDRxx);
- Game_Flag_Reset(kFlagMcCoyAtBBxx);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Reset(kFlagMcCoyInAnimoidRow);
+ Game_Flag_Reset(kFlagMcCoyInTyrellBuilding);
+ Game_Flag_Reset(kFlagMcCoyInDNARow);
+ Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
int spinnerDest = Spinner_Interface_Choose_Dest(kMA01LoopOutDoorAnim, false);
switch (spinnerDest) {
case kSpinnerDestinationPoliceStation:
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Reset(kFlagSpinnerAtMA01);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kMA01LoopOutshotRoof, true);
break;
case kSpinnerDestinationRuncitersAnimals:
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagSpinnerAtMA01);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kMA01LoopOutshotRoof, true);
break;
case kSpinnerDestinationChinatown:
- Game_Flag_Set(kFlagMcCoyAtCTxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagSpinnerAtMA01);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kMA01LoopOutshotRoof, true);
break;
case kSpinnerDestinationTyrellBuilding:
- Game_Flag_Set(kFlagMcCoyAtTBxx);
+ Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagSpinnerAtMA01);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kMA01LoopOutshotRoof, true);
break;
case kSpinnerDestinationAnimoidRow:
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Game_Flag_Reset(kFlagSpinnerAtMA01);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kMA01LoopOutshotRoof, true);
break;
case kSpinnerDestinationDNARow:
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagSpinnerAtMA01);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kMA01LoopOutshotRoof, true);
break;
case kSpinnerDestinationBradburyBuilding:
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Game_Flag_Reset(kFlagSpinnerAtMA01);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kMA01LoopOutshotRoof, true);
break;
case kSpinnerDestinationNightclubRow:
- Game_Flag_Set(kFlagMcCoyAtNRxx);
+ Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Reset(kFlagSpinnerAtMA01);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kMA01LoopOutshotRoof, true);
break;
case kSpinnerDestinationHysteriaHall:
- Game_Flag_Set(kFlagMcCoyAtHFxx);
+ Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtMA01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
@@ -194,7 +194,7 @@ bool SceneScriptMA01::ClickedOnExit(int exitId) {
default:
Actor_Set_Invisible(kActorMcCoy, false);
Actor_Face_Heading(kActorMcCoy, 736, false);
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
break;
}
}
diff --git a/engines/bladerunner/script/scene/ma02.cpp b/engines/bladerunner/script/scene/ma02.cpp
index edaae510f8..5fa1e669c5 100644
--- a/engines/bladerunner/script/scene/ma02.cpp
+++ b/engines/bladerunner/script/scene/ma02.cpp
@@ -246,10 +246,14 @@ void SceneScriptMA02::selectNextTvNews() {
if (Global_Variable_Query(kVariableChapter) >= 3) {
arr[i++] = 2;
}
- if (Global_Variable_Query(kVariableChapter) >= 2 && Global_Variable_Query(kVariableChapter) <= 4) {
+ if (Global_Variable_Query(kVariableChapter) >= 2
+ && Global_Variable_Query(kVariableChapter) <= 4
+ ) {
arr[i++] = 3;
}
- if (Game_Flag_Query(kFlagHomelessBodyFound) && Game_Flag_Query(kFlagHomelessBodyInDumpster)) {
+ if (Game_Flag_Query(kFlagCT04HomelessBodyFound)
+ && Game_Flag_Query(kFlagCT04HomelessBodyInDumpster)
+ ) {
arr[i++] = 4;
}
Global_Variable_Set(kVariableNextTvNews, arr[Random_Query(0, i - 1)]);
diff --git a/engines/bladerunner/script/scene/ma04.cpp b/engines/bladerunner/script/scene/ma04.cpp
index 0484e69db1..6ebdae5bb1 100644
--- a/engines/bladerunner/script/scene/ma04.cpp
+++ b/engines/bladerunner/script/scene/ma04.cpp
@@ -50,7 +50,7 @@ void SceneScriptMA04::InitializeScene() {
}
} else if (Game_Flag_Query(kFlagMA02ToMA04)) {
Setup_Scene_Information(-7099.0f, 954.0f, 1866.0f, 502);
- } else if (Game_Flag_Query(kFlagMcCoySleeping)) {
+ } else if (Game_Flag_Query(kFlagMA04McCoySleeping)) {
Setup_Scene_Information(-7107.0f, 954.0f, 1742.0f, 502);
Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kMA04LoopWakeup, false);
} else {
@@ -189,7 +189,7 @@ bool SceneScriptMA04::ClickedOn2DRegion(int region) {
Music_Play(2, 52, 0, 3, -1, 0, 0);
return false;
}
- if (Actor_Clue_Query(kActorClovis, kClueMcCoyRetiredZuben) && !Game_Flag_Query(kFlagPhoneMessageFromClovis)) {
+ if (Actor_Clue_Query(kActorClovis, kClueMcCoyRetiredZuben) && !Game_Flag_Query(kFlagMA04PhoneMessageFromClovis)) {
Sound_Play(123, 100, 0, 0, 50);
Overlay_Remove("MA04OVER");
Delay(500);
@@ -202,10 +202,10 @@ bool SceneScriptMA04::ClickedOn2DRegion(int region) {
}
Actor_Says(kActorMcCoy, 2445, 13);
Sound_Play(123, 100, 0, 0, 50);
- Game_Flag_Set(kFlagPhoneMessageFromClovis);
+ Game_Flag_Set(kFlagMA04PhoneMessageFromClovis);
return true;
}
- if (Actor_Clue_Query(kActorLucy, kClueMcCoyLetZubenEscape) && !Game_Flag_Query(kFlagPhoneMessageFromLucy)) {
+ if (Actor_Clue_Query(kActorLucy, kClueMcCoyLetZubenEscape) && !Game_Flag_Query(kFlagMA04PhoneMessageFromLucy)) {
Sound_Play(123, 100, 0, 0, 50);
Overlay_Remove("MA04OVER");
Delay(500);
@@ -218,7 +218,7 @@ bool SceneScriptMA04::ClickedOn2DRegion(int region) {
}
Actor_Says(kActorMcCoy, 2445, 13);
Sound_Play(123, 100, 0, 0, 50);
- Game_Flag_Set(kFlagPhoneMessageFromLucy);
+ Game_Flag_Set(kFlagMA04PhoneMessageFromLucy);
return true;
}
Actor_Says(kActorMcCoy, 2670, 13);
@@ -240,7 +240,7 @@ void SceneScriptMA04::SceneFrameAdvanced(int frame) {
} else {
Set_Fade_Density(0.0f);
}
- if (frame == 121 && (Game_Flag_Query(kFlagZubenRetired) || Game_Flag_Query(kFlagZubenSpared)) && !Game_Flag_Query(kFlagGuzzaTalkZubenRetired)) {
+ if (frame == 121 && (Game_Flag_Query(kFlagZubenRetired) || Game_Flag_Query(kFlagZubenSpared)) && !Game_Flag_Query(kFlagPS04GuzzaTalkZubenRetired)) {
Sound_Play(403, 50, 0, 0, 50);
}
}
@@ -249,20 +249,20 @@ void SceneScriptMA04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptMA04::PlayerWalkedIn() {
- if (Game_Flag_Query(kFlagMcCoySleeping)) {
+ if (Game_Flag_Query(kFlagMA04McCoySleeping)) {
Player_Gains_Control();
}
if (isPhoneMessageWaiting() || isPhoneRinging()) {
Overlay_Play("MA04OVER", 0, 1, 0, 0);
}
- if (Game_Flag_Query(kFlagMcCoySleeping)) {
+ if (Game_Flag_Query(kFlagMA04McCoySleeping)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -7139.0f, 954.0f, 1746.0f, 0, true, false, 0);
} else if (Game_Flag_Query(kFlagMA02ToMA04)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -7143.0f, 954.0f, 1868.0f, 0, true, false, 0);
}
Game_Flag_Reset(kFlagMA02ToMA04);
Game_Flag_Reset(kFlagMA05toMA04);
- Game_Flag_Reset(kFlagMcCoySleeping);
+ Game_Flag_Reset(kFlagMA04McCoySleeping);
if (Game_Flag_Query(kFlagChapter1Ended)) {
if (Global_Variable_Query(kVariableChapter) == 2 && !Actor_Clue_Query(kActorMcCoy, kCluePhoneCallGuzza)) {
Sound_Play(403, 100, 0, 0, 50);
@@ -286,8 +286,8 @@ void SceneScriptMA04::PlayerWalkedIn() {
Actor_Clue_Acquire(kActorMcCoy, kCluePhoneCallGuzza, false, kActorGuzza);
Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationTyrellBuilding, true);
Game_Flag_Set(kFlagRC01PoliceDone);
- if (!Game_Flag_Query(kFlagChromeDebrisTaken)) {
- Game_Flag_Set(kFlagChromeDebrisTaken);
+ if (!Game_Flag_Query(kFlagRC01ChromeDebrisTaken)) {
+ Game_Flag_Set(kFlagRC01ChromeDebrisTaken);
Item_Remove_From_World(kItemChromeDebris);
}
Actor_Set_Goal_Number(kActorOfficerLeary, 99);
@@ -338,8 +338,8 @@ bool SceneScriptMA04::isPhoneRinging() {
}
bool SceneScriptMA04::isPhoneMessageWaiting() {
- return (Actor_Clue_Query(kActorClovis, kClueMcCoyRetiredZuben) && !Game_Flag_Query(kFlagPhoneMessageFromClovis))
- || (Actor_Clue_Query(kActorLucy, kClueMcCoyLetZubenEscape) && !Game_Flag_Query(kFlagPhoneMessageFromLucy));
+ return (Actor_Clue_Query(kActorClovis, kClueMcCoyRetiredZuben) && !Game_Flag_Query(kFlagMA04PhoneMessageFromClovis))
+ || (Actor_Clue_Query(kActorLucy, kClueMcCoyLetZubenEscape) && !Game_Flag_Query(kFlagMA04PhoneMessageFromLucy));
}
void SceneScriptMA04::phoneCallWithDektora() {
@@ -562,7 +562,7 @@ void SceneScriptMA04::sleep() {
Overlay_Remove("MA04OVER");
}
Player_Loses_Control();
- Game_Flag_Set(kFlagMcCoySleeping);
+ Game_Flag_Set(kFlagMA04McCoySleeping);
if ((Game_Flag_Query(kFlagZubenRetired) || Game_Flag_Query(kFlagZubenSpared)) && Global_Variable_Query(kVariableChapter) == 1) {
if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenDead) {
Actor_Put_In_Set(kActorZuben, kSetFreeSlotA);
diff --git a/engines/bladerunner/script/scene/ma07.cpp b/engines/bladerunner/script/scene/ma07.cpp
index b7b91d9c54..70169189cf 100644
--- a/engines/bladerunner/script/scene/ma07.cpp
+++ b/engines/bladerunner/script/scene/ma07.cpp
@@ -25,22 +25,24 @@
namespace BladeRunner {
void SceneScriptMA07::InitializeScene() {
- if (Game_Flag_Query(356)) {
- Setup_Scene_Information(6.75f, -172.43f, 356.0f, 997);
- Game_Flag_Reset(356);
+ if (Game_Flag_Query(kFlagUG19toMA07)) {
+ Setup_Scene_Information( 6.75f, -172.43f, 356.0f, 997);
+ Game_Flag_Reset(kFlagUG19toMA07);
Game_Flag_Set(665);
- } else if (Game_Flag_Query(673)) {
- Setup_Scene_Information(-312.0f, -162.8f, 180.0f, 0);
+ } else if (Game_Flag_Query(kFlagPS14toMA07)) {
+ Setup_Scene_Information(-312.0f, -162.8f, 180.0f, 0);
} else {
- Setup_Scene_Information(104.0f, -162.16f, 56.0f, 519);
+ Setup_Scene_Information( 104.0f, -162.16f, 56.0f, 519);
}
+
Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1);
- Ambient_Sounds_Add_Sound(374, 100, 300, 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);
+ Ambient_Sounds_Add_Sound(374, 100, 300, 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 (Global_Variable_Query(kVariableChapter) > 1) {
Scene_Exit_Add_2D_Exit(1, 0, 200, 50, 479, 3);
}
@@ -72,8 +74,10 @@ bool SceneScriptMA07::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptMA07::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 104.0f, -162.0f, 56.0f, 12, 1, false, 0)) {
- if (Global_Variable_Query(kVariableChapter) == 4 && Game_Flag_Query(671)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 104.0f, -162.0f, 56.0f, 12, true, false, 0)) {
+ if (Global_Variable_Query(kVariableChapter) == 4
+ && Game_Flag_Query(671)
+ ) {
Actor_Set_Goal_Number(kActorMcCoy, 400);
} else {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
@@ -84,22 +88,24 @@ bool SceneScriptMA07::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -400.0f, -162.8f, 185.08f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -400.0f, -162.8f, 185.08f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(672);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMA07toPS14);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Set_Enter(kSetPS14, kScenePS14);
}
return true;
}
+
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 8.0f, -172.43f, 356.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 8.0f, -172.43f, 356.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(357);
+ Game_Flag_Set(kFlagMA07toUG19);
Set_Enter(kSetUG19, kSceneUG19);
}
return true;
@@ -121,9 +127,9 @@ void SceneScriptMA07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptMA07::PlayerWalkedIn() {
- if (Game_Flag_Query(673)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -268.0f, -162.8f, 188.0f, 0, 0, false, 0);
- Game_Flag_Reset(673);
+ if (Game_Flag_Query(kFlagPS14toMA07)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -268.0f, -162.8f, 188.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagPS14toMA07);
}
if (Actor_Query_Goal_Number(kActorRachael) == 300) {
Actor_Set_Goal_Number(kActorRachael, 305);
@@ -131,7 +137,10 @@ void SceneScriptMA07::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagMA06toMA07)) {
Game_Flag_Reset(kFlagMA06toMA07);
}
- if (!Game_Flag_Query(648) && Game_Flag_Query(671) && Global_Variable_Query(kVariableChapter) == 4) {
+ if (!Game_Flag_Query(648)
+ && Game_Flag_Query(671)
+ && Global_Variable_Query(kVariableChapter) == 4
+ ) {
Scene_Exits_Disable();
Actor_Set_Goal_Number(kActorGaff, 300);
}
diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp
index 9708d186c5..8823c12884 100644
--- a/engines/bladerunner/script/scene/nr01.cpp
+++ b/engines/bladerunner/script/scene/nr01.cpp
@@ -28,20 +28,21 @@ void SceneScriptNR01::InitializeScene() {
if (Game_Flag_Query(617)) {
Setup_Scene_Information(-153.86f, 23.88f, -570.21f, 402);
} else if (Game_Flag_Query(632)) {
- Setup_Scene_Information(-416.0f, 31.93f, -841.0f, 200);
+ Setup_Scene_Information( -416.0f, 31.93f, -841.0f, 200);
Actor_Set_Invisible(kActorMcCoy, true);
Preload(167);
} else if (Game_Flag_Query(534)) {
- Setup_Scene_Information(-416.0f, 31.93f, -841.0f, 200);
- } else if (Game_Flag_Query(342)) {
- Setup_Scene_Information(-270.0f, 4.93f, -1096.0f, 500);
+ Setup_Scene_Information( -416.0f, 31.93f, -841.0f, 200);
+ } else if (Game_Flag_Query(kFlagUG06toNR01)) {
+ Setup_Scene_Information( -270.0f, 4.93f, -1096.0f, 500);
} else if (Game_Flag_Query(533)) {
- Setup_Scene_Information(312.0f, 31.66f, -901.0f, 700);
+ Setup_Scene_Information( 312.0f, 31.66f, -901.0f, 700);
} else if (Game_Flag_Query(545)) {
- Setup_Scene_Information(-170.0f, 24.0f, -574.0f, 768);
+ Setup_Scene_Information( -170.0f, 24.0f, -574.0f, 768);
} else {
- Setup_Scene_Information(76.0f, 23.88f, -109.0f, 966);
+ Setup_Scene_Information( 76.0f, 23.88f, -109.0f, 966);
}
+
Scene_Exit_Add_2D_Exit(0, 31, 270, 97, 373, 3);
if (Global_Variable_Query(kVariableChapter) > 3) {
Scene_Exit_Add_2D_Exit(1, 201, 320, 276, 357, 2);
@@ -50,32 +51,40 @@ void SceneScriptNR01::InitializeScene() {
if (Game_Flag_Query(kFlagSpinnerAtNR01)) {
Scene_Exit_Add_2D_Exit(3, 320, 445, 639, 479, 2);
}
+
Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1);
Ambient_Sounds_Add_Looping_Sound(362, 22, 55, 1);
- Ambient_Sounds_Add_Sound(361, 10, 10, 20, 20, -70, -70, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(182, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(184, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(185, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(186, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(188, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(189, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(191, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(192, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(195, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(68, 10, 80, 16, 25, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(69, 10, 80, 16, 25, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(375, 10, 80, 33, 33, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(376, 10, 80, 33, 33, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(377, 10, 80, 33, 33, 0, 0, -101, -101, 0, 0);
- if (Game_Flag_Query(643) && Actor_Query_Goal_Number(kActorSteele) == 230) {
+ Ambient_Sounds_Add_Sound(361, 10, 10, 20, 20, -70, -70, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(182, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(184, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(185, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(186, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(188, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(189, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(191, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(192, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(195, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 68, 10, 80, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 69, 10, 80, 16, 25, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(375, 10, 80, 33, 33, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(376, 10, 80, 33, 33, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(377, 10, 80, 33, 33, 0, 0, -101, -101, 0, 0);
+
+ if (Game_Flag_Query(643)
+ && Actor_Query_Goal_Number(kActorSteele) == 230
+ ) {
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagSpinnerAtHF01);
}
- if (Game_Flag_Query(kFlagSpinnerAtNR01) && !Game_Flag_Query(kFlagArrivedFromSpinner1)) {
+ if ( Game_Flag_Query(kFlagSpinnerAtNR01)
+ && !Game_Flag_Query(kFlagArrivedFromSpinner1)
+ ) {
Scene_Loop_Start_Special(0, 0, 0);
Scene_Loop_Set_Default(1);
Game_Flag_Set(kFlagArrivedFromSpinner1);
- } else if (Game_Flag_Query(kFlagSpinnerAtNR01) && Game_Flag_Query(kFlagArrivedFromSpinner1)) {
+ } else if (Game_Flag_Query(kFlagSpinnerAtNR01)
+ && Game_Flag_Query(kFlagArrivedFromSpinner1)
+ ) {
Scene_Loop_Set_Default(1);
} else {
Scene_Loop_Set_Default(4);
@@ -127,7 +136,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 0, kAnimationModeIdle);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(343);
+ Game_Flag_Set(kFlagNR01toUG06);
Set_Enter(kSetUG06, kSceneUG06);
}
return true;
@@ -143,17 +152,17 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
}
if (exitId == 3) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 108.0f, 23.88f, -93.0f, 0, true, false, 0)) {
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
- Game_Flag_Reset(kFlagMcCoyAtBBxx);
- Game_Flag_Reset(kFlagMcCoyAtHFxx);
- Game_Flag_Reset(kFlagMcCoyAtTBxx);
- Game_Flag_Reset(kFlagMcCoyAtNRxx);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
+ Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
+ Game_Flag_Reset(kFlagMcCoyInHysteriaHall);
+ Game_Flag_Reset(kFlagMcCoyInTyrellBuilding);
+ Game_Flag_Reset(kFlagMcCoyInNightclubRow);
switch (Spinner_Interface_Choose_Dest(-1, true)) {
case kSpinnerDestinationPoliceStation:
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtPS01);
@@ -161,7 +170,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
break;
case kSpinnerDestinationMcCoysApartment:
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtMA01);
@@ -169,7 +178,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
break;
case kSpinnerDestinationRuncitersAnimals:
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtRC01);
@@ -177,7 +186,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
break;
case kSpinnerDestinationChinatown:
- Game_Flag_Set(kFlagMcCoyAtCTxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtCT01);
@@ -185,7 +194,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
break;
case kSpinnerDestinationAnimoidRow:
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtAR01);
@@ -193,7 +202,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
break;
case kSpinnerDestinationTyrellBuilding:
- Game_Flag_Set(kFlagMcCoyAtTBxx);
+ Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtTB02);
@@ -201,7 +210,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
break;
case kSpinnerDestinationDNARow:
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtDR01);
@@ -209,7 +218,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
break;
case kSpinnerDestinationBradburyBuilding:
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtBB01);
@@ -217,7 +226,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
break;
case kSpinnerDestinationHysteriaHall:
- Game_Flag_Set(kFlagMcCoyAtHFxx);
+ Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
@@ -225,7 +234,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
break;
default:
Player_Loses_Control();
- Game_Flag_Set(kFlagMcCoyAtNRxx);
+ Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Set(kFlagArrivedFromSpinner1);
Player_Gains_Control();
break;
@@ -308,16 +317,16 @@ void SceneScriptNR01::PlayerWalkedIn() {
return;
}
if (Game_Flag_Query(534)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -380.0f, 31.73f, -841.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -380.0f, 31.73f, -841.0f, 0, false, false, 0);
Game_Flag_Reset(534);
} else {
- if (Game_Flag_Query(342)) {
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, kAnimationModeIdle);
- Game_Flag_Reset(342);
+ if (Game_Flag_Query(kFlagUG06toNR01)) {
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, true, kAnimationModeIdle);
+ Game_Flag_Reset(kFlagUG06toNR01);
if (Actor_Query_Goal_Number(kActorSteele) == 230) {
Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
Actor_Says(kActorSteele, 1440, 13);
- Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 48, 0, true);
+ Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 48, false, true);
Actor_Says(kActorMcCoy, 3145, 13);
if (Global_Variable_Query(40) != 3) {
Actor_Says(kActorSteele, 1450, 12);
@@ -418,7 +427,12 @@ void SceneScriptNR01::PlayerWalkedIn() {
void SceneScriptNR01::PlayerWalkedOut() {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- if (!Game_Flag_Query(343) && !Game_Flag_Query(532) && !Game_Flag_Query(535) && !Game_Flag_Query(632) && !Game_Flag_Query(722)) {
+ if (!Game_Flag_Query(kFlagNR01toUG06)
+ && !Game_Flag_Query(532)
+ && !Game_Flag_Query(535)
+ && !Game_Flag_Query(632)
+ && !Game_Flag_Query(722)
+ ) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Outtake_Play(kOuttakeAway1, true, -1);
@@ -428,7 +442,11 @@ void SceneScriptNR01::PlayerWalkedOut() {
}
void SceneScriptNR01::DialogueQueueFlushed(int a1) {
- if (Actor_Query_Goal_Number(kActorSteele) == 251 && Actor_Query_Goal_Number(kActorGordo) != 299 && Actor_Query_Goal_Number(kActorGordo) != 254 && Actor_Query_Goal_Number(kActorGordo) != 255) {
+ if (Actor_Query_Goal_Number(kActorSteele) == 251
+ && Actor_Query_Goal_Number(kActorGordo) != 299
+ && Actor_Query_Goal_Number(kActorGordo) != 254
+ && Actor_Query_Goal_Number(kActorGordo) != 255
+ ) {
Actor_Set_Goal_Number(kActorSteele, 252);
}
}
diff --git a/engines/bladerunner/script/scene/nr04.cpp b/engines/bladerunner/script/scene/nr04.cpp
index d6332fe099..05250e82fe 100644
--- a/engines/bladerunner/script/scene/nr04.cpp
+++ b/engines/bladerunner/script/scene/nr04.cpp
@@ -152,7 +152,7 @@ bool SceneScriptNR04::ClickedOn2DRegion(int region) {
if (Game_Flag_Query(606) == 1) {
return true;
}
- if (Game_Flag_Query(374)) {
+ if (Game_Flag_Query(kFlagAR02DektoraBoughtScorpions)) {
Player_Loses_Control();
Actor_Voice_Over(4180, kActorVoiceOver);
Actor_Change_Animation_Mode(kActorMcCoy, 48);
@@ -260,7 +260,7 @@ 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);
- if (Game_Flag_Query(374)) {
+ if (Game_Flag_Query(kFlagAR02DektoraBoughtScorpions)) {
Overlay_Play("nr04over", 0, 1, 0, 0);
Delay(4000);
Overlay_Remove("nr04over");
diff --git a/engines/bladerunner/script/scene/ps01.cpp b/engines/bladerunner/script/scene/ps01.cpp
index 34c7583381..bafa4a5570 100644
--- a/engines/bladerunner/script/scene/ps01.cpp
+++ b/engines/bladerunner/script/scene/ps01.cpp
@@ -87,74 +87,74 @@ bool SceneScriptPS01::ClickedOnExit(int exitId) {
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);
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
- Game_Flag_Reset(kFlagMcCoyAtARxx);
- Game_Flag_Reset(kFlagMcCoyAtTBxx);
- Game_Flag_Reset(kFlagMcCoyAtDRxx);
- Game_Flag_Reset(kFlagMcCoyAtBBxx);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
+ Game_Flag_Reset(kFlagMcCoyInAnimoidRow);
+ Game_Flag_Reset(kFlagMcCoyInTyrellBuilding);
+ Game_Flag_Reset(kFlagMcCoyInDNARow);
+ Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
int spinnerDest = Spinner_Interface_Choose_Dest(3, true);
switch (spinnerDest) {
case kSpinnerDestinationMcCoysApartment:
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationRuncitersAnimals:
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationChinatown:
- Game_Flag_Set(kFlagMcCoyAtCTxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationAnimoidRow:
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationTyrellBuilding:
- Game_Flag_Set(kFlagMcCoyAtTBxx);
+ Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationDNARow:
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ 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);
break;
case kSpinnerDestinationBradburyBuilding:
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationNightclubRow:
- Game_Flag_Set(kFlagMcCoyAtNRxx);
+ Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true);
break;
case kSpinnerDestinationHysteriaHall:
- Game_Flag_Set(kFlagMcCoyAtHFxx);
+ Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtPS01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
@@ -162,7 +162,7 @@ bool SceneScriptPS01::ClickedOnExit(int exitId) {
break;
default:
Actor_Face_Heading(kActorMcCoy, 870, false);
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Set(kFlagArrivedFromSpinner2);
Player_Loses_Control();
Scene_Loop_Start_Special(2, 3, 1);
diff --git a/engines/bladerunner/script/scene/ps04.cpp b/engines/bladerunner/script/scene/ps04.cpp
index 510d596d83..bab6ce5784 100644
--- a/engines/bladerunner/script/scene/ps04.cpp
+++ b/engines/bladerunner/script/scene/ps04.cpp
@@ -152,7 +152,7 @@ void SceneScriptPS04::dialogueWithGuzza() {
DM_Add_To_List_Never_Repeat_Once_Selected(150, 7, 6, 5); // HOLDEN'S BADGE
}
}
- if (Game_Flag_Query(kFlagMcCoyKilledHomeless)) {
+ if (Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy)) {
DM_Add_To_List_Never_Repeat_Once_Selected(140, 3, -1, -1); // CONFESS TO SHOOTING
}
DM_Add_To_List(130, 1, 1, 1); // REPORT IN
@@ -192,7 +192,7 @@ void SceneScriptPS04::dialogueWithGuzza() {
case 130: // REPORT IN
if ( Game_Flag_Query(kFlagZubenRetired)
- && !Game_Flag_Query(kFlagGuzzaTalkZubenRetired)
+ && !Game_Flag_Query(kFlagPS04GuzzaTalkZubenRetired)
) {
Actor_Says(kActorMcCoy, 3920, 13);
Actor_Says(kActorGuzza, 140, 30);
@@ -220,13 +220,13 @@ void SceneScriptPS04::dialogueWithGuzza() {
Actor_Says(kActorGuzza, 250, 34);
Actor_Says(kActorGuzza, 260, 33);
Actor_Says(kActorGuzza, 270, 32);
- Game_Flag_Set(kFlagGuzzaTalkZubenRetired);
+ Game_Flag_Set(kFlagPS04GuzzaTalkZubenRetired);
if (Query_Difficulty_Level() != 0) {
Global_Variable_Increment(kVariableChinyen, 200);
}
Game_Flag_Set(kFlagZubenBountyPaid);
} else if ( Game_Flag_Query(kFlagZubenSpared)
- && !Game_Flag_Query(kFlagGuzzaTalkZubenEscaped)
+ && !Game_Flag_Query(kFlagPS04GuzzaTalkZubenEscaped)
) {
Actor_Says(kActorMcCoy, 3955, 13);
Actor_Says(kActorGuzza, 280, 30);
@@ -236,14 +236,14 @@ void SceneScriptPS04::dialogueWithGuzza() {
Actor_Says(kActorMcCoy, 3965, 13);
Actor_Says(kActorGuzza, 310, 33);
Actor_Says(kActorGuzza, 320, 34);
- Game_Flag_Set(kFlagGuzzaTalkZubenEscaped);
+ Game_Flag_Set(kFlagPS04GuzzaTalkZubenEscaped);
} else if (
( Actor_Clue_Query(kActorMcCoy, kClueChopstickWrapper)
|| Actor_Clue_Query(kActorMcCoy, kClueSushiMenu)
)
&& Actor_Clue_Query(kActorMcCoy, kClueRunciterInterviewA)
&& Actor_Query_Friendliness_To_Other(kActorGuzza, kActorMcCoy) < 50
- && !Game_Flag_Query(kFlagGuzzaTalk1)
+ && !Game_Flag_Query(kFlagPS04GuzzaTalk1)
) {
Actor_Says(kActorMcCoy, 3970, 18);
Actor_Says(kActorGuzza, 330, 30);
@@ -258,18 +258,18 @@ void SceneScriptPS04::dialogueWithGuzza() {
Actor_Says(kActorMcCoy, 3985, 18);
Actor_Says(kActorGuzza, 400, 34);
Actor_Says(kActorGuzza, 410, 31);
- Game_Flag_Set(kFlagGuzzaTalk1);
+ Game_Flag_Set(kFlagPS04GuzzaTalk1);
} else if (
( Actor_Clue_Query(kActorMcCoy, kClueChopstickWrapper)
|| Actor_Clue_Query(kActorMcCoy, kClueSushiMenu)
)
&& Actor_Clue_Query(kActorMcCoy, kClueRunciterInterviewA)
- && !Game_Flag_Query(kFlagGuzzaTalk2)
+ && !Game_Flag_Query(kFlagPS04GuzzaTalk2)
) {
Actor_Says(kActorMcCoy, 3920, 13);
Actor_Says(kActorGuzza, 570, 32);
Actor_Says(kActorMcCoy, 4070, 13);
- Game_Flag_Set(kFlagGuzzaTalk2);
+ Game_Flag_Set(kFlagPS04GuzzaTalk2);
} else if (Actor_Query_Friendliness_To_Other(kActorGuzza, kActorMcCoy) >= 50) {
Actor_Says(kActorMcCoy, 4020, 13);
Actor_Says(kActorGuzza, 580, 34);
diff --git a/engines/bladerunner/script/scene/ps05.cpp b/engines/bladerunner/script/scene/ps05.cpp
index 91fda95aa2..e3261c44f3 100644
--- a/engines/bladerunner/script/scene/ps05.cpp
+++ b/engines/bladerunner/script/scene/ps05.cpp
@@ -174,7 +174,7 @@ void SceneScriptPS05::selectNextTvNews() {
if (Global_Variable_Query(kVariableChapter) >= 2 && Global_Variable_Query(kVariableChapter) <= 4) {
arr[i++] = 3;
}
- if (Game_Flag_Query(kFlagHomelessBodyFound) && Game_Flag_Query(kFlagHomelessBodyInDumpster)) {
+ if (Game_Flag_Query(kFlagCT04HomelessBodyFound) && Game_Flag_Query(kFlagCT04HomelessBodyInDumpster)) {
arr[i++] = 4;
}
Global_Variable_Set(kVariableNextTvNews, arr[Random_Query(0, i - 1)]);
diff --git a/engines/bladerunner/script/scene/ps07.cpp b/engines/bladerunner/script/scene/ps07.cpp
index 4d15adbc54..86c8eaa5dc 100644
--- a/engines/bladerunner/script/scene/ps07.cpp
+++ b/engines/bladerunner/script/scene/ps07.cpp
@@ -69,11 +69,11 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
Actor_Face_Actor(kActorMcCoy, kActorKlein, true);
Actor_Set_Goal_Number(kActorKlein, 3);
- if (!Game_Flag_Query(kFlagKleinTalkClues)) {
+ if (!Game_Flag_Query(kFlagPS07KleinTalkClues)) {
Actor_Says(kActorMcCoy, 4115, 13);
}
- if (!Game_Flag_Query(kFlagKleinTalkClues)
+ if (!Game_Flag_Query(kFlagPS07KleinTalkClues)
&& (Game_Flag_Query(kFlagMcCoyHasShellCasings)
|| Game_Flag_Query(kFlagMcCoyHasOfficersStatement)
|| Game_Flag_Query(kFlagMcCoyHasPaintTransfer)
@@ -82,17 +82,17 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
) {
Actor_Face_Actor(kActorKlein, kActorMcCoy, true);
Actor_Says(kActorKlein, 30, 12);
- Game_Flag_Set(kFlagKleinTalkClues);
+ Game_Flag_Set(kFlagPS07KleinTalkClues);
} else {
- if (Game_Flag_Query(kFlagKleinTalkClues)) {
+ if (Game_Flag_Query(kFlagPS07KleinTalkClues)) {
Actor_Says(kActorMcCoy, 4130, 18);
}
}
if ( Game_Flag_Query(kFlagMcCoyHasShellCasings)
- && !Game_Flag_Query(kFlagKleinTalkShellCasings)
+ && !Game_Flag_Query(kFlagPS07KleinTalkShellCasings)
) {
- Game_Flag_Set(kFlagKleinTalkShellCasings);
+ Game_Flag_Set(kFlagPS07KleinTalkShellCasings);
Actor_Clue_Acquire(kActorMcCoy, kClueLabShellCasings, false, kActorKlein);
Actor_Says(kActorKlein, 50, 16);
Actor_Says(kActorMcCoy, 4135, 13);
@@ -106,9 +106,9 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
}
if ( Game_Flag_Query(kFlagMcCoyHasOfficersStatement)
- && !Game_Flag_Query(kFlagKleinTalkOfficersStatement)
+ && !Game_Flag_Query(kFlagPS07KleinTalkOfficersStatement)
) {
- Game_Flag_Set(kFlagKleinTalkOfficersStatement);
+ Game_Flag_Set(kFlagPS07KleinTalkOfficersStatement);
Actor_Clue_Acquire(kActorMcCoy, kClueLabCorpses, false, kActorKlein);
Actor_Says(kActorKlein, 100, 13);
Actor_Says(kActorMcCoy, 4145, 13);
@@ -129,9 +129,9 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
}
if ( Game_Flag_Query(kFlagMcCoyHasPaintTransfer)
- && !Game_Flag_Query(kFlagKleinTalkPaintTransfer)
+ && !Game_Flag_Query(kFlagPS07KleinTalkPaintTransfer)
) {
- Game_Flag_Set(kFlagKleinTalkPaintTransfer);
+ Game_Flag_Set(kFlagPS07KleinTalkPaintTransfer);
Actor_Clue_Acquire(kActorMcCoy, kClueLabPaintTransfer, false, kActorKlein);
Actor_Says(kActorKlein, 170, 14);
Actor_Says(kActorMcCoy, 4180, 13);
@@ -146,9 +146,9 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) {
}
if ( Game_Flag_Query(kFlagMcCoyHasChromeDebris)
- && !Game_Flag_Query(kFlagKleinTalkChromeDebris)
+ && !Game_Flag_Query(kFlagPS07KleinTalkChromeDebris)
) {
- Game_Flag_Set(kFlagKleinTalkChromeDebris);
+ Game_Flag_Set(kFlagPS07KleinTalkChromeDebris);
Actor_Says(kActorKlein, 220, 12);
Actor_Says(kActorMcCoy, 4190, 13);
Actor_Says(kActorKlein, 230, 14);
@@ -194,7 +194,7 @@ void SceneScriptPS07::PlayerWalkedIn() {
}
void SceneScriptPS07::PlayerWalkedOut() {
- if (!Game_Flag_Query(kFlagKleinInsulted) && Global_Variable_Query(kVariableChapter) == 1) {
+ if (!Game_Flag_Query(kFlagPS07KleinInsulted) && Global_Variable_Query(kVariableChapter) == 1) {
Actor_Set_Goal_Number(kActorKlein, 0);
}
}
diff --git a/engines/bladerunner/script/scene/ps14.cpp b/engines/bladerunner/script/scene/ps14.cpp
index 2d1bb42816..44b57cbc5e 100644
--- a/engines/bladerunner/script/scene/ps14.cpp
+++ b/engines/bladerunner/script/scene/ps14.cpp
@@ -29,17 +29,19 @@ void SceneScriptPS14::InitializeScene() {
Setup_Scene_Information(-1119.61f, 508.14f, -1208.22f, 315);
Game_Flag_Reset(kFlagPS03toPS14);
} else {
- Setup_Scene_Information(-785.45f, 508.14f, -1652.0f, 315);
+ Setup_Scene_Information( -785.45f, 508.14f, -1652.0f, 315);
}
- Scene_Exit_Add_2D_Exit(0, 610, 0, 639, 479, 1);
- Scene_Exit_Add_2D_Exit(1, 46, 51, 125, 192, 0);
+
+ Scene_Exit_Add_2D_Exit(0, 610, 0, 639, 479, 1);
+ Scene_Exit_Add_2D_Exit(1, 46, 51, 125, 192, 0);
+
Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1);
- Ambient_Sounds_Add_Sound(374, 100, 300, 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);
+ Ambient_Sounds_Add_Sound(374, 100, 300, 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);
}
void SceneScriptPS14::SceneLoaded() {
@@ -69,8 +71,10 @@ bool SceneScriptPS14::ClickedOnExit(int exitId) {
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -2101.0f, 508.14f, -1361.0f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 819, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, kAnimationModeIdle);
- if (Global_Variable_Query(kVariableChapter) == 4 && Game_Flag_Query(671)) {
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 3, true, kAnimationModeIdle);
+ if (Global_Variable_Query(kVariableChapter) == 4
+ && Game_Flag_Query(671)
+ ) {
if (Actor_Clue_Query(kActorMcCoy, kClueBriefcase)) {
Game_Flag_Set(666);
Actor_Set_Goal_Number(kActorMcCoy, 400);
@@ -88,11 +92,12 @@ bool SceneScriptPS14::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 0) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -785.45f, 508.14f, -1652.0f, 0, 1, false, 0)) {
- Game_Flag_Set(673);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagPS14toMA07);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Set_Enter(kSetMA07, kSceneMA07);
}
return true;
@@ -111,9 +116,9 @@ void SceneScriptPS14::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptPS14::PlayerWalkedIn() {
- if (Game_Flag_Query(672)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -801.45f, 508.14f, -1596.68f, 0, 0, false, 0);
- Game_Flag_Reset(672);
+ if (Game_Flag_Query(kFlagMA07toPS14)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -801.45f, 508.14f, -1596.68f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagMA07toPS14);
}
//return false;
}
diff --git a/engines/bladerunner/script/scene/rc01.cpp b/engines/bladerunner/script/scene/rc01.cpp
index 03df5b061a..9467f16401 100644
--- a/engines/bladerunner/script/scene/rc01.cpp
+++ b/engines/bladerunner/script/scene/rc01.cpp
@@ -227,7 +227,7 @@ void SceneScriptRC01::SceneLoaded() {
Preload(589);
}
- if (!Game_Flag_Query(kFlagChromeDebrisTaken)) {
+ if (!Game_Flag_Query(kFlagRC01ChromeDebrisTaken)) {
Item_Add_To_World(kItemChromeDebris, 938, kSetRC01, -148.60f, -0.30f, 225.15f, 256, 24, 24, false, true, false, true);
}
@@ -314,15 +314,15 @@ bool SceneScriptRC01::ClickedOnActor(int actorId) {
if (Actor_Query_Goal_Number(kActorOfficerLeary) == kGoalOfficerLearyRC01WalkToCrowd) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDefault);
}
- if (Game_Flag_Query(kFlagGotOfficersStatement)) {
+ if (Game_Flag_Query(kFlagRC01GotOfficersStatement)) {
Actor_Says(kActorMcCoy, 4535, 13);
- Game_Flag_Set(KFlagMcCoyAndOfficerLearyTalking);
+ Game_Flag_Set(kFlagRC01McCoyAndOfficerLearyTalking);
if (Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewA) && !Actor_Clue_Query(kActorMcCoy, kClueCrowdInterviewA)) {
Actor_Face_Object(kActorOfficerLeary, "70_1", true);
Actor_Says(kActorOfficerLeary, 100, 15);
Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true);
Actor_Clue_Acquire(kActorMcCoy, kClueCrowdInterviewA, true, kActorOfficerLeary);
- Game_Flag_Reset(KFlagMcCoyAndOfficerLearyTalking);
+ Game_Flag_Reset(kFlagRC01McCoyAndOfficerLearyTalking);
} else if (Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewB) && !Actor_Clue_Query(kActorMcCoy, kClueCrowdInterviewB)) {
Actor_Face_Object(kActorOfficerLeary, "70_5", true);
Actor_Says(kActorOfficerLeary, 120, 19);
@@ -330,24 +330,24 @@ bool SceneScriptRC01::ClickedOnActor(int actorId) {
Actor_Says(kActorOfficerLeary, 130, 14);
I_Sez("JM: Did it have a huge, ugly piece of chrome on it?");
Actor_Clue_Acquire(kActorMcCoy, kClueCrowdInterviewB, true, kActorOfficerLeary);
- Game_Flag_Reset(KFlagMcCoyAndOfficerLearyTalking);
+ Game_Flag_Reset(kFlagRC01McCoyAndOfficerLearyTalking);
} else {
Actor_Says(kActorOfficerLeary, 90, 16);
I_Sez("JM: This officer has a talent for vivid metaphors.");
- if (!Game_Flag_Query(KFlagMcCoyAndOfficerLearyArtMetaphor)) {
+ if (!Game_Flag_Query(kFlagRC01McCoyAndOfficerLearyArtMetaphor)) {
I_Sez("DL: What is that supposed to mean? I didn't write this line...");
Actor_Says(kActorMcCoy, 4540, 16);
- Game_Flag_Set(KFlagMcCoyAndOfficerLearyArtMetaphor);
+ Game_Flag_Set(kFlagRC01McCoyAndOfficerLearyArtMetaphor);
}
- Game_Flag_Reset(KFlagMcCoyAndOfficerLearyTalking);
+ Game_Flag_Reset(kFlagRC01McCoyAndOfficerLearyTalking);
}
} else {
I_Sez("MG: Hey, leave that officer alone. Can't you see he's busy?");
I_Sez("JM: (...mmm, donuts...)");
- Game_Flag_Set(kFlagGotOfficersStatement);
+ Game_Flag_Set(kFlagRC01GotOfficersStatement);
Actor_Clue_Acquire(kActorMcCoy, kClueOfficersStatement, true, kActorOfficerLeary);
Actor_Says(kActorMcCoy, 4515, 13);
- Game_Flag_Set(KFlagMcCoyAndOfficerLearyTalking);
+ Game_Flag_Set(kFlagRC01McCoyAndOfficerLearyTalking);
Actor_Says(kActorOfficerLeary, 40, 13);
if (!Game_Flag_Query(kFlagRC02Entered)) {
Actor_Says(kActorOfficerLeary, 50, 14);
@@ -359,7 +359,7 @@ bool SceneScriptRC01::ClickedOnActor(int actorId) {
Actor_Says(kActorOfficerLeary, 80, 18);
Actor_Says(kActorMcCoy, 4530, 15);
}
- Game_Flag_Reset(KFlagMcCoyAndOfficerLearyTalking);
+ Game_Flag_Reset(kFlagRC01McCoyAndOfficerLearyTalking);
}
}
return true;
@@ -375,7 +375,7 @@ bool SceneScriptRC01::ClickedOnItem(int itemId, bool a2) {
Actor_Clue_Acquire(kActorMcCoy, kClueChromeDebris, true, -1);
Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true);
Actor_Says(kActorOfficerLeary, 20, 12);
- Game_Flag_Set(kFlagChromeDebrisTaken);
+ Game_Flag_Set(kFlagRC01ChromeDebrisTaken);
Item_Remove_From_World(kItemChromeDebris);
Item_Pickup_Spin_Effect(938, 426, 316);
I_Sez("JM: Chrome...is that what that is?");
@@ -395,7 +395,7 @@ bool SceneScriptRC01::ClickedOnItem(int itemId, bool a2) {
void SceneScriptRC01::walkToCenter() {
Player_Loses_Control();
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, true);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -151.98f, -0.3f, 318.15f, 0, 0, false, 0);
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, false);
@@ -426,6 +426,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == kRC01ExitSpinner) {
if (Game_Flag_Query(kFlagDNARowAvailable)) {
Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationDNARow, true);
@@ -447,10 +448,10 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
}
Actor_Set_Immunity_To_Obstacles(kActorMcCoy, false);
Player_Gains_Control();
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
int spinnerDest;
if (Game_Flag_Query(kFlagRC01PoliceDone)) {
spinnerDest = Spinner_Interface_Choose_Dest(kRC01LoopDoorAnimNoCrowd, true);
@@ -460,7 +461,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
switch (spinnerDest) {
case kSpinnerDestinationPoliceStation:
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Reset(kFlagSpinnerAtRC01);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
@@ -471,7 +472,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
}
break;
case kSpinnerDestinationMcCoysApartment:
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Game_Flag_Reset(kFlagSpinnerAtRC01);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
@@ -482,7 +483,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
}
break;
case kSpinnerDestinationChinatown:
- Game_Flag_Set(kFlagMcCoyAtCTxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagSpinnerAtRC01);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
@@ -493,7 +494,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
}
break;
case kSpinnerDestinationTyrellBuilding:
- Game_Flag_Set(kFlagMcCoyAtTBxx);
+ Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagSpinnerAtRC01);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
@@ -504,7 +505,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
}
break;
case kSpinnerDestinationAnimoidRow:
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Game_Flag_Reset(kFlagSpinnerAtRC01);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
@@ -515,7 +516,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
}
break;
case kSpinnerDestinationDNARow:
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagSpinnerAtRC01);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
@@ -526,7 +527,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
}
break;
case kSpinnerDestinationBradburyBuilding:
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Game_Flag_Reset(kFlagSpinnerAtRC01);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
@@ -537,7 +538,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
}
break;
case kSpinnerDestinationNightclubRow:
- Game_Flag_Set(kFlagMcCoyAtNRxx);
+ Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Reset(kFlagSpinnerAtRC01);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
@@ -548,7 +549,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
}
break;
case kSpinnerDestinationHysteriaHall:
- Game_Flag_Set(kFlagMcCoyAtHFxx);
+ Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtRC01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
@@ -565,6 +566,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == kRC01ExitRC03) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -471.98f, -0.3f, 258.15f, 4, true, false, 0)) {
Game_Flag_Set(kFlagRC01toRC03);
@@ -645,11 +647,13 @@ void SceneScriptRC01::PlayerWalkedIn() {
Player_Gains_Control();
Game_Flag_Reset(kFlagRC02toRC01);
- if (Game_Flag_Query(kFlagRC02Entered) && !Game_Flag_Query(kFlagRC02FirstLeave)) {
+ if ( Game_Flag_Query(kFlagRC02Entered)
+ && !Game_Flag_Query(kFlagRC02Left)
+ ) {
Actor_Voice_Over(1910, kActorVoiceOver);
Actor_Voice_Over(1920, kActorVoiceOver);
Actor_Voice_Over(1930, kActorVoiceOver);
- Game_Flag_Set(kFlagRC02FirstLeave);
+ Game_Flag_Set(kFlagRC02Left);
}
//return true;
}
diff --git a/engines/bladerunner/script/scene/rc02.cpp b/engines/bladerunner/script/scene/rc02.cpp
index a5ad0ab591..a84fe99bcf 100644
--- a/engines/bladerunner/script/scene/rc02.cpp
+++ b/engines/bladerunner/script/scene/rc02.cpp
@@ -84,7 +84,7 @@ void SceneScriptRC02::SceneLoaded() {
if (Actor_Clue_Query(kActorMcCoy, kClueRuncitersVideo) || Global_Variable_Query(kVariableChapter) > 1) {
Unclickable_Object("SCRTY CA03");
}
- if (!Game_Flag_Query(kFlagShellCasingsTaken)) {
+ if (!Game_Flag_Query(kFlagRC02ShellCasingsTaken)) {
Item_Add_To_World(kItemShellCasingA, 966, kSetRC02_RC51, -52.88f, -1238.89f, 108467.74f, 256, 6, 6, false, true, false, true);
Item_Add_To_World(kItemShellCasingB, 966, kSetRC02_RC51, -37.16f, -1238.89f, 108456.59f, 512, 6, 6, false, true, false, true);
Item_Add_To_World(kItemShellCasingC, 966, kSetRC02_RC51, -62.86f, -1238.89f, 108437.52f, 625, 6, 6, false, true, false, true);
@@ -259,7 +259,7 @@ bool SceneScriptRC02::ClickedOnActor(int actorId) {
AI_Movement_Track_Pause(kActorRunciter);
Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorRunciter, 48, true, false);
Actor_Face_Actor(kActorMcCoy, kActorRunciter, true);
- if (!Game_Flag_Query(kFlagRunciterInterviewA)) {
+ if (!Game_Flag_Query(kFlagRC02RunciterInterview)) {
Actor_Says(kActorMcCoy, 4560, 13);
Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
Actor_Says(kActorRunciter, 40, 16);
@@ -268,7 +268,7 @@ bool SceneScriptRC02::ClickedOnActor(int actorId) {
Actor_Says(kActorRunciter, 60, 14);
Actor_Says(kActorMcCoy, 4570, 18);
Actor_Says(kActorRunciter, 70, 13);
- Game_Flag_Set(kFlagRunciterInterviewA);
+ Game_Flag_Set(kFlagRC02RunciterInterview);
Actor_Clue_Acquire(kActorMcCoy, kClueRunciterInterviewA, true, kActorRunciter);
AI_Movement_Track_Unpause(kActorRunciter);
return true;
@@ -321,7 +321,7 @@ bool SceneScriptRC02::ClickedOnItem(int itemId, bool a2) {
if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemShellCasingA, 24, true, false)) {
Actor_Face_Item(kActorMcCoy, kItemShellCasingA, true);
Actor_Clue_Acquire(kActorMcCoy, kClueShellCasings, true, -1);
- Game_Flag_Set(kFlagShellCasingsTaken);
+ Game_Flag_Set(kFlagRC02ShellCasingsTaken);
Item_Remove_From_World(kItemShellCasingA);
Item_Remove_From_World(kItemShellCasingB);
Item_Remove_From_World(kItemShellCasingC);
@@ -384,7 +384,7 @@ void SceneScriptRC02::PlayerWalkedIn() {
if (Actor_Query_Which_Set_In(kActorRunciter) == kSetRC02_RC51
&& Actor_Query_Goal_Number(kActorRunciter) < kGoalRunciterAtShop
) {
- Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterWalkAround);
+ Actor_Set_Goal_Number(kActorRunciter, kGoalRunciterWalkAroundRC02);
}
if ( Actor_Query_Goal_Number(kActorRunciter) == kGoalRunciterAtShop
&& !Game_Flag_Query(704)
diff --git a/engines/bladerunner/script/scene/rc03.cpp b/engines/bladerunner/script/scene/rc03.cpp
index 8668be8045..28fbe7c870 100644
--- a/engines/bladerunner/script/scene/rc03.cpp
+++ b/engines/bladerunner/script/scene/rc03.cpp
@@ -147,7 +147,7 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
}
Game_Flag_Set(kFlagRC03toRC01);
Set_Enter(kSetRC01, kSceneRC01);
- Actor_Set_Goal_Number(kActorDektora, 100);
+ Actor_Set_Goal_Number(kActorDektora, kGoalDektoraStartWalkingAround);
}
return true;
}
@@ -157,8 +157,8 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
Game_Flag_Set(kFlagRC04Locked);
}
Game_Flag_Set(kFlagRC03toAR02);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Set_Enter(kSetAR01_AR02, kSceneAR02);
}
return true;
@@ -166,26 +166,26 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) {
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 147.51f, -4.0f, 166.48f, 0, true, false, 0)) {
Game_Flag_Set(kFlagRC03toUG01);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Set(kFlagMcCoyAtUGxx);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Set(kFlagMcCoyInUnderground);
if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
Game_Flag_Set(kFlagRC04Locked);
}
Set_Enter(kSetUG01, kSceneUG01);
- Actor_Set_Goal_Number(kActorDektora, 100);
+ Actor_Set_Goal_Number(kActorDektora, kGoalDektoraStartWalkingAround);
}
return true;
}
if (exitId == 3) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -487.0f, 1.0f, 116.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagRC03toHC04);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Set(kFlagMcCoyAtHCxx);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Set(kFlagMcCoyInHawkersCircle);
if (Game_Flag_Query(kFlagRC04McCoyShotBob)) {
Game_Flag_Set(kFlagRC04Locked);
}
Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC04);
- Actor_Set_Goal_Number(kActorDektora, 100);
+ Actor_Set_Goal_Number(kActorDektora, kGoalDektoraStartWalkingAround);
}
return true;
}
@@ -297,7 +297,7 @@ void SceneScriptRC03::PlayerWalkedIn() {
if (Global_Variable_Query(kVariableChapter) == 1
|| Global_Variable_Query(kVariableChapter) == 2
) {
- Actor_Set_Goal_Number(kActorDektora, 103);
+ Actor_Set_Goal_Number(kActorDektora, kGoalDektoraStopWalkingAround);
}
}
diff --git a/engines/bladerunner/script/scene/rc51.cpp b/engines/bladerunner/script/scene/rc51.cpp
index 47b243d12b..f8e30f0de0 100644
--- a/engines/bladerunner/script/scene/rc51.cpp
+++ b/engines/bladerunner/script/scene/rc51.cpp
@@ -47,13 +47,13 @@ void SceneScriptRC51::SceneLoaded() {
Unclickable_Object("GRL_DSK");
Unclickable_Object("GRL_DSKLEG");
Unclickable_Object("CURTAIN");
- if (!Game_Flag_Query(kFlagChopstickWrapperTaken)) {
+ if (!Game_Flag_Query(kFlagRC51ChopstickWrapperTaken)) {
Item_Add_To_World(kItemChopstickWrapper, 937, kSetRC02_RC51, 47.56f, -1238.89f, 108048.61f, 0, 6, 18, false, true, false, true);
}
- if (!Game_Flag_Query(kFlagCandyTaken)) {
+ if (!Game_Flag_Query(kFlagRC51CandyTaken)) {
Item_Add_To_World(kItemCandy, 933, kSetRC02_RC51, 67.28f, -1193.38f, 108011.27f, 0, 6, 6, false, true, false, true);
}
- if (!Game_Flag_Query(kFlagToyDogTaken)) {
+ if (!Game_Flag_Query(kFlagRC51ToyDogTaken)) {
Item_Add_To_World(kItemToyDog, 971, kSetRC02_RC51, -69.65f, -1238.89f, 107995.24f, 256, 18, 18, false, true, false, true);
}
}
@@ -83,7 +83,7 @@ bool SceneScriptRC51::ClickedOnItem(int itemId, bool a2) {
Item_Remove_From_World(kItemChopstickWrapper);
Item_Pickup_Spin_Effect(937, 437, 407);
Actor_Voice_Over(2010, kActorVoiceOver);
- Game_Flag_Set(kFlagChopstickWrapperTaken);
+ Game_Flag_Set(kFlagRC51ChopstickWrapperTaken);
return true;
}
}
@@ -96,7 +96,7 @@ bool SceneScriptRC51::ClickedOnItem(int itemId, bool a2) {
Item_Pickup_Spin_Effect(933, 445, 230);
Actor_Says(kActorMcCoy, 8735, 3);
Actor_Says(kActorMcCoy, 8529, 3);
- Game_Flag_Set(kFlagCandyTaken);
+ Game_Flag_Set(kFlagRC51CandyTaken);
return true;
}
}
@@ -109,7 +109,7 @@ bool SceneScriptRC51::ClickedOnItem(int itemId, bool a2) {
Item_Pickup_Spin_Effect(971, 55, 376);
Actor_Says(kActorMcCoy, 8525, 3);
Actor_Says(kActorMcCoy, 8740, 3);
- Game_Flag_Set(kFlagToyDogTaken);
+ Game_Flag_Set(kFlagRC51ToyDogTaken);
return true;
}
}
diff --git a/engines/bladerunner/script/scene/tb02.cpp b/engines/bladerunner/script/scene/tb02.cpp
index ac6f613d59..d82ef220d4 100644
--- a/engines/bladerunner/script/scene/tb02.cpp
+++ b/engines/bladerunner/script/scene/tb02.cpp
@@ -194,71 +194,71 @@ bool SceneScriptTB02::ClickedOnExit(int exitId) {
if (Actor_Query_Goal_Number(kActorTyrellGuard) == 300) {
Actor_Set_Goal_Number(kActorTyrellGuard, 301);
} else {
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
- Game_Flag_Reset(kFlagMcCoyAtBBxx);
- Game_Flag_Reset(kFlagMcCoyAtHFxx);
- Game_Flag_Reset(kFlagMcCoyAtTBxx);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
+ Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
+ Game_Flag_Reset(kFlagMcCoyInHysteriaHall);
+ Game_Flag_Reset(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagTB02ElevatorToTB05);
switch (Spinner_Interface_Choose_Dest(-1, false)) {
case kSpinnerDestinationPoliceStation:
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
break;
case kSpinnerDestinationMcCoysApartment:
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
break;
case kSpinnerDestinationRuncitersAnimals:
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
break;
case kSpinnerDestinationChinatown:
- Game_Flag_Set(kFlagMcCoyAtCTxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
break;
case kSpinnerDestinationAnimoidRow:
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
break;
case kSpinnerDestinationDNARow:
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
break;
case kSpinnerDestinationBradburyBuilding:
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
break;
case kSpinnerDestinationNightclubRow:
- Game_Flag_Set(kFlagMcCoyAtNRxx);
+ Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
break;
case kSpinnerDestinationHysteriaHall:
- Game_Flag_Set(kFlagMcCoyAtHFxx);
+ Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
break;
default:
- Game_Flag_Set(kFlagMcCoyAtTBxx);
+ Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
break;
}
}
diff --git a/engines/bladerunner/script/scene/tb07.cpp b/engines/bladerunner/script/scene/tb07.cpp
index 145aa45c77..cc14203864 100644
--- a/engines/bladerunner/script/scene/tb07.cpp
+++ b/engines/bladerunner/script/scene/tb07.cpp
@@ -24,9 +24,17 @@
namespace BladeRunner {
+enum kTB07Loops {
+ kTB07LoopMain = 0,
+ kTB07LoopShadeDrop = 2,
+ kTB07LoopMainShadeDown = 3
+};
+
void SceneScriptTB07::InitializeScene() {
Setup_Scene_Information(68.0f, 12.0f, 288.0f, 0);
+
Scene_Exit_Add_2D_Exit(0, 383, 445, 639, 479, 2);
+
Ambient_Sounds_Add_Looping_Sound(109, 20, 0, 1);
Ambient_Sounds_Add_Sound(363, 2, 55, 14, 14, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(364, 2, 55, 14, 14, -100, 100, -101, -101, 0, 0);
@@ -37,13 +45,16 @@ void SceneScriptTB07::InitializeScene() {
Ambient_Sounds_Add_Sound(214, 1, 20, 20, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(215, 1, 15, 20, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(216, 1, 15, 20, 25, -100, 100, -101, -101, 0, 0);
- if (Global_Variable_Query(kVariableChapter) == 4 && !Actor_Clue_Query(kActorMcCoy, kClueDNATyrell)) {
- Item_Add_To_World(83, 941, 18, 9.7f, 48.7f, -174.22f, 0, 12, 12, false, true, false, true);
+
+ if ( Global_Variable_Query(kVariableChapter) == 4
+ && !Actor_Clue_Query(kActorMcCoy, kClueDNATyrell)
+ ) {
+ Item_Add_To_World(83, 941, kSetTB07, 9.7f, 48.7f, -174.22f, 0, 12, 12, false, true, false, true);
}
- if (Game_Flag_Query(661)) {
- Scene_Loop_Set_Default(3);
+ if (Game_Flag_Query(kFlagTB07ShadeDown)) {
+ Scene_Loop_Set_Default(kTB07LoopMainShadeDown);
} else {
- Scene_Loop_Set_Default(0);
+ Scene_Loop_Set_Default(kTB07LoopMain);
}
}
@@ -85,71 +96,71 @@ bool SceneScriptTB07::ClickedOnExit(int exitId) {
Game_Flag_Set(kFlagTB07toTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
} else {
- Game_Flag_Reset(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtRCxx);
- Game_Flag_Reset(kFlagMcCoyAtMAxx);
- Game_Flag_Reset(kFlagMcCoyAtPSxx);
- Game_Flag_Reset(kFlagMcCoyAtBBxx);
- Game_Flag_Reset(kFlagMcCoyAtHFxx);
- Game_Flag_Reset(kFlagMcCoyAtTBxx);
+ Game_Flag_Reset(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInRunciters);
+ Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
+ Game_Flag_Reset(kFlagMcCoyInPoliceStation);
+ Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
+ Game_Flag_Reset(kFlagMcCoyInHysteriaHall);
+ Game_Flag_Reset(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagTB02ElevatorToTB05);
switch (Spinner_Interface_Choose_Dest(-1, false)) {
case kSpinnerDestinationPoliceStation:
- Game_Flag_Set(kFlagMcCoyAtPSxx);
+ Game_Flag_Set(kFlagMcCoyInPoliceStation);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
break;
case kSpinnerDestinationMcCoysApartment:
- Game_Flag_Set(kFlagMcCoyAtMAxx);
+ Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
break;
case kSpinnerDestinationRuncitersAnimals:
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
break;
case kSpinnerDestinationChinatown:
- Game_Flag_Set(kFlagMcCoyAtCTxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
break;
case kSpinnerDestinationAnimoidRow:
- Game_Flag_Set(kFlagMcCoyAtARxx);
+ Game_Flag_Set(kFlagMcCoyInAnimoidRow);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
break;
case kSpinnerDestinationDNARow:
- Game_Flag_Set(kFlagMcCoyAtDRxx);
+ Game_Flag_Set(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
break;
case kSpinnerDestinationBradburyBuilding:
- Game_Flag_Set(kFlagMcCoyAtBBxx);
+ Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
break;
case kSpinnerDestinationNightclubRow:
- Game_Flag_Set(kFlagMcCoyAtNRxx);
+ Game_Flag_Set(kFlagMcCoyInNightclubRow);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtNR01);
Set_Enter(kSetNR01, kSceneNR01);
break;
case kSpinnerDestinationHysteriaHall:
- Game_Flag_Set(kFlagMcCoyAtHFxx);
+ Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtTB02);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
break;
default:
- Game_Flag_Set(kFlagMcCoyAtTBxx);
+ Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 44.0f, 12.0f, 176.0f, 0, false, false, 0);
break;
}
@@ -175,11 +186,15 @@ void SceneScriptTB07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptTB07::PlayerWalkedIn() {
- int v0 = Global_Variable_Query(kVariableChapter);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 44.0f, 12.0f, 176.0f, 0, 0, false, 0);
- if ((v0 == 2 || v0 == 3) && !Game_Flag_Query(612)) {
+ int chapter = Global_Variable_Query(kVariableChapter);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 44.0f, 12.0f, 176.0f, 0, false, false, 0);
+ if ((chapter == 2
+ || chapter == 3
+ )
+ && !Game_Flag_Query(kFlagTB07RachaelTalk)
+ ) {
Player_Set_Combat_Mode(false);
- sub_401B0C();
+ McCoyTalkWithRachaelAndTyrell();
}
}
@@ -189,17 +204,17 @@ void SceneScriptTB07::PlayerWalkedOut() {
void SceneScriptTB07::DialogueQueueFlushed(int a1) {
}
-void SceneScriptTB07::sub_401B0C() {
- Game_Flag_Set(612);
+void SceneScriptTB07::McCoyTalkWithRachaelAndTyrell() {
+ Game_Flag_Set(kFlagTB07RachaelTalk);
Delay(1500);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 44.98f, 12.0f, 49.79f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 44.98f, 12.0f, 49.79f, 0, false, false, 0);
Actor_Face_Heading(kActorMcCoy, 178, true);
Delay(3000);
Actor_Put_In_Set(kActorRachael, kSetTB07);
Actor_Set_At_XYZ(kActorRachael, -260.15f, 12.0f, -19.16f, 256);
Actor_Change_Animation_Mode(kActorRachael, 0);
Outtake_Play(kOuttakeRachel, true, -1);
- Loop_Actor_Walk_To_XYZ(kActorRachael, -146.15f, 12.0f, -5.84f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorRachael, -146.15f, 12.0f, -5.84f, 0, false, false, 0);
Actor_Face_Actor(kActorRachael, kActorMcCoy, true);
Actor_Says(kActorRachael, 480, 14);
Actor_Face_Actor(kActorMcCoy, kActorRachael, true);
@@ -209,7 +224,7 @@ void SceneScriptTB07::sub_401B0C() {
Actor_Says(kActorMcCoy, 5320, 15);
Actor_Says_With_Pause(kActorMcCoy, 5325, 1.0f, 19);
Actor_Start_Speech_Sample(kActorRachael, 500);
- Loop_Actor_Walk_To_XYZ(kActorRachael, -60.15f, 12.0f, 60.84f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorRachael, -60.15f, 12.0f, 60.84f, 0, false, false, 0);
Actor_Face_Actor(kActorRachael, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorRachael, true);
Actor_Says(kActorMcCoy, 5330, 14);
@@ -218,7 +233,7 @@ void SceneScriptTB07::sub_401B0C() {
Actor_Says(kActorRachael, 520, 17);
Actor_Says(kActorMcCoy, 5340, 3);
Actor_Start_Speech_Sample(kActorRachael, 530);
- Loop_Actor_Walk_To_XYZ(kActorRachael, -4.15f, 12.0f, 54.73f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorRachael, -4.15f, 12.0f, 54.73f, 0, false, false, 0);
Actor_Says(kActorRachael, 540, 16);
Actor_Says(kActorMcCoy, 5345, 18);
Actor_Says(kActorRachael, 550, 13);
@@ -231,7 +246,7 @@ void SceneScriptTB07::sub_401B0C() {
Actor_Says(kActorMcCoy, 5365, 13);
Actor_Says_With_Pause(kActorRachael, 600, 1.0f, 12);
Actor_Says(kActorMcCoy, 5370, 3);
- Loop_Actor_Walk_To_XYZ(kActorRachael, -24.15f, 12.0f, -10.84f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorRachael, -24.15f, 12.0f, -10.84f, 0, false, false, 0);
Actor_Says(kActorRachael, 610, 13);
Actor_Face_Actor(kActorMcCoy, kActorRachael, true);
Actor_Says(kActorMcCoy, 5375, 18);
@@ -253,10 +268,10 @@ void SceneScriptTB07::sub_401B0C() {
Actor_Put_In_Set(kActorTyrell, kSetTB07);
Actor_Set_At_XYZ(kActorTyrell, 68.0f, 12.0f, 288.0f, 0);
Actor_Change_Animation_Mode(kActorTyrell, 0);
- Scene_Loop_Set_Default(3);
- Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, false);
+ Scene_Loop_Set_Default(kTB07LoopMainShadeDown);
+ Scene_Loop_Start_Special(kSceneLoopModeOnce, kTB07LoopShadeDrop, false);
Actor_Start_Speech_Sample(kActorTyrell, 0);
- Loop_Actor_Walk_To_XYZ(kActorTyrell, 44.0f, 12.0f, 176.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorTyrell, 44.0f, 12.0f, 176.0f, 0, false, false, 0);
Actor_Face_Actor(kActorTyrell, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorTyrell, true);
Actor_Face_Actor(kActorRachael, kActorTyrell, true);
@@ -267,7 +282,7 @@ void SceneScriptTB07::sub_401B0C() {
Actor_Set_Goal_Number(kActorRachael, 200);
Actor_Says(kActorTyrell, 40, 15);
Actor_Start_Speech_Sample(kActorTyrell, 50);
- Loop_Actor_Walk_To_XYZ(kActorTyrell, -10.0f, 12.0f, 100.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorTyrell, -10.0f, 12.0f, 100.0f, 0, false, false, 0);
Actor_Face_Actor(kActorTyrell, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorTyrell, true);
Actor_Says(kActorMcCoy, 5430, 17);
@@ -284,7 +299,7 @@ void SceneScriptTB07::sub_401B0C() {
Actor_Says(kActorTyrell, 100, 14);
Actor_Clue_Acquire(kActorMcCoy, kClueRachaelInterview, false, kActorRachael);
Actor_Clue_Acquire(kActorMcCoy, kClueTyrellInterview, false, kActorTyrell);
- Loop_Actor_Walk_To_XYZ(kActorTyrell, -260.15f, 12.0f, -19.16f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorTyrell, -260.15f, 12.0f, -19.16f, 0, false, false, 0);
}
} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/scene/ug01.cpp b/engines/bladerunner/script/scene/ug01.cpp
index 98e79a5c2e..f1c11fe620 100644
--- a/engines/bladerunner/script/scene/ug01.cpp
+++ b/engines/bladerunner/script/scene/ug01.cpp
@@ -115,8 +115,8 @@ bool SceneScriptUG01::ClickedOnExit(int exitId) {
Actor_Face_Heading(kActorMcCoy, 768, false);
Loop_Actor_Travel_Ladder(kActorMcCoy, 12, true, 0);
Game_Flag_Set(kFlagUG01toRC03);
- Game_Flag_Reset(kFlagMcCoyAtUGxx);
- Game_Flag_Set(kFlagMcCoyAtRCxx);
+ Game_Flag_Reset(kFlagMcCoyInUnderground);
+ Game_Flag_Set(kFlagMcCoyInRunciters);
Set_Enter(kSetRC03, kSceneRC03);
}
return true;
diff --git a/engines/bladerunner/script/scene/ug02.cpp b/engines/bladerunner/script/scene/ug02.cpp
index ccea89a41e..5ac3fad135 100644
--- a/engines/bladerunner/script/scene/ug02.cpp
+++ b/engines/bladerunner/script/scene/ug02.cpp
@@ -68,7 +68,7 @@ void SceneScriptUG02::SceneLoaded() {
Footstep_Sounds_Set(0, 0);
Footstep_Sounds_Set(8, 2);
- if (!Game_Flag_Query(kFlagRagiationGooglesTaken)
+ if (!Game_Flag_Query(kFlagUG02RagiationGooglesTaken)
&& Game_Flag_Query(kFlagIzoIsReplicant)
) {
Item_Add_To_World(kItemRadiationGoogles, 963, kSetUG02, -300.37f, 120.16f, -81.31f, 0, 8, 8, false, true, false, true);
@@ -153,7 +153,7 @@ bool SceneScriptUG02::ClickedOnItem(int itemId, bool a2) {
if (itemId == kItemRadiationGoogles) {
Actor_Face_Item(kActorMcCoy, kItemRadiationGoogles, true);
Actor_Clue_Acquire(kActorMcCoy, kClueRadiationGoggles, true, -1);
- Game_Flag_Set(kFlagRagiationGooglesTaken);
+ Game_Flag_Set(kFlagUG02RagiationGooglesTaken);
Item_Remove_From_World(kItemRadiationGoogles);
Item_Pickup_Spin_Effect(963, 426, 316);
return true;
@@ -192,12 +192,12 @@ bool SceneScriptUG02::ClickedOnExit(int exitId) {
Actor_Face_Heading(kActorMcCoy, 14, false);
Loop_Actor_Travel_Ladder(kActorMcCoy, 9, true, 0);
Game_Flag_Set(kFlagUG02toHC03);
- Game_Flag_Reset(kFlagMcCoyAtUGxx);
- Game_Flag_Set(kFlagMcCoyAtHCxx);
+ Game_Flag_Reset(kFlagMcCoyInUnderground);
+ Game_Flag_Set(kFlagMcCoyInHawkersCircle);
if (!Game_Flag_Query(kFlagHC03CageOpen)) {
Game_Flag_Set(kFlagHC03TrapDoorOpen);
Game_Flag_Set(kFlagHC03CageOpen);
- Item_Remove_From_World(kItemHC03Lock);
+ Item_Remove_From_World(kItemGreenPawnLock);
}
Set_Enter(kSetHC01_HC02_HC03_HC04, kSceneHC03);
return true;
diff --git a/engines/bladerunner/script/scene/ug03.cpp b/engines/bladerunner/script/scene/ug03.cpp
index c9c88e7fbf..a11e768b0c 100644
--- a/engines/bladerunner/script/scene/ug03.cpp
+++ b/engines/bladerunner/script/scene/ug03.cpp
@@ -25,39 +25,40 @@
namespace BladeRunner {
void SceneScriptUG03::InitializeScene() {
- if (Game_Flag_Query(335)) {
- Setup_Scene_Information(-51.0f, 0.03f, 255.0f, 780);
- Game_Flag_Reset(335);
- } else if (Game_Flag_Query(337)) {
- Setup_Scene_Information(-139.0f, 0.03f, -13.0f, 540);
- Game_Flag_Reset(337);
+ if (Game_Flag_Query(kFlagUG04toUG03)) {
+ Setup_Scene_Information( -51.0f, 0.03f, 255.0f, 780);
+ Game_Flag_Reset(kFlagUG04toUG03);
+ } else if (Game_Flag_Query(kFlagUG10toUG03)) {
+ Setup_Scene_Information( -139.0f, 0.03f, -13.0f, 540);
+ Game_Flag_Reset(kFlagUG10toUG03);
} else {
Setup_Scene_Information(-121.88f, 0.03f, 213.35f, 540);
}
- Scene_Exit_Add_2D_Exit(0, 46, 137, 131, 296, 0);
+ Scene_Exit_Add_2D_Exit(0, 46, 137, 131, 296, 0);
Scene_Exit_Add_2D_Exit(1, 559, 141, 639, 380, 1);
+
Ambient_Sounds_Add_Looping_Sound(331, 15, 0, 1);
Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1);
Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1);
- Ambient_Sounds_Add_Sound(402, 2, 120, 10, 11, 0, 100, 0, 100, 0, 0);
- Ambient_Sounds_Add_Sound(370, 2, 120, 10, 11, 0, 100, 0, 100, 0, 0);
- Ambient_Sounds_Add_Sound(396, 2, 120, 10, 11, 0, 100, 0, 100, 0, 0);
- Ambient_Sounds_Add_Sound(395, 2, 120, 10, 11, 0, 100, 0, 100, 0, 0);
- Ambient_Sounds_Add_Sound(234, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(235, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(391, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(392, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(393, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(394, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(224, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(225, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(226, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(227, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(228, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(402, 2, 120, 10, 11, 0, 100, 0, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(370, 2, 120, 10, 11, 0, 100, 0, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(396, 2, 120, 10, 11, 0, 100, 0, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(395, 2, 120, 10, 11, 0, 100, 0, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(234, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(235, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(391, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(392, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(393, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(394, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(224, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(225, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(226, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(227, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(228, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
}
void SceneScriptUG03::SceneLoaded() {
@@ -75,15 +76,20 @@ bool SceneScriptUG03::MouseClick(int x, int y) {
}
bool SceneScriptUG03::ClickedOn3DObject(const char *objectName, bool a2) {
- if ((Object_Query_Click("CHAIR_BACK", objectName) || Object_Query_Click("CHAIR_SEAT", objectName) || Object_Query_Click("CHAIR_HEADZAPPER", objectName)) && !Loop_Actor_Walk_To_Scene_Object(kActorMcCoy, "CHAIR_BACK", 36, true, false)) {
- Actor_Face_Object(kActorMcCoy, "CHAIR_BACK", true);
- if (!Actor_Clue_Query(kActorMcCoy, kClueScaryChair)) {
- Actor_Voice_Over(2550, kActorVoiceOver);
- Actor_Voice_Over(2560, kActorVoiceOver);
- Actor_Voice_Over(2570, kActorVoiceOver);
- Actor_Voice_Over(2580, kActorVoiceOver);
- Actor_Voice_Over(2590, kActorVoiceOver);
- Actor_Clue_Acquire(kActorMcCoy, kClueScaryChair, true, -1);
+ if (Object_Query_Click("CHAIR_BACK", objectName)
+ || Object_Query_Click("CHAIR_SEAT", objectName)
+ || Object_Query_Click("CHAIR_HEADZAPPER", objectName)
+ ) {
+ if (!Loop_Actor_Walk_To_Scene_Object(kActorMcCoy, "CHAIR_BACK", 36, true, false)) {
+ Actor_Face_Object(kActorMcCoy, "CHAIR_BACK", true);
+ if (!Actor_Clue_Query(kActorMcCoy, kClueScaryChair)) {
+ Actor_Voice_Over(2550, kActorVoiceOver);
+ Actor_Voice_Over(2560, kActorVoiceOver);
+ Actor_Voice_Over(2570, kActorVoiceOver);
+ Actor_Voice_Over(2580, kActorVoiceOver);
+ Actor_Voice_Over(2590, kActorVoiceOver);
+ Actor_Clue_Acquire(kActorMcCoy, kClueScaryChair, true, -1);
+ }
}
}
return false;
@@ -99,23 +105,24 @@ bool SceneScriptUG03::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptUG03::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -139.0f, 0.0f, -13.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -139.0f, 0.0f, -13.0f, 0, true, false, 0)) {
if (Global_Variable_Query(kVariableChapter) < 4) {
Actor_Says(kActorMcCoy, 8522, 14);
} else {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(336);
+ Game_Flag_Set(kFlagUG03toUG10);
Set_Enter(kSetUG10, kSceneUG10);
}
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -51.0f, 0.0f, 255.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -51.0f, 0.0f, 255.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(334);
+ Game_Flag_Set(kFlagUG03toUG04);
Set_Enter(kSetUG04, kSceneUG04);
}
return true;
diff --git a/engines/bladerunner/script/scene/ug04.cpp b/engines/bladerunner/script/scene/ug04.cpp
index 7aa0ad130c..82da71bc61 100644
--- a/engines/bladerunner/script/scene/ug04.cpp
+++ b/engines/bladerunner/script/scene/ug04.cpp
@@ -25,37 +25,40 @@
namespace BladeRunner {
void SceneScriptUG04::InitializeScene() {
- if (Game_Flag_Query(339)) {
- Setup_Scene_Information(0.0f, -1.74f, -2400.0f, 496);
- Game_Flag_Reset(339);
- } else if (Game_Flag_Query(341)) {
- Setup_Scene_Information(164.0f, 11.87f, -1013.0f, 83);
+ if (Game_Flag_Query(kFlagUG05toUG04)) {
+ Setup_Scene_Information( 0.0f, -1.74f, -2400.0f, 496);
+ Game_Flag_Reset(kFlagUG05toUG04);
+ } else if (Game_Flag_Query(kFlagUG06toUG04)) {
+ Setup_Scene_Information( 164.0f, 11.87f, -1013.0f, 83);
} else {
- Setup_Scene_Information(-172.0f, 16.29f, -735.0f, 380);
- Game_Flag_Reset(334);
+ Setup_Scene_Information(-172.0f, 16.29f, -735.0f, 380);
+ Game_Flag_Reset(kFlagUG03toUG04);
}
+
Scene_Exit_Add_2D_Exit(0, 123, 308, 159, 413, 3);
if (Global_Variable_Query(kVariableChapter) > 3) {
Scene_Exit_Add_2D_Exit(1, 256, 333, 290, 373, 0);
}
Scene_Exit_Add_2D_Exit(2, 344, 298, 451, 390, 1);
+
Ambient_Sounds_Add_Looping_Sound(331, 25, 0, 1);
Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1);
Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1);
- Ambient_Sounds_Add_Sound(234, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(224, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(225, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(227, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(368, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(370, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(235, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(392, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(394, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(234, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(224, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(225, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(227, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(368, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(370, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(235, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(392, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(394, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+
Scene_Loop_Start_Special(0, 0, 0);
Scene_Loop_Set_Default(1);
}
@@ -86,22 +89,22 @@ bool SceneScriptUG04::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptUG04::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -172.0f, 16.29f, -735.0f, 0, 1, false, 0)) {
- Game_Flag_Set(335);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -172.0f, 16.29f, -735.0f, 0, true, false, 0)) {
+ Game_Flag_Set(kFlagUG04toUG03);
Set_Enter(kSetUG03, kSceneUG03);
}
return true;
}
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.74f, -2400.0f, 0, 1, false, 0)) {
- Game_Flag_Set(338);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.74f, -2400.0f, 0, true, false, 0)) {
+ Game_Flag_Set(kFlagUG04toUG05);
Set_Enter(kSetUG05, kSceneUG05);
}
return true;
}
if (exitId == 2) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 164.0f, 11.87f, -1013.0f, 0, 1, false, 0)) {
- Game_Flag_Set(340);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 164.0f, 11.87f, -1013.0f, 0, true, false, 0)) {
+ Game_Flag_Set(kFlagUG04toUG06);
Set_Enter(kSetUG06, kSceneUG06);
}
return true;
@@ -123,9 +126,9 @@ void SceneScriptUG04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptUG04::PlayerWalkedIn() {
- if (Game_Flag_Query(341)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 60.0f, -1.74f, -976.0f, 6, 0, false, 0);
- Game_Flag_Reset(341);
+ if (Game_Flag_Query(kFlagUG06toUG04)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 60.0f, -1.74f, -976.0f, 6, false, false, 0);
+ Game_Flag_Reset(kFlagUG06toUG04);
}
}
diff --git a/engines/bladerunner/script/scene/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp
index 3be09c1ee1..324ef08654 100644
--- a/engines/bladerunner/script/scene/ug05.cpp
+++ b/engines/bladerunner/script/scene/ug05.cpp
@@ -25,21 +25,25 @@
namespace BladeRunner {
void SceneScriptUG05::InitializeScene() {
- if (Game_Flag_Query(360)) {
- if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
+ if (Game_Flag_Query(kFlagHF07toUG06)) {
+ if ( Game_Flag_Query(663)
+ && !Game_Flag_Query(368)
+ ) {
Setup_Scene_Information(-356.35f, 132.77f, -1092.36f, 389);
} else {
Setup_Scene_Information(-180.0f, 37.28f, -1124.0f, 296);
}
} else {
Setup_Scene_Information(0.0f, -1.37f, 0.0f, 0);
- Game_Flag_Reset(338);
+ Game_Flag_Reset(kFlagUG04toUG05);
}
Scene_Exit_Add_2D_Exit(0, 215, 240, 254, 331, 3);
if (!Game_Flag_Query(663)) {
Scene_Exit_Add_2D_Exit(1, 303, 422, 639, 479, 2);
}
- if (!Game_Flag_Query(663) || Game_Flag_Query(368)) {
+ if (!Game_Flag_Query(663)
+ || Game_Flag_Query(368)
+ ) {
Scene_Exit_Add_2D_Exit(2, 352, 256, 393, 344, 0);
}
Ambient_Sounds_Add_Looping_Sound(105, 28, 0, 1);
@@ -115,19 +119,19 @@ bool SceneScriptUG05::ClickedOnExit(int exitId) {
if (exitId == 0) {
if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -356.35f, 132.77f, -1092.36f, 0, 0, false, 0);
- Game_Flag_Set(361);
+ Game_Flag_Set(kFlagUG06toHF07);
Set_Enter(kSetHF07, kSceneHF07);
} else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -156.72f, 3.03f, -1118.17f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 760, false);
Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, kAnimationModeIdle);
- Game_Flag_Set(361);
+ Game_Flag_Set(kFlagUG06toHF07);
Set_Enter(kSetHF07, kSceneHF07);
}
return true;
}
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 4.0f, -11.67f, -4.0f, 0, 1, false, 0)) {
- Game_Flag_Set(339);
+ Game_Flag_Set(kFlagUG05toUG04);
Set_Enter(kSetUG04, kSceneUG04);
}
return true;
@@ -200,7 +204,7 @@ void SceneScriptUG05::PlayerWalkedIn() {
}
}
}
- if (Game_Flag_Query(360)) {
+ if (Game_Flag_Query(kFlagHF07toUG06)) {
if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -288.35f, 132.77f, -1092.36f, 0, 1, false, 0);
} else {
@@ -210,7 +214,7 @@ void SceneScriptUG05::PlayerWalkedIn() {
if (Game_Flag_Query(663)) {
Game_Flag_Query(368); // bug in game?
}
- Game_Flag_Reset(360);
+ Game_Flag_Reset(kFlagHF07toUG06);
}
void SceneScriptUG05::PlayerWalkedOut() {
diff --git a/engines/bladerunner/script/scene/ug06.cpp b/engines/bladerunner/script/scene/ug06.cpp
index 8c93eb7eaa..a979c9dd0f 100644
--- a/engines/bladerunner/script/scene/ug06.cpp
+++ b/engines/bladerunner/script/scene/ug06.cpp
@@ -36,33 +36,35 @@ void SceneScriptUG06::InitializeScene() {
}
Game_Flag_Reset(680);
}
- if (Game_Flag_Query(340)) {
- Setup_Scene_Information(23.0f, 0.0f, 321.0f, 0);
- } else if (Game_Flag_Query(343)) {
- Setup_Scene_Information(66.0f, 153.0f, -301.4f, 512);
+
+ if (Game_Flag_Query(kFlagUG04toUG06)) {
+ Setup_Scene_Information( 23.0f, 0.0f, 321.0f, 0);
+ } else if (Game_Flag_Query(kFlagNR01toUG06)) {
+ Setup_Scene_Information( 66.0f, 153.0f, -301.4f, 512);
} else {
- Setup_Scene_Information(-165.0f, 1.0f, 89.0f, 990);
+ Setup_Scene_Information(-165.0f, 1.0f, 89.0f, 990);
}
- 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, 294, 68, 544, 236, 0);
+
Ambient_Sounds_Add_Looping_Sound(288, 18, 0, 1);
Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1);
Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1);
- Ambient_Sounds_Add_Sound(234, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(235, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(392, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(394, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(225, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(227, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(228, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(234, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(235, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(392, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(394, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(225, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(227, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(228, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(229, 2, 190, 12, 16, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
}
void SceneScriptUG06::SceneLoaded() {
@@ -91,22 +93,23 @@ bool SceneScriptUG06::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptUG06::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.0f, 0.0f, 321.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.0f, 0.0f, 321.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(341);
+ Game_Flag_Set(kFlagUG06toUG04);
Set_Enter(kSetUG04, kSceneUG04);
}
return true;
}
+
if (exitId == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 66.0f, 0.0f, -90.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 66.0f, 0.0f, -90.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 0, false);
Loop_Actor_Travel_Stairs(kActorMcCoy, 17, 1, kAnimationModeIdle);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 66.0f, 153.0f, -446.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 66.0f, 153.0f, -446.0f, 0, false, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(342);
+ Game_Flag_Set(kFlagUG06toNR01);
Set_Enter(kSetNR01, kSceneNR01);
}
return true;
@@ -125,16 +128,18 @@ void SceneScriptUG06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptUG06::PlayerWalkedIn() {
- if (Game_Flag_Query(340)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.0f, 0.0f, 273.0f, 0, 0, false, 0);
- Game_Flag_Reset(340);
+ if (Game_Flag_Query(kFlagUG04toUG06)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 23.0f, 0.0f, 273.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagUG04toUG06);
}
- if (Game_Flag_Query(343)) {
- Loop_Actor_Travel_Stairs(kActorMcCoy, 17, 0, kAnimationModeIdle);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 66.0f, 0.0f, -36.91f, 0, 0, false, 0);
- Game_Flag_Reset(343);
+ if (Game_Flag_Query(kFlagNR01toUG06)) {
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 17, false, kAnimationModeIdle);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 66.0f, 0.0f, -36.91f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagNR01toUG06);
}
- if (Global_Variable_Query(kVariableChapter) == 4 && !Game_Flag_Query(524)) {
+ if ( Global_Variable_Query(kVariableChapter) == 4
+ && !Game_Flag_Query(524)
+ ) {
Player_Loses_Control();
Actor_Voice_Over(2620, kActorVoiceOver);
Actor_Voice_Over(2630, kActorVoiceOver);
diff --git a/engines/bladerunner/script/scene/ug09.cpp b/engines/bladerunner/script/scene/ug09.cpp
index 0724ce8d81..91e493ab63 100644
--- a/engines/bladerunner/script/scene/ug09.cpp
+++ b/engines/bladerunner/script/scene/ug09.cpp
@@ -145,8 +145,8 @@ void SceneScriptUG09::PlayerWalkedOut() {
}
if (Game_Flag_Query(kFlagUG09toCT12)) {
- Game_Flag_Set(kFlagMcCoyAtCTxx);
- Game_Flag_Reset(kFlagMcCoyAtUGxx);
+ Game_Flag_Set(kFlagMcCoyInChinaTown);
+ Game_Flag_Reset(kFlagMcCoyInUnderground);
}
}
diff --git a/engines/bladerunner/script/scene/ug10.cpp b/engines/bladerunner/script/scene/ug10.cpp
index 64e63a6a03..a33c05fbde 100644
--- a/engines/bladerunner/script/scene/ug10.cpp
+++ b/engines/bladerunner/script/scene/ug10.cpp
@@ -25,15 +25,15 @@
namespace BladeRunner {
void SceneScriptUG10::InitializeScene() {
- if (Game_Flag_Query(336)) {
- Setup_Scene_Information(-92.0f, 81.33f, -652.0f, 520);
+ if (Game_Flag_Query(kFlagUG03toUG10)) {
+ Setup_Scene_Information( -92.0f, 81.33f, -652.0f, 520);
} else if (Game_Flag_Query(423)) {
Game_Flag_Reset(423);
- Setup_Scene_Information(-385.12f, 1.15f, 57.44f, 400);
- } else if (Game_Flag_Query(346)) {
- Setup_Scene_Information(2.5f, 1.15f, 405.0f, 200);
+ Setup_Scene_Information(-385.12f, 1.15f, 57.44f, 400);
+ } else if (Game_Flag_Query(kFlagUG14toUG10)) {
+ Setup_Scene_Information( 2.5f, 1.15f, 405.0f, 200);
} else {
- Setup_Scene_Information(235.0f, 1.15f, 29.0f, 0);
+ Setup_Scene_Information( 235.0f, 1.15f, 29.0f, 0);
}
Scene_Exit_Add_2D_Exit(0, 589, 300, 639, 479, 1);
@@ -78,7 +78,7 @@ void SceneScriptUG10::SceneLoaded() {
Obstacle_Object("SLUICEGATE_LEVER", true);
if (Global_Variable_Query(kVariableChapter) == 4
&& !Game_Flag_Query(kFlagUG10GateOpen)
- && Game_Flag_Query(kFlagDumpsterEmptied)
+ && Game_Flag_Query(kFlagCT04HomelessBodyThrownAway)
&& !Game_Flag_Query(kFlagUG03DeadHomeless)
) {
Scene_Loop_Set_Default(1);
@@ -114,7 +114,7 @@ bool SceneScriptUG10::ClickedOnExit(int exitId) {
)
|| Game_Flag_Query(kFlagUG10GateOpen)
) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 235.0f, 1.15f, 29.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 235.0f, 1.15f, 29.0f, 0, true, false, 0)) {
Game_Flag_Set(kFlagUG10toUG01);
Set_Enter(kSetUG01, kSceneUG01);
return true;
@@ -128,11 +128,11 @@ bool SceneScriptUG10::ClickedOnExit(int exitId) {
)
|| Game_Flag_Query(kFlagUG10GateOpen)
) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1.83f, 1.15f, -410.8f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1.83f, 1.15f, -410.8f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 0, false);
Loop_Actor_Travel_Stairs(kActorMcCoy, 9, 1, kAnimationModeIdle);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -92.0f, 81.83f, -652.0f, 0, 0, false, 0);
- Game_Flag_Set(337);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -92.0f, 81.83f, -652.0f, 0, false, false, 0);
+ Game_Flag_Set(kFlagUG10toUG03);
Set_Enter(kSetUG03, kSceneUG03);
return true;
}
@@ -145,7 +145,7 @@ bool SceneScriptUG10::ClickedOnExit(int exitId) {
)
|| Game_Flag_Query(kFlagUG10GateOpen)
) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -385.0f, 1.15f, 57.44f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -385.0f, 1.15f, 57.44f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 1001, false);
Loop_Actor_Travel_Ladder(kActorMcCoy, 1, 1, 0);
Game_Flag_Set(424);
@@ -161,8 +161,8 @@ bool SceneScriptUG10::ClickedOnExit(int exitId) {
)
|| Game_Flag_Query(kFlagUG10GateOpen)
) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 2.5f, 1.15f, 405.0f, 0, 1, false, 0)) {
- Game_Flag_Set(347);
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 2.5f, 1.15f, 405.0f, 0, true, false, 0)) {
+ Game_Flag_Set(kFlagUG10toUG14);
Set_Enter(kSetUG14, kSceneUG14);
return true;
}
@@ -228,14 +228,14 @@ void SceneScriptUG10::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptUG10::PlayerWalkedIn() {
- if (Game_Flag_Query(346)) {
- Game_Flag_Reset(346);
+ if (Game_Flag_Query(kFlagUG14toUG10)) {
+ Game_Flag_Reset(kFlagUG14toUG10);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 2.5f, 1.15f, 377.0f, 0, false, false, 0);
} else if (Game_Flag_Query(kFlagUG01toUG10)) {
Game_Flag_Reset(kFlagUG01toUG10);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 207.0f, 1.15f, 29.0f, 0, false, false, 0);
- } else if (Game_Flag_Query(336)) {
- Game_Flag_Reset(336);
+ } else if (Game_Flag_Query(kFlagUG03toUG10)) {
+ Game_Flag_Reset(kFlagUG03toUG10);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -1.83f, 81.33f, -518.8f, 0, false, false, 0);
Actor_Face_Heading(kActorMcCoy, 506, false);
Loop_Actor_Travel_Stairs(kActorMcCoy, 9, false, kAnimationModeIdle);
diff --git a/engines/bladerunner/script/scene/ug12.cpp b/engines/bladerunner/script/scene/ug12.cpp
index f189224713..7f9202381d 100644
--- a/engines/bladerunner/script/scene/ug12.cpp
+++ b/engines/bladerunner/script/scene/ug12.cpp
@@ -29,27 +29,30 @@ void SceneScriptUG12::InitializeScene() {
Setup_Scene_Information(207.0f, -126.21f, -364.0f, 561);
Game_Flag_Reset(411);
} else {
- Setup_Scene_Information(375.0f, -126.21f, 180.0f, 730);
- Game_Flag_Reset(345);
+ Setup_Scene_Information(375.0f, -126.21f, 180.0f, 730);
+ Game_Flag_Reset(kFlagUG14toUG12);
}
+
Scene_Exit_Add_2D_Exit(0, 538, 222, 615, 346, 1);
if (Game_Flag_Query(373)) {
Scene_Exit_Add_2D_Exit(1, 334, 176, 426, 266, 0);
}
+
Ambient_Sounds_Add_Looping_Sound(105, 47, 60, 1);
- Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1);
- Ambient_Sounds_Add_Sound(291, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(292, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(368, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(370, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(293, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(294, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(295, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1);
+ Ambient_Sounds_Add_Sound(291, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(292, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(368, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(370, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(293, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(294, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(295, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+
if (Game_Flag_Query(373)) {
Scene_Loop_Set_Default(2);
} else {
@@ -83,7 +86,7 @@ bool SceneScriptUG12::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 375.0f, -126.21f, 180.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(344);
+ Game_Flag_Set(kFlagUG12toUG14);
Set_Enter(kSetUG14, kSceneUG14);
}
return true;
diff --git a/engines/bladerunner/script/scene/ug13.cpp b/engines/bladerunner/script/scene/ug13.cpp
index 3fb1aaf3dc..e2a7ae9a1d 100644
--- a/engines/bladerunner/script/scene/ug13.cpp
+++ b/engines/bladerunner/script/scene/ug13.cpp
@@ -27,17 +27,19 @@ namespace BladeRunner {
void SceneScriptUG13::InitializeScene() {
if (Game_Flag_Query(435)) {
Setup_Scene_Information(-477.0f, 141.9f, -870.0f, 378);
- } else if (Game_Flag_Query(350)) {
- Setup_Scene_Information(39.0f, 52.94f, -528.0f, 600);
+ } else if (Game_Flag_Query(kFlagUG15toUG13)) {
+ Setup_Scene_Information( 39.0f, 52.94f, -528.0f, 600);
} else {
- Setup_Scene_Information(-22.0f, 54.63f, -883.0f, 578);
+ Setup_Scene_Information( -22.0f, 54.63f, -883.0f, 578);
Actor_Set_Invisible(kActorMcCoy, false);
}
+
if (!Game_Flag_Query(431)) {
Scene_Exit_Add_2D_Exit(0, 394, 205, 464, 281, 0);
}
Scene_Exit_Add_2D_Exit(1, 560, 90, 639, 368, 1);
Scene_Exit_Add_2D_Exit(2, 108, 85, 175, 210, 3);
+
Ambient_Sounds_Add_Looping_Sound(331, 15, 0, 1);
Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1);
Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1);
@@ -46,7 +48,10 @@ void SceneScriptUG13::InitializeScene() {
Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- if (Global_Variable_Query(kVariableChapter) == 4 && !Game_Flag_Query(kFlagMcCoyKilledHomeless)) {
+
+ if ( Global_Variable_Query(kVariableChapter) == 4
+ && !Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy)
+ ) {
Actor_Set_Goal_Number(kActorTransient, 390);
}
if (Actor_Query_Goal_Number(kActorTransient) == 599) {
@@ -74,7 +79,7 @@ void SceneScriptUG13::SceneLoaded() {
Unclickable_Object("BASKET");
if ( Global_Variable_Query(kVariableChapter) >= 3
&& !Actor_Clue_Query(kActorMcCoy, kClueOriginalRequisitionForm)
- && Game_Flag_Query(kFlagMcCoyKilledHomeless)
+ && Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy)
&& (Actor_Clue_Query(kActorMcCoy, kClueShippingForm)
|| Actor_Clue_Query(kActorMcCoy, kClueWeaponsOrderForm)
)
@@ -175,7 +180,7 @@ bool SceneScriptUG13::ClickedOnExit(int exitId) {
}
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 39.0f, 52.94f, -528.0f, 0, 1, false, 0)) {
- Game_Flag_Set(351);
+ Game_Flag_Set(kFlagUG13toUG15);
Set_Enter(kSetUG15, kSceneUG15);
}
return true;
@@ -238,15 +243,15 @@ void SceneScriptUG13::PlayerWalkedIn() {
Loop_Actor_Travel_Stairs(kActorMcCoy, 11, 0, kAnimationModeIdle);
Footstep_Sound_Override_Off();
Game_Flag_Reset(435);
- } else if (Game_Flag_Query(350)) {
+ } else if (Game_Flag_Query(kFlagUG15toUG13)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -12.0f, 44.0f, -528.0f, 0, 0, false, 0);
- Game_Flag_Reset(350);
+ Game_Flag_Reset(kFlagUG15toUG13);
} else {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -60.0f, 55.24f, -816.0f, 0, 0, false, 0);
Game_Flag_Reset(429);
Player_Gains_Control();
}
- if (Actor_Query_Goal_Number(kActorTransient) >= 390 && !Game_Flag_Query(kFlagMcCoyKilledHomeless)) {
+ if (Actor_Query_Goal_Number(kActorTransient) >= 390 && !Game_Flag_Query(kFlagCT04HomelessKilledByMcCoy)) {
if (Game_Flag_Query(553)) {
if (Random_Query(1, 3) == 1) {
Actor_Set_Goal_Number(kActorTransient, 395);
diff --git a/engines/bladerunner/script/scene/ug14.cpp b/engines/bladerunner/script/scene/ug14.cpp
index 6e95691367..ace4b90365 100644
--- a/engines/bladerunner/script/scene/ug14.cpp
+++ b/engines/bladerunner/script/scene/ug14.cpp
@@ -25,32 +25,34 @@
namespace BladeRunner {
void SceneScriptUG14::InitializeScene() {
- if (Game_Flag_Query(349)) {
- Setup_Scene_Information(-278.0f, 12.97f, -152.0f, 200);
- } else if (Game_Flag_Query(344)) {
- Setup_Scene_Information(-50.0f, 129.0f, -814.0f, 533);
+ if (Game_Flag_Query(kFlagUG19toUG14)) {
+ Setup_Scene_Information(-278.0f, 12.97f, -152.0f, 200);
+ } else if (Game_Flag_Query(kFlagUG12toUG14)) {
+ Setup_Scene_Information( -50.0f, 129.0f, -814.0f, 533);
} else {
- Setup_Scene_Information(233.0f, 186.04f, -32.0f, 865);
+ Setup_Scene_Information( 233.0f, 186.04f, -32.0f, 865);
}
- Scene_Exit_Add_2D_Exit(0, 0, 232, 45, 427, 3);
- Scene_Exit_Add_2D_Exit(1, 175, 44, 228, 115, 0);
- Scene_Exit_Add_2D_Exit(2, 537, 0, 639, 190, 1);
+
+ Scene_Exit_Add_2D_Exit(0, 0, 232, 45, 427, 3);
+ Scene_Exit_Add_2D_Exit(1, 175, 44, 228, 115, 0);
+ Scene_Exit_Add_2D_Exit(2, 537, 0, 639, 190, 1);
+
Ambient_Sounds_Add_Looping_Sound(331, 28, 0, 1);
Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1);
Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1);
- Ambient_Sounds_Add_Sound(291, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(292, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(293, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(294, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(295, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(291, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(292, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(293, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(294, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(295, 2, 20, 20, 25, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
}
void SceneScriptUG14::SceneLoaded() {
@@ -84,36 +86,36 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) {
}
if (!exitId) {
if (v1) {
- if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, 141.47f, 128.92f, -150.16f, 0, 1, false, 0)) {
+ if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, 141.47f, 128.92f, -150.16f, 0, true, false, 0)) {
return false;
}
Actor_Face_XYZ(kActorMcCoy, -14.53f, 12.12f, -150.16f, true);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 0, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 13, false, kAnimationModeIdle);
Footstep_Sound_Override_Off();
}
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -278.0f, 12.97f, -152.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -278.0f, 12.97f, -152.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(348);
+ Game_Flag_Set(kFlagUG14toUG19);
Set_Enter(kSetUG19, kSceneUG19);
}
return true;
}
if (exitId == 1) {
if (!v1) {
- if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, -14.53f, 12.12f, -150.16f, 0, 1, false, 0)) {
+ if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, -14.53f, 12.12f, -150.16f, 0, true, false, 0)) {
return false;
}
Actor_Face_XYZ(kActorMcCoy, 141.47f, 128.92f, -150.16f, true);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 1, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 13, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
}
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -50.0f, 129.0f, -814.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -50.0f, 129.0f, -814.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(345);
+ Game_Flag_Set(kFlagUG14toUG12);
Set_Enter(kSetCT08_CT51_UG12, kSceneUG12);
}
return true;
@@ -121,22 +123,22 @@ bool SceneScriptUG14::ClickedOnExit(int exitId) {
if (exitId == 2) {
if (!v1) {
- if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, -14.53f, 12.12f, -150.16f, 0, 1, false, 0)) {
+ if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, -14.53f, 12.12f, -150.16f, 0, true, false, 0)) {
return false;
}
Actor_Face_XYZ(kActorMcCoy, 141.47f, 128.92f, -150.16f, true);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 1, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 13, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
}
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 157.0f, 128.92f, -108.01f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 157.0f, 128.92f, -108.01f, 0, true, false, 0)) {
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 6, 1, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 6, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 233.0f, 186.04f, -32.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 233.0f, 186.04f, -32.0f, 0, false, false, 0);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(346);
+ Game_Flag_Set(kFlagUG14toUG10);
Set_Enter(kSetUG10, kSceneUG10);
}
return true;
@@ -155,23 +157,26 @@ void SceneScriptUG14::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptUG14::PlayerWalkedIn() {
- if (Game_Flag_Query(349)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -250.0f, 12.97f, -152.0f, 0, 0, false, 0);
- Game_Flag_Reset(349);
- } else if (Game_Flag_Query(344)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -50.0f, 129.0f, -604.0f, 0, 0, false, 0);
- Game_Flag_Reset(344);
+ if (Game_Flag_Query(kFlagUG19toUG14)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -250.0f, 12.97f, -152.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagUG19toUG14);
+ } else if (Game_Flag_Query(kFlagUG12toUG14)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -50.0f, 129.0f, -604.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagUG12toUG14);
} else {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 157.0f, 186.04f, -44.01f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 157.0f, 186.04f, -44.01f, 0, false, false, 0);
Actor_Face_Heading(kActorMcCoy, 10, false);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 6, 0, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 6, false, kAnimationModeIdle);
Footstep_Sound_Override_Off();
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 157.0f, 128.92f, -148.01f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 157.0f, 128.92f, -148.01f, 0, false, false, 0);
Actor_Face_Heading(kActorMcCoy, 807, false);
- Game_Flag_Reset(347);
+ Game_Flag_Reset(kFlagUG10toUG14);
}
- if (Global_Variable_Query(kVariableChapter) == 4 && Game_Flag_Query(kFlagDumpsterEmptied) && !Game_Flag_Query(694)) {
+ if ( Global_Variable_Query(kVariableChapter) == 4
+ && Game_Flag_Query(kFlagCT04HomelessBodyThrownAway)
+ && !Game_Flag_Query(kFlagUG14DeadHomeless)
+ ) {
Overlay_Play("UG14OVER", 0, 0, 1, 0);
Delay(1000);
Actor_Face_Heading(kActorMcCoy, 609, false);
@@ -179,7 +184,7 @@ void SceneScriptUG14::PlayerWalkedIn() {
Actor_Voice_Over(270, kActorVoiceOver);
Delay(2150);
Actor_Voice_Over(300, kActorVoiceOver);
- Game_Flag_Set(694);
+ Game_Flag_Set(kFlagUG14DeadHomeless);
}
//return false;
}
diff --git a/engines/bladerunner/script/scene/ug15.cpp b/engines/bladerunner/script/scene/ug15.cpp
index 4743c8d336..13408bbfab 100644
--- a/engines/bladerunner/script/scene/ug15.cpp
+++ b/engines/bladerunner/script/scene/ug15.cpp
@@ -25,57 +25,62 @@
namespace BladeRunner {
void SceneScriptUG15::InitializeScene() {
- if (Game_Flag_Query(353)) {
- Setup_Scene_Information(-25.0f, 26.31f, -434.0f, 520);
- } else if (Game_Flag_Query(kFlagUG16toUG15)) {
- Setup_Scene_Information(-17.0f, 26.31f, -346.0f, 711);
- } else if (Game_Flag_Query(355)) {
- Setup_Scene_Information(-18.0f, 48.07f, 62.0f, 650);
+ if (Game_Flag_Query(kFlagUG17toUG15)) {
+ Setup_Scene_Information( -25.0f, 26.31f, -434.0f, 520);
+ } else if (Game_Flag_Query(kFlagUG16toUG15a)) {
+ Setup_Scene_Information( -17.0f, 26.31f, -346.0f, 711);
+ } else if (Game_Flag_Query(kFlagUG16toUG15b)) {
+ Setup_Scene_Information( -18.0f, 48.07f, 62.0f, 650);
} else {
- Setup_Scene_Information(-238.0f, 48.07f, 222.0f, 180);
- if (Game_Flag_Query(676) && Random_Query(1, 10) == 10) {
+ Setup_Scene_Information(-238.0f, 48.07f, 222.0f, 180);
+ if (Game_Flag_Query(676)
+ && Random_Query(1, 10) == 10
+ ) {
Game_Flag_Reset(676);
}
}
if (Game_Flag_Query(682)) {
Scene_Loop_Set_Default(3);
}
- if (Game_Flag_Query(353) || Game_Flag_Query(kFlagUG16toUG15)) {
- Scene_Exit_Add_2D_Exit(0, 260, 0, 307, 298, 0);
+
+ if (Game_Flag_Query(kFlagUG17toUG15)
+ || Game_Flag_Query(kFlagUG16toUG15a)
+ ) {
+ Scene_Exit_Add_2D_Exit(0, 260, 0, 307, 298, 0);
Scene_Exit_Add_2D_Exit(1, 301, 147, 337, 304, 1);
- Game_Flag_Reset(353);
- Game_Flag_Reset(kFlagUG16toUG15);
+ Game_Flag_Reset(kFlagUG17toUG15);
+ Game_Flag_Reset(kFlagUG16toUG15a);
} else {
Scene_Exit_Add_2D_Exit(2, 406, 128, 480, 316, 1);
- Scene_Exit_Add_2D_Exit(3, 0, 0, 30, 479, 3);
+ Scene_Exit_Add_2D_Exit(3, 0, 0, 30, 479, 3);
}
+
Ambient_Sounds_Add_Looping_Sound(105, 71, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(95, 45, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound( 95, 45, 0, 1);
Ambient_Sounds_Add_Looping_Sound(332, 76, 0, 1);
- Ambient_Sounds_Add_Sound(291, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(292, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(293, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(294, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(295, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(1, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(57, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(58, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(196, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(197, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(198, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(199, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
-
+ Ambient_Sounds_Add_Sound(291, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(292, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(293, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(294, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(295, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(402, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(398, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 1, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 57, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 58, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(196, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(197, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(198, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(199, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
}
void SceneScriptUG15::SceneLoaded() {
@@ -107,20 +112,22 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -25.0f, 26.31f, -434.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(352);
+ Game_Flag_Set(kFlagUG15toUG17);
Set_Enter(kSetUG17, kSceneUG17);
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -17.0f, 26.31f, -346.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(kFlagUG15toUG16);
+ Game_Flag_Set(kFlagUG15toUG16a);
Set_Enter(kSetUG16, kSceneUG16);
}
return true;
}
+
if (exitId == 2) {
int v1 = Actor_Query_Goal_Number(kActorFreeSlotA);
if (v1 >= 300 && v1 <= 303) {
@@ -128,22 +135,22 @@ bool SceneScriptUG15::ClickedOnExit(int exitId) {
} else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 18.0f, 52.28f, 46.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(354);
+ Game_Flag_Set(kFlagUG15toUG16b);
Set_Enter(kSetUG16, kSceneUG16);
}
return true;
}
+
if (exitId == 3) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -238.0f, 52.46f, 222.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(350);
+ Game_Flag_Set(kFlagUG15toUG13);
Set_Enter(kSetUG13, kSceneUG13);
}
return true;
}
return false;
-
}
bool SceneScriptUG15::ClickedOn2DRegion(int region) {
@@ -154,7 +161,9 @@ void SceneScriptUG15::SceneFrameAdvanced(int frame) {
if (Actor_Query_Goal_Number(kActorFreeSlotA) == 300) {
float x, y, z;
Actor_Query_XYZ(kActorMcCoy, &x, &y, &z);
- if (-160.0f <= x && z < 220.0f) {
+ if (-160.0f <= x
+ && z < 220.0f
+ ) {
Actor_Set_Goal_Number(kActorFreeSlotA, 301);
}
}
@@ -164,14 +173,19 @@ void SceneScriptUG15::SceneFrameAdvanced(int frame) {
if (Game_Flag_Query(677) && !Game_Flag_Query(682)) {
float x, y, z;
Actor_Query_XYZ(kActorMcCoy, &x, &y, &z);
- if (-180.0f <= x && (z < 220.0f && !Game_Flag_Query(724))) {
+ if (-180.0f <= x
+ && z < 220.0f
+ && !Game_Flag_Query(724)
+ ) {
Game_Flag_Set(724);
Game_Flag_Set(682);
Scene_Loop_Set_Default(3);
Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true);
Actor_Set_Goal_Number(kActorMcCoy, 390);
Actor_Query_XYZ(kActorFreeSlotA, &x, &y, &z);
- if (-200.0f < x && -62.0f > x) {
+ if (-200.0f < x
+ && -62.0f > x
+ ) {
Actor_Set_Goal_Number(kActorFreeSlotA, 309);
}
}
@@ -183,11 +197,11 @@ void SceneScriptUG15::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptUG15::PlayerWalkedIn() {
- if (Game_Flag_Query(355)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -62.0f, 48.07f, 102.0f, 0, 0, false, 0);
- Game_Flag_Reset(355);
- } else if (Game_Flag_Query(351)) {
- Game_Flag_Reset(351);
+ if (Game_Flag_Query(kFlagUG16toUG15b)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -62.0f, 48.07f, 102.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagUG16toUG15b);
+ } else if (Game_Flag_Query(kFlagUG13toUG15)) {
+ Game_Flag_Reset(kFlagUG13toUG15);
if (!Game_Flag_Query(676)) {
Actor_Set_Goal_Number(kActorFreeSlotA, 310);
}
diff --git a/engines/bladerunner/script/scene/ug16.cpp b/engines/bladerunner/script/scene/ug16.cpp
index fbffe9f701..858f4d1b8e 100644
--- a/engines/bladerunner/script/scene/ug16.cpp
+++ b/engines/bladerunner/script/scene/ug16.cpp
@@ -28,19 +28,22 @@ void SceneScriptUG16::InitializeScene() {
if (Game_Flag_Query(552)) {
Setup_Scene_Information(-270.76f, -34.88f, -504.02f, 404);
Game_Flag_Reset(552);
- } else if (Game_Flag_Query(kFlagUG15toUG16)) {
+ } else if (Game_Flag_Query(kFlagUG15toUG16a)) {
Setup_Scene_Information(-322.0f, -34.0f, -404.0f, 345);
- Game_Flag_Reset(kFlagUG15toUG16);
+ Game_Flag_Reset(kFlagUG15toUG16a);
} else {
Setup_Scene_Information(-318.0f, -34.0f, -216.0f, 340);
- Game_Flag_Reset(354);
+ Game_Flag_Reset(kFlagUG15toUG16b);
}
+
Scene_Exit_Add_2D_Exit(0, 242, 169, 282, 262, 3);
Scene_Exit_Add_2D_Exit(1, 375, 166, 407, 251, 3);
Scene_Exit_Add_2D_Exit(2, 461, 148, 523, 248, 0);
+
Ambient_Sounds_Add_Looping_Sound(516, 33, 81, 0);
- Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound(332, 40, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound(333, 40, 0, 1);
+
if (Game_Flag_Query(568)) {
Scene_Loop_Set_Default(5);
} else {
@@ -132,24 +135,26 @@ bool SceneScriptUG16::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -322.0f, -34.0f, -216.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(355);
+ Game_Flag_Set(kFlagUG16toUG15b);
Set_Enter(kSetUG15, kSceneUG15);
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -322.0f, -34.0f, -404.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(kFlagUG16toUG15);
+ Game_Flag_Set(kFlagUG16toUG15a);
Set_Enter(kSetUG15, kSceneUG15);
}
return true;
}
+
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -316.78f, -34.88f, -533.27f, 0, 1, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 0, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 13, 1, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 13, true, kAnimationModeIdle);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Game_Flag_Set(551);
diff --git a/engines/bladerunner/script/scene/ug17.cpp b/engines/bladerunner/script/scene/ug17.cpp
index 104c831e59..afbe340a39 100644
--- a/engines/bladerunner/script/scene/ug17.cpp
+++ b/engines/bladerunner/script/scene/ug17.cpp
@@ -31,14 +31,17 @@ void SceneScriptUG17::InitializeScene() {
} else {
Setup_Scene_Information(1000.0f, 67.96f, -1539.0f, 0);
}
- Scene_Exit_Add_2D_Exit(0, 610, 0, 639, 479, 1);
+
+ Scene_Exit_Add_2D_Exit(0, 610, 0, 639, 479, 1);
Scene_Exit_Add_2D_Exit(1, 551, 347, 594, 386, 0);
+
Ambient_Sounds_Add_Looping_Sound(589, 100, 1, 1);
- Ambient_Sounds_Add_Looping_Sound(384, 50, 1, 1);
+ Ambient_Sounds_Add_Looping_Sound(384, 50, 1, 1);
Ambient_Sounds_Add_Sound(72, 5, 80, 10, 11, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(73, 5, 80, 10, 11, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(74, 5, 80, 10, 11, -100, 100, -101, -101, 0, 0);
- Overlay_Play("UG17OVER", 0, 1, 0, 0);
+
+ Overlay_Play("UG17OVER", 0, true, false, 0);
}
void SceneScriptUG17::SceneLoaded() {
@@ -67,7 +70,7 @@ bool SceneScriptUG17::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1000.0f, 67.96f, -1539.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(353);
+ Game_Flag_Set(kFlagUG17toUG15);
Set_Enter(kSetUG15, kSceneUG15);
}
return true;
@@ -101,9 +104,9 @@ void SceneScriptUG17::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptUG17::PlayerWalkedIn() {
- if (Game_Flag_Query(352)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 961.0f, 67.96f, -1539.0f, 0, 0, false, 0);
- Game_Flag_Reset(352);
+ if (Game_Flag_Query(kFlagUG15toUG17)) {
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 961.0f, 67.96f, -1539.0f, 0, false, false, 0);
+ Game_Flag_Reset(kFlagUG15toUG17);
}
//return false;
}
diff --git a/engines/bladerunner/script/scene/ug19.cpp b/engines/bladerunner/script/scene/ug19.cpp
index 4c7d96375e..40097dee12 100644
--- a/engines/bladerunner/script/scene/ug19.cpp
+++ b/engines/bladerunner/script/scene/ug19.cpp
@@ -25,38 +25,39 @@
namespace BladeRunner {
void SceneScriptUG19::InitializeScene() {
- if (Game_Flag_Query(357)) {
+ if (Game_Flag_Query(kFlagMA07toUG19)) {
Setup_Scene_Information(67.03f, 105.0f, -74.97f, 256);
} else {
- Setup_Scene_Information(181.0f, 11.52f, -18.0f, 777);
+ Setup_Scene_Information(181.0f, 11.52f, -18.0f, 777);
}
- Scene_Exit_Add_2D_Exit(0, 351, 0, 491, 347, 0);
+
+ Scene_Exit_Add_2D_Exit(0, 351, 0, 491, 347, 0);
Scene_Exit_Add_2D_Exit(1, 548, 124, 639, 369, 1);
- Ambient_Sounds_Add_Looping_Sound(95, 45, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(332, 76, 0, 1);
- Ambient_Sounds_Add_Sound(291, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(292, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(293, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(294, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(295, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(396, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
- Ambient_Sounds_Add_Sound(303, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(304, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(305, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(1, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(57, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(58, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(306, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(307, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(308, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(196, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(197, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(198, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(199, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Looping_Sound( 95, 45, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound(332, 76, 0, 1);
+ Ambient_Sounds_Add_Sound(291, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(292, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(293, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(294, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(295, 2, 20, 25, 33, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(401, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(369, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(396, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(397, 2, 120, 11, 12, -100, 100, -100, 100, 0, 0);
+ Ambient_Sounds_Add_Sound(303, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(304, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(305, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 1, 5, 50, 47, 57, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 57, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 58, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(306, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(307, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(308, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(196, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(197, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(198, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound(199, 5, 50, 27, 37, -100, 100, -101, -101, 0, 0);
}
void SceneScriptUG19::SceneLoaded() {
@@ -91,7 +92,7 @@ bool SceneScriptUG19::ClickedOnExit(int exitId) {
Footstep_Sound_Override_Off();
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(356);
+ Game_Flag_Set(kFlagUG19toMA07);
Set_Enter(kSetMA07, kSceneMA07);
}
return true;
@@ -100,7 +101,7 @@ bool SceneScriptUG19::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 181.0f, 11.52f, -18.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(349);
+ Game_Flag_Set(kFlagUG19toUG14);
Set_Enter(kSetUG14, kSceneUG14);
}
return true;
@@ -119,13 +120,13 @@ void SceneScriptUG19::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
}
void SceneScriptUG19::PlayerWalkedIn() {
- if (Game_Flag_Query(348)) {
- Game_Flag_Reset(348);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 129.0f, 11.52f, -18.0f, 0, 0, false, 0);
+ if (Game_Flag_Query(kFlagUG14toUG19)) {
+ Game_Flag_Reset(kFlagUG14toUG19);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 129.0f, 11.52f, -18.0f, 0, false, false, 0);
} else {
- Game_Flag_Reset(357);
+ Game_Flag_Reset(kFlagMA07toUG19);
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Ladder(kActorMcCoy, 8, 0, 0);
+ Loop_Actor_Travel_Ladder(kActorMcCoy, 8, false, 0);
Footstep_Sound_Override_Off();
}
}