aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/scene
diff options
context:
space:
mode:
authorPeter Kohaut2019-01-27 22:21:54 +0100
committerPeter Kohaut2019-01-27 22:21:54 +0100
commit77adb67664cc4aa4c348709504d68e21a8c9791e (patch)
treeb1d96d4ca6c5528a3cdf7c50bdc3437f47d3b9b9 /engines/bladerunner/script/scene
parent1ee6cf92bd455462925ad669ded54c6769a83b01 (diff)
downloadscummvm-rg350-77adb67664cc4aa4c348709504d68e21a8c9791e.tar.gz
scummvm-rg350-77adb67664cc4aa4c348709504d68e21a8c9791e.tar.bz2
scummvm-rg350-77adb67664cc4aa4c348709504d68e21a8c9791e.zip
BLADERUNNER: Initial cleanup of NR01, NR02 & related scripts
Diffstat (limited to 'engines/bladerunner/script/scene')
-rw-r--r--engines/bladerunner/script/scene/hf01.cpp2
-rw-r--r--engines/bladerunner/script/scene/nr01.cpp86
-rw-r--r--engines/bladerunner/script/scene/nr02.cpp123
-rw-r--r--engines/bladerunner/script/scene/nr03.cpp10
4 files changed, 138 insertions, 83 deletions
diff --git a/engines/bladerunner/script/scene/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp
index a469b83b66..18b3ac2e38 100644
--- a/engines/bladerunner/script/scene/hf01.cpp
+++ b/engines/bladerunner/script/scene/hf01.cpp
@@ -360,7 +360,7 @@ void SceneScriptHF01::PlayerWalkedIn() {
}
if (Game_Flag_Query(kFlagSpinnerMissing)) {
- Actor_Set_Goal_Number(kActorSteele, 280);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleTalkAboutMissingSpinner);
Game_Flag_Reset(kFlagSpinnerMissing);
//return true;
return;
diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp
index c91fdb43a9..d9300e427e 100644
--- a/engines/bladerunner/script/scene/nr01.cpp
+++ b/engines/bladerunner/script/scene/nr01.cpp
@@ -24,6 +24,13 @@
namespace BladeRunner {
+enum kNR01Loops {
+ kNR01LoopInshot = 0,
+ kNR01LoopMainLoop = 1,
+ kNR01LoopOutshoot = 3,
+ kNR01LoopMainLoopNoSpinner = 4
+};
+
void SceneScriptNR01::InitializeScene() {
if (Game_Flag_Query(kFlagSpinnerMissing)) {
Setup_Scene_Information(-153.86f, 23.88f, -570.21f, 402);
@@ -31,13 +38,13 @@ void SceneScriptNR01::InitializeScene() {
Setup_Scene_Information( -416.0f, 31.93f, -841.0f, 200);
Actor_Set_Invisible(kActorMcCoy, true);
Preload(167);
- } else if (Game_Flag_Query(534)) {
+ } else if (Game_Flag_Query(kFlagNR03toNR01)) {
Setup_Scene_Information( -416.0f, 31.93f, -841.0f, 200);
} else if (Game_Flag_Query(kFlagUG06toNR01)) {
Setup_Scene_Information( -270.0f, 4.93f, -1096.0f, 500);
- } else if (Game_Flag_Query(533)) {
+ } else if (Game_Flag_Query(kFlagNR02toNR01)) {
Setup_Scene_Information( 312.0f, 31.66f, -901.0f, 700);
- } else if (Game_Flag_Query(545)) {
+ } else if (Game_Flag_Query(kFlagNotUsed545)) {
Setup_Scene_Information( -170.0f, 24.0f, -574.0f, 768);
} else {
Setup_Scene_Information( 76.0f, 23.88f, -109.0f, 966);
@@ -79,15 +86,15 @@ void SceneScriptNR01::InitializeScene() {
if ( Game_Flag_Query(kFlagSpinnerAtNR01)
&& !Game_Flag_Query(kFlagArrivedFromSpinner1)
) {
- Scene_Loop_Start_Special(0, 0, 0);
- Scene_Loop_Set_Default(1);
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kNR01LoopInshot, false);
+ Scene_Loop_Set_Default(kNR01LoopMainLoop);
Game_Flag_Set(kFlagArrivedFromSpinner1);
} else if (Game_Flag_Query(kFlagSpinnerAtNR01)
&& Game_Flag_Query(kFlagArrivedFromSpinner1)
) {
- Scene_Loop_Set_Default(1);
+ Scene_Loop_Set_Default(kNR01LoopMainLoop);
} else {
- Scene_Loop_Set_Default(4);
+ Scene_Loop_Set_Default(kNR01LoopMainLoopNoSpinner);
}
}
@@ -124,12 +131,13 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
} else {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(535);
+ Game_Flag_Set(kFlagNR01toNR03);
Set_Enter(kSetNR03, kSceneNR03);
}
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -281.0f, 31.93f, -1061.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 45, false);
@@ -141,15 +149,17 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 312.0f, 31.66f, -901.0f, 0, true, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(532);
+ Game_Flag_Set(kFlagNR01toNR02);
Set_Enter(kSetNR02, kSceneNR02);
}
return true;
}
+
if (exitId == 3) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 108.0f, 23.88f, -93.0f, 0, true, false, 0)) {
Game_Flag_Reset(kFlagMcCoyInChinaTown);
@@ -167,7 +177,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtPS01);
Set_Enter(kSetPS01, kScenePS01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationMcCoysApartment:
Game_Flag_Set(kFlagMcCoyInMcCoyApartment);
@@ -175,7 +185,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtMA01);
Set_Enter(kSetMA01, kSceneMA01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationRuncitersAnimals:
Game_Flag_Set(kFlagMcCoyInRunciters);
@@ -183,7 +193,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtRC01);
Set_Enter(kSetRC01, kSceneRC01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationChinatown:
Game_Flag_Set(kFlagMcCoyInChinaTown);
@@ -191,7 +201,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtCT01);
Set_Enter(kSetCT01_CT12, kSceneCT01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationAnimoidRow:
Game_Flag_Set(kFlagMcCoyInAnimoidRow);
@@ -199,7 +209,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtAR01);
Set_Enter(kSetAR01_AR02, kSceneAR01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationTyrellBuilding:
Game_Flag_Set(kFlagMcCoyInTyrellBuilding);
@@ -207,7 +217,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtTB02);
Set_Enter(kSetTB02_TB03, kSceneTB02);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationDNARow:
Game_Flag_Set(kFlagMcCoyInDNARow);
@@ -215,7 +225,7 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtDR01);
Set_Enter(kSetDR01_DR02_DR04, kSceneDR01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationBradburyBuilding:
Game_Flag_Set(kFlagMcCoyInBradburyBuilding);
@@ -223,14 +233,14 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagArrivedFromSpinner1);
Game_Flag_Set(kFlagSpinnerAtBB01);
Set_Enter(kSetBB01, kSceneBB01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
case kSpinnerDestinationHysteriaHall:
Game_Flag_Set(kFlagMcCoyInHysteriaHall);
Game_Flag_Reset(kFlagSpinnerAtNR01);
Game_Flag_Set(kFlagSpinnerAtHF01);
Set_Enter(kSetHF01, kSceneHF01);
- Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 3, true);
+ Scene_Loop_Start_Special(kSceneLoopModeChangeSet, kNR01LoopOutshoot, true);
break;
default:
Player_Loses_Control();
@@ -246,12 +256,17 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) {
}
bool SceneScriptNR01::ClickedOn2DRegion(int region) {
- if (region == 0 && Player_Query_Combat_Mode()) {
+ if (region == 0
+ && Player_Query_Combat_Mode()
+ ) {
Sound_Play(517, 100, 0, 0, 50);
Actor_Set_Goal_Number(kActorSteele, 260);
Scene_2D_Region_Remove(0);
}
- if (region == 1 && Player_Query_Combat_Mode()) {
+
+ if (region == 1
+ && Player_Query_Combat_Mode()
+ ) {
Sound_Play(517, 100, 0, 0, 50);
Actor_Set_Goal_Number(kActorGordo, 299);
Actor_Set_Goal_Number(kActorSteele, 258);
@@ -266,6 +281,7 @@ void SceneScriptNR01::SceneFrameAdvanced(int frame) {
if (frame == 61) {
Sound_Play(118, 40, 0, 0, 50);
}
+
if (frame == 184) {
Sound_Play(117, 40, 80, 80, 50);
}
@@ -277,7 +293,7 @@ void SceneScriptNR01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptNR01::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagSpinnerMissing)) {
- Actor_Set_Goal_Number(kActorSteele, 280);
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleTalkAboutMissingSpinner);
Game_Flag_Reset(kFlagSpinnerMissing);
//return true;
return;
@@ -289,21 +305,21 @@ void SceneScriptNR01::PlayerWalkedIn() {
Scene_2D_Region_Add(0, 450, 316, 464, 333);
Scene_2D_Region_Add(1, 233, 321, 240, 362);
ADQ_Add(kActorGordo, 70, 81);
- ADQ_Add(kActorSteele, 990, 3);
+ ADQ_Add(kActorSteele, 990, kAnimationModeTalk);
ADQ_Add(kActorGordo, 80, 82);
ADQ_Add(kActorGordo, 90, 81);
- ADQ_Add(kActorSteele, 1010, 3);
+ ADQ_Add(kActorSteele, 1010, kAnimationModeTalk);
ADQ_Add(kActorGordo, 100, 81);
- ADQ_Add(kActorSteele, 1020, 3);
+ ADQ_Add(kActorSteele, 1020, kAnimationModeTalk);
ADQ_Add(kActorGordo, 110, 82);
- ADQ_Add(kActorSteele, 1030, 3);
- ADQ_Add(kActorSteele, 1040, 3);
+ ADQ_Add(kActorSteele, 1030, kAnimationModeTalk);
+ ADQ_Add(kActorSteele, 1040, kAnimationModeTalk);
ADQ_Add(kActorGordo, 120, 82);
}
if (Game_Flag_Query(604)) {
if (Game_Flag_Query(622)) {
- ADQ_Add(kActorHanoi, 150, 3);
+ ADQ_Add(kActorHanoi, 150, kAnimationModeTalk);
Game_Flag_Reset(622);
}
Game_Flag_Reset(604);
@@ -319,9 +335,9 @@ void SceneScriptNR01::PlayerWalkedIn() {
return;
}
- if (Game_Flag_Query(534)) {
+ if (Game_Flag_Query(kFlagNR03toNR01)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -380.0f, 31.73f, -841.0f, 0, false, false, 0);
- Game_Flag_Reset(534);
+ Game_Flag_Reset(kFlagNR03toNR01);
} else {
if (Game_Flag_Query(kFlagUG06toNR01)) {
Loop_Actor_Travel_Stairs(kActorMcCoy, 3, true, kAnimationModeIdle);
@@ -390,16 +406,16 @@ void SceneScriptNR01::PlayerWalkedIn() {
}
}
}
- } else if (Game_Flag_Query(533)) {
+ } else if (Game_Flag_Query(kFlagNR02toNR01)) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 239.0f, 31.66f, -901.0f, 0, 0, false, 0);
- Game_Flag_Reset(533);
+ Game_Flag_Reset(kFlagNR02toNR01);
if (Actor_Query_Goal_Number(kActorGordo) == 230) {
Scene_Exits_Disable();
Actor_Set_Goal_Number(kActorGordo, 231);
Non_Player_Actor_Combat_Mode_On(kActorGordo, kActorCombatStateIdle, true, kActorMcCoy, 3, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 20, 300, false);
}
- } else if (Game_Flag_Query(545)) {
- Game_Flag_Reset(545);
+ } else if (Game_Flag_Query(kFlagNotUsed545)) {
+ Game_Flag_Reset(kFlagNotUsed545);
Actor_Put_In_Set(kActorHanoi, kSetNR01);
Actor_Set_At_XYZ(kActorHanoi, -202.0f, 24.0f, -574.0f, 0);
Actor_Face_Heading(kActorHanoi, 256, false);
@@ -433,8 +449,8 @@ void SceneScriptNR01::PlayerWalkedOut() {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
if (!Game_Flag_Query(kFlagNR01toUG06)
- && !Game_Flag_Query(532)
- && !Game_Flag_Query(535)
+ && !Game_Flag_Query(kFlagNR01toNR02)
+ && !Game_Flag_Query(kFlagNR01toNR03)
&& !Game_Flag_Query(632)
&& !Game_Flag_Query(722)
) {
diff --git a/engines/bladerunner/script/scene/nr02.cpp b/engines/bladerunner/script/scene/nr02.cpp
index 97a460032d..88909dcd97 100644
--- a/engines/bladerunner/script/scene/nr02.cpp
+++ b/engines/bladerunner/script/scene/nr02.cpp
@@ -25,10 +25,12 @@
namespace BladeRunner {
void SceneScriptNR02::InitializeScene() {
- sub_402134();
+ playNextMusic();
Setup_Scene_Information(-283.0f, -24.0f, 326.0f, 200);
- Game_Flag_Reset(532);
+ Game_Flag_Reset(kFlagNR01toNR02);
+
Scene_Exit_Add_2D_Exit(0, 0, 105, 75, 291, 3);
+
Ambient_Sounds_Add_Looping_Sound(280, 50, 38, 0);
Ambient_Sounds_Add_Sound(252, 3, 60, 25, 25, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(254, 3, 60, 25, 25, -100, 100, -101, -101, 0, 0);
@@ -72,10 +74,15 @@ bool SceneScriptNR02::MouseClick(int x, int y) {
}
bool SceneScriptNR02::ClickedOn3DObject(const char *objectName, bool a2) {
- if (Object_Query_Click("VID PHONE 01", objectName) || Object_Query_Click("VID PHONE 02", objectName)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -191.9f, -24.0f, 62.15f, 0, 1, false, 0)) {
+ if (Object_Query_Click("VID PHONE 01", objectName)
+ || Object_Query_Click("VID PHONE 02", objectName)
+ ) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -191.9f, -24.0f, 62.15f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 13, false);
- if (Actor_Clue_Query(kActorMcCoy, kClueFolder) && Actor_Clue_Query(kActorMcCoy, kClueGuzzaFramedMcCoy) && !Game_Flag_Query(670)) {
+ if ( Actor_Clue_Query(kActorMcCoy, kClueFolder)
+ && Actor_Clue_Query(kActorMcCoy, kClueGuzzaFramedMcCoy)
+ && !Game_Flag_Query(670)
+ ) {
Actor_Set_Goal_Number(kActorMcCoy, 350);
Game_Flag_Set(670);
} else {
@@ -98,27 +105,32 @@ bool SceneScriptNR02::ClickedOn3DObject(const char *objectName, bool a2) {
bool SceneScriptNR02::ClickedOnActor(int actorId) {
if (actorId == kActorGordo
- && Actor_Query_Goal_Number(kActorGordo) == 201
+ && Actor_Query_Goal_Number(kActorGordo) == kGoalGordoWaitAtNR02
) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 67.37f, -24.0f, 389.32f, 0, true, false, 0)) {
- Actor_Set_Goal_Number(kActorGordo, 215);
+ Actor_Set_Goal_Number(kActorGordo, kGoalGordoTalkToMcCoyAtNR02);
}
}
return false;
}
bool SceneScriptNR02::ClickedOnItem(int itemId, bool a2) {
- if ((itemId == 89 || itemId == 90) && !Loop_Actor_Walk_To_XYZ(kActorMcCoy, 109.38f, -24.0f, 420.5f, 0, true, false, 0)) {
- Actor_Face_Heading(kActorMcCoy, 423, false);
- if (itemId == 89) {
- Item_Remove_From_World(89);
- Item_Pickup_Spin_Effect(953, 214, 380);
- Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter1, true, -1);
- }
- if (itemId == 90) {
- Item_Remove_From_World(90);
- Item_Pickup_Spin_Effect(954, 214, 380);
- Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter2, true, -1);
+ if (itemId == 89
+ || itemId == 90
+ ) {
+ if(!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 109.38f, -24.0f, 420.5f, 0, true, false, 0)) {
+ Actor_Face_Heading(kActorMcCoy, 423, false);
+ if (itemId == 89) {
+ Item_Remove_From_World(89);
+ Item_Pickup_Spin_Effect(953, 214, 380);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter1, true, -1);
+ }
+
+ if (itemId == 90) {
+ Item_Remove_From_World(90);
+ Item_Pickup_Spin_Effect(954, 214, 380);
+ Actor_Clue_Acquire(kActorMcCoy, kClueGordosLighter2, true, -1);
+ }
}
}
return false;
@@ -126,13 +138,15 @@ bool SceneScriptNR02::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptNR02::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -283.0f, -24.0f, 326.0f, 0, 1, false, 0)) {
- if (Actor_Query_Goal_Number(kActorGordo) < 230 || Actor_Query_Goal_Number(kActorGordo) > 250) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -283.0f, -24.0f, 326.0f, 0, true, false, 0)) {
+ if (Actor_Query_Goal_Number(kActorGordo) < 230
+ || Actor_Query_Goal_Number(kActorGordo) > 250
+ ) {
Music_Stop(2);
}
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(533);
+ Game_Flag_Set(kFlagNR02toNR01);
Set_Enter(kSetNR01, kSceneNR01);
}
return true;
@@ -145,8 +159,12 @@ bool SceneScriptNR02::ClickedOn2DRegion(int region) {
}
void SceneScriptNR02::SceneFrameAdvanced(int frame) {
- if (!Music_Is_Playing() && (Actor_Query_Goal_Number(kActorGordo) < 210 || Actor_Query_Goal_Number(kActorGordo) > 222)) {
- sub_402134();
+ if (!Music_Is_Playing()
+ && (Actor_Query_Goal_Number(kActorGordo) < 210
+ || Actor_Query_Goal_Number(kActorGordo) > 222
+ )
+ ) {
+ playNextMusic();
}
//return false;
}
@@ -158,62 +176,81 @@ void SceneScriptNR02::PlayerWalkedIn() {
if (Actor_Query_Goal_Number(kActorGordo) == 211) {
Actor_Set_Goal_Number(kActorGordo, 220);
}
+
if (Actor_Query_Goal_Number(kActorGordo) == 204) {
Actor_Set_Goal_Number(kActorGordo, 205);
}
+
if (Actor_Query_Goal_Number(kActorGordo) == 206) {
Actor_Set_Goal_Number(kActorGordo, 205);
}
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, -203.0f, -24.0f, 334.0f, 0, 0, false, 0);
+
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, -203.0f, -24.0f, 334.0f, 0, false, false, 0);
//return false;
}
void SceneScriptNR02::PlayerWalkedOut() {
Music_Stop(2);
- if (Actor_Query_Goal_Number(kActorGordo) < 210 && Actor_Query_Goal_Number(kActorGordo) >= 205) {
+ if (Actor_Query_Goal_Number(kActorGordo) < 210
+ && Actor_Query_Goal_Number(kActorGordo) >= 205
+ ) {
Actor_Set_Goal_Number(kActorGordo, 204);
}
}
void SceneScriptNR02::DialogueQueueFlushed(int a1) {
- if (Player_Query_Current_Scene() == 55 && Actor_Query_Goal_Number(kActorGordo) == 206) {
+ if (Player_Query_Current_Scene() == kSceneNR02
+ && Actor_Query_Goal_Number(kActorGordo) == 206
+ ) {
Sound_Play(575, 50, 0, 0, 50);
Sound_Play(321, 50, 0, 0, 50);
}
- if (Player_Query_Current_Scene() == 55 && Actor_Query_Goal_Number(kActorGordo) == 207) {
+
+ if (Player_Query_Current_Scene() == kSceneNR02
+ && Actor_Query_Goal_Number(kActorGordo) == 207
+ ) {
Sound_Play(576, 50, 0, 0, 50);
Sound_Play(323, 50, 0, 0, 50);
}
- if (Player_Query_Current_Scene() == 55 && Actor_Query_Goal_Number(kActorGordo) == 208) {
+
+ if (Player_Query_Current_Scene() == kSceneNR02
+ && Actor_Query_Goal_Number(kActorGordo) == 208
+ ) {
Sound_Play(579, 50, 0, 0, 50);
Sound_Play(324, 50, 0, 0, 50);
}
- if (Player_Query_Current_Scene() == 55 && Actor_Query_Goal_Number(kActorGordo) > 205 && Actor_Query_Goal_Number(kActorGordo) < 210) {
+
+ if (Player_Query_Current_Scene() == kSceneNR02
+ && Actor_Query_Goal_Number(kActorGordo) > 205
+ && Actor_Query_Goal_Number(kActorGordo) < 210
+ ) {
Actor_Set_Goal_Number(kActorGordo, 205);
- //return true;
- return;
- } else if (Actor_Query_Goal_Number(kActorGordo) > 205 && Actor_Query_Goal_Number(kActorGordo) < 210) {
+ return; // true;
+ }
+
+ if (Actor_Query_Goal_Number(kActorGordo) > 205
+ && Actor_Query_Goal_Number(kActorGordo) < 210
+ ) {
Actor_Set_Goal_Number(kActorGordo, 204);
- //return true;
- return;
+ return; // true;
}
//return false;
}
-void SceneScriptNR02::sub_402134() {
- int v0 = Global_Variable_Query(50);
- if (v0 == 0) {
+void SceneScriptNR02::playNextMusic() {
+ int track = Global_Variable_Query(kVariableNR02Music);
+ if (track == 0) {
Music_Play(8, 41, 0, 2, -1, 0, 0);
- } else if (v0 == 1) {
+ } else if (track == 1) {
Music_Play(9, 41, 0, 2, -1, 0, 0);
- } else if (v0 == 2) {
+ } else if (track == 2) {
Music_Play(10, 41, 0, 2, -1, 0, 0);
}
- v0++;
- if (v0 > 2) {
- v0 = 0;
+ track++;
+ if (track > 2) {
+ track = 0;
}
- Global_Variable_Set(50, v0);
+ Global_Variable_Set(kVariableNR02Music, track);
}
} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/scene/nr03.cpp b/engines/bladerunner/script/scene/nr03.cpp
index a2a09cbb85..641b5c443d 100644
--- a/engines/bladerunner/script/scene/nr03.cpp
+++ b/engines/bladerunner/script/scene/nr03.cpp
@@ -132,11 +132,12 @@ bool SceneScriptNR03::ClickedOnExit(int exitId) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 410.0f, -70.19f, -715.0f, 0, 1, false, 0)) {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(534);
+ Game_Flag_Set(kFlagNR03toNR01);
Set_Enter(kSetNR01, kSceneNR01);
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -161.0f, -70.19f, -1139.0f, 0, 1, false, 0)) {
if (Actor_Query_Which_Set_In(kActorHanoi) == 55) {
@@ -164,6 +165,7 @@ bool SceneScriptNR03::ClickedOnExit(int exitId) {
return true;
}
+
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -151.0f, -70.19f, -476.0f, 12, 1, false, 0)) {
if (Actor_Query_Goal_Number(kActorHanoi) == 213 || Actor_Query_Which_Set_In(kActorHanoi) != 55) {
@@ -261,14 +263,14 @@ void SceneScriptNR03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptNR03::PlayerWalkedIn() {
Player_Set_Combat_Mode(false);
if (Game_Flag_Query(573)) {
- if (Game_Flag_Query(535) ) {
+ if (Game_Flag_Query(kFlagNR01toNR03) ) {
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 302.0f, -70.19f, -715.0f, 0, 0, false, 0);
- Game_Flag_Reset(535);
+ Game_Flag_Reset(kFlagNR01toNR03);
}
} else {
Game_Flag_Set(573);
Async_Actor_Walk_To_XYZ(kActorMcCoy, 206.0f, -70.19f, -643.0f, 0, false);
- Game_Flag_Reset(535);
+ Game_Flag_Reset(kFlagNR01toNR03);
Actor_Voice_Over(1490, kActorVoiceOver);
Actor_Voice_Over(1510, kActorVoiceOver);
Actor_Voice_Over(1520, kActorVoiceOver);