aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPeter Kohaut2019-01-27 14:08:23 +0100
committerPeter Kohaut2019-01-27 20:27:45 +0100
commit5c1b8a635a3c057a1a797eacc39182135e065050 (patch)
tree06993556f4c287bd036e5f1c26e7051d3a98353a /engines
parent2fd99c5c1b3f0855ac94908ce14dfbc445f26ed6 (diff)
downloadscummvm-rg350-5c1b8a635a3c057a1a797eacc39182135e065050.tar.gz
scummvm-rg350-5c1b8a635a3c057a1a797eacc39182135e065050.tar.bz2
scummvm-rg350-5c1b8a635a3c057a1a797eacc39182135e065050.zip
BLADERUNNER: Initial cleanup of HF05 & HF06
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/game_constants.h12
-rw-r--r--engines/bladerunner/script/scene/hf05.cpp413
-rw-r--r--engines/bladerunner/script/scene/hf06.cpp99
-rw-r--r--engines/bladerunner/script/scene/ps09.cpp9
-rw-r--r--engines/bladerunner/script/scene_script.h12
5 files changed, 327 insertions, 218 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 73d0a9d2aa..a955027318 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -903,6 +903,8 @@ enum Flags {
kFlagCT10Entered = 525,
kFlagHF02toHF03 = 527,
kFlagHF03toHF02 = 528,
+ kFlagHF05toHF06 = 529, // is never checked
+ kFlagHF06toHF05 = 530,
kFlagCT11toDR01 = 531,
kFlagCT09Entered = 538,
kFlagCT09LeonInterrupted = 539,
@@ -912,6 +914,8 @@ enum Flags {
kFlagDR06MannequinHeadOpen = 548,
kFlagMcCoyTiedDown = 550,
kFlagDR01toCT11 = 558,
+ kFlagHF05CrazyLegsTalk1 = 562,
+ kFlagHF05CrazyLegsTalk2 = 563,
kFlagHF03toHF04 = 566, // is never checked
kFlagHF04toHF03 = 567,
kFlagHF04DoorsClosed = 584,
@@ -1113,7 +1117,7 @@ enum Scenes {
kSceneHF02 = 35, // Hysteria Hall - Hall of Mirrors - Exit
kSceneHF03 = 36, // Hysteria Hall - Hysteria Arcade
kSceneHF04 = 37, // Hysteria Hall - Hall of Mirrors
- kSceneHF05 = 38,
+ kSceneHF05 = 38, // Hysteria Hall - Crazy Legs Larry Autos
kSceneHF06 = 39,
kSceneHF07 = 40,
kSceneKP01 = 41,
@@ -1144,9 +1148,9 @@ enum Scenes {
kScenePS02 = 66, // Police Station - Elevator
kScenePS03 = 67, // Police Station - Ground floor
kScenePS04 = 68, // Police Station - Guzza's Office
- kScenePS05 = 69,
- kScenePS06 = 70,
- kScenePS07 = 71,
+ kScenePS05 = 69, // Police Station - Mainframe & Shoting range hallway
+ kScenePS06 = 70, // Police Station - ESPER room
+ kScenePS07 = 71, // Police Station - Labratory
kScenePS09 = 72, // Police Station - Lockup
kScenePS10 = 73, // Police Station - Shooting range 1
kScenePS11 = 74, // Police Station - Shooting range 2
diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp
index 4838c27089..13773f0c54 100644
--- a/engines/bladerunner/script/scene/hf05.cpp
+++ b/engines/bladerunner/script/scene/hf05.cpp
@@ -24,28 +24,37 @@
namespace BladeRunner {
+enum kHF05Loops {
+ kHF05LoopMainLoopNoSpinner = 0,
+ kHF05LoopMainLoopSpinner = 2,
+ kHF05LoopArmAnimation = 4,
+ kHF05LoopMainLoopHole = 5
+};
+
void SceneScriptHF05::InitializeScene() {
- if (Game_Flag_Query(530)) {
+ if (Game_Flag_Query(kFlagHF06toHF05)) {
Setup_Scene_Information(257.0f, 40.63f, 402.0f, 1000);
} 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);
}
+
Scene_Exit_Add_2D_Exit(0, 443, 270, 515, 350, 0);
if (Global_Variable_Query(kVariableChapter) > 3) {
Scene_Exit_Add_2D_Exit(1, 367, 298, 399, 349, 2);
}
- Scene_Exit_Add_2D_Exit(2, 589, 0, 639, 479, 1);
+ Scene_Exit_Add_2D_Exit(2, 589, 0, 639, 479, 1);
+
Ambient_Sounds_Add_Looping_Sound(103, 40, 1, 1);
if (Game_Flag_Query(369)) {
- Scene_Loop_Set_Default(5);
- sub_404474();
+ Scene_Loop_Set_Default(kHF05LoopMainLoopHole);
+ addAmbientSounds();
} else if (Game_Flag_Query(559)) {
- Scene_Loop_Set_Default(2);
- sub_404474();
+ Scene_Loop_Set_Default(kHF05LoopMainLoopSpinner);
+ addAmbientSounds();
} else {
- Scene_Loop_Set_Default(0);
+ Scene_Loop_Set_Default(kHF05LoopMainLoopNoSpinner);
}
}
@@ -66,8 +75,8 @@ bool SceneScriptHF05::MouseClick(int x, int y) {
}
bool SceneScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) {
- if (Object_Query_Click("TOP CON", objectName) == 1) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, 40.63f, 308.0f, 0, 1, false, 0)) {
+ if (Object_Query_Click("TOP CON", objectName)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, 40.63f, 308.0f, 0, true, false, 0)) {
Actor_Face_Object(kActorMcCoy, "TOP CON", true);
if (Actor_Query_In_Set(kActorCrazylegs, kSetHF05)
&& Actor_Query_Goal_Number(kActorCrazylegs) != 1
@@ -75,57 +84,64 @@ bool SceneScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) {
) {
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Says(kActorCrazylegs, 480, 13);
- } else if (!Game_Flag_Query(662)
- || Game_Flag_Query(369)
+ return true;
+ }
+
+ if (!Game_Flag_Query(662)
+ || Game_Flag_Query(369)
) {
Actor_Change_Animation_Mode(kActorMcCoy, 23);
Sound_Play(412, 100, 0, 0, 50);
- } else {
- Player_Loses_Control();
- Actor_Set_Goal_Number(kActorOfficerLeary, 425);
- Game_Flag_Set(369);
- Game_Flag_Set(368);
- Obstacle_Object("OBSTACLE_HOLE", true);
- Unobstacle_Object("MONTE CARLO DRY", true);
- if (sub_4048C0()) {
- Loop_Actor_Walk_To_XYZ(sub_4048C0(), 181.54f, 40.63f, 388.09f, 0, 0, true, 0);
- Actor_Face_Actor(kActorMcCoy, sub_4048C0(), true);
- Actor_Face_Actor(sub_4048C0(), kActorMcCoy, true);
- Actor_Says(kActorMcCoy, 1785, 3);
- Actor_Says(kActorMcCoy, 1790, 3);
- }
- Actor_Face_Heading(kActorMcCoy, 0, false);
- Actor_Change_Animation_Mode(kActorMcCoy, 23);
- Scene_Loop_Set_Default(5);
- Scene_Loop_Start_Special(kSceneLoopModeOnce, 4, true);
- if (sub_4048C0()) {
- if (sub_4048C0() == 3) {
- Actor_Face_Heading(kActorDektora, 0, false);
- Ambient_Sounds_Play_Sound(147, 50, 99, 0, 0);
- Delay(3000);
- Actor_Face_Heading(kActorDektora, 0, false);
- Actor_Change_Animation_Mode(kActorDektora, 23);
- } else {
- Actor_Face_Heading(kActorLucy, 0, false);
- Ambient_Sounds_Play_Sound(147, 50, 99, 0, 0);
- Delay(3000);
- Actor_Face_Heading(kActorLucy, 0, false);
- Actor_Change_Animation_Mode(kActorLucy, 13);
- }
- Actor_Face_Actor(kActorMcCoy, sub_4048C0(), true);
- Actor_Says(kActorMcCoy, 1805, 3);
+ return true;
+ }
+
+ Player_Loses_Control();
+ Actor_Set_Goal_Number(kActorOfficerLeary, 425);
+ Game_Flag_Set(369);
+ Game_Flag_Set(368);
+ Obstacle_Object("OBSTACLE_HOLE", true);
+ Unobstacle_Object("MONTE CARLO DRY", true);
+
+ if (sub_4048C0() != kActorMcCoy) {
+ Loop_Actor_Walk_To_XYZ(sub_4048C0(), 181.54f, 40.63f, 388.09f, 0, false, true, 0);
+ Actor_Face_Actor(kActorMcCoy, sub_4048C0(), true);
+ Actor_Face_Actor(sub_4048C0(), kActorMcCoy, true);
+ Actor_Says(kActorMcCoy, 1785, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 1790, kAnimationModeTalk);
+ }
+
+ Actor_Face_Heading(kActorMcCoy, 0, false);
+ Actor_Change_Animation_Mode(kActorMcCoy, 23);
+ Scene_Loop_Set_Default(kHF05LoopMainLoopHole);
+ Scene_Loop_Start_Special(kSceneLoopModeOnce, kHF05LoopArmAnimation, true);
+
+ if (sub_4048C0() != kActorMcCoy) {
+ if (sub_4048C0() == kActorDektora) {
+ Actor_Face_Heading(kActorDektora, 0, false);
+ Ambient_Sounds_Play_Sound(147, 50, 99, 0, 0);
+ Delay(3000);
+ Actor_Face_Heading(kActorDektora, 0, false);
+ Actor_Change_Animation_Mode(kActorDektora, 23);
} else {
- ADQ_Flush();
- ADQ_Add(kActorVoiceOver, 940, -1);
+ Actor_Face_Heading(kActorLucy, 0, false);
Ambient_Sounds_Play_Sound(147, 50, 99, 0, 0);
- Delay(1500);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 181.54f, 40.63f, 388.09f, 0, false, true, 0);
- Actor_Face_Heading(kActorMcCoy, 0, false);
- Actor_Change_Animation_Mode(kActorMcCoy, 23);
- Actor_Clue_Lose(kActorMcCoy, kClueBomb);
+ Delay(3000);
+ Actor_Face_Heading(kActorLucy, 0, false);
+ Actor_Change_Animation_Mode(kActorLucy, 13);
}
- Player_Gains_Control();
+ Actor_Face_Actor(kActorMcCoy, sub_4048C0(), true);
+ Actor_Says(kActorMcCoy, 1805, kAnimationModeTalk);
+ } else {
+ ADQ_Flush();
+ ADQ_Add(kActorVoiceOver, 940, -1);
+ Ambient_Sounds_Play_Sound(147, 50, 99, 0, 0);
+ Delay(1500);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 181.54f, 40.63f, 388.09f, 0, false, true, 0);
+ Actor_Face_Heading(kActorMcCoy, 0, false);
+ Actor_Change_Animation_Mode(kActorMcCoy, 23);
+ Actor_Clue_Lose(kActorMcCoy, kClueBomb);
}
+ Player_Gains_Control();
}
return true;
}
@@ -137,7 +153,7 @@ bool SceneScriptHF05::ClickedOnActor(int actorId) {
if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorCrazylegs, 60, true, false)) {
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
- sub_402AE4();
+ dialogueWithCrazylegs1();
}
}
return false;
@@ -157,6 +173,7 @@ bool SceneScriptHF05::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 330.0f, 40.63f, -85.0f, 0, true, false, 0)) {
if (!Game_Flag_Query(684)) {
@@ -174,10 +191,11 @@ bool SceneScriptHF05::ClickedOnExit(int exitId) {
}
return true;
}
+
if (exitId == 2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 277.0f, 40.63f, 410.0f, 0, true, false, 0)) {
if (!Game_Flag_Query(684)) {
- Game_Flag_Set(529);
+ Game_Flag_Set(kFlagHF05toHF06);
Set_Enter(kSetHF06, kSceneHF06);
}
}
@@ -195,40 +213,52 @@ void SceneScriptHF05::SceneFrameAdvanced(int frame) {
case 126:
Sound_Play(352, 90, -20, 70, 50);
break;
+
case 152:
Sound_Play(346, 90, 0, 0, 50);
break;
+
case 156:
Sound_Play(348, 47, 100, 100, 50);
break;
+
case 161:
Sound_Play(345, 90, 0, 0, 50);
break;
+
case 176:
Sound_Play(350, 32, 100, 100, 50);
break;
+
case 178:
Sound_Play(355, 47, 100, 100, 50);
break;
+
case 179:
Sound_Play(490, 90, 0, 0, 50);
Music_Play(1, 50, 0, 2, -1, 0, 0);
break;
+
case 186:
Sound_Play(343, 32, 100, 100, 50);
break;
+
case 209:
Sound_Play(353, 90, 100, -20, 50);
break;
+
case 243:
Sound_Play(349, 40, -20, -20, 50);
break;
+
case 261:
Sound_Play(344, 47, -20, -20, 50);
break;
+
case 268:
Sound_Play(351, 58, -20, -20, 50);
break;
+
case 269:
Sound_Play(354, 43, -20, -20, 50);
break;
@@ -237,7 +267,9 @@ void SceneScriptHF05::SceneFrameAdvanced(int frame) {
}
void SceneScriptHF05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
- if (actorId == kActorOfficerLeary && newGoal == 430) {
+ if (actorId == kActorOfficerLeary
+ && newGoal == 430
+ ) {
Game_Flag_Set(684);
sub_4042E4();
}
@@ -247,13 +279,15 @@ void SceneScriptHF05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptHF05::PlayerWalkedIn() {
if (Game_Flag_Query(662)) {
int affectionTowardsActor = getAffectionTowardsActor();
- if (Game_Flag_Query(662) && affectionTowardsActor != -1) {
+ if (Game_Flag_Query(662)
+ && affectionTowardsActor != -1
+ ) {
Actor_Put_In_Set(affectionTowardsActor, kSetHF05);
Actor_Force_Stop_Walking(affectionTowardsActor);
if (Game_Flag_Query(kFlagHF01toHF05)) {
Actor_Set_At_XYZ(affectionTowardsActor, 506.81f, 40.63f, -140.92f, 0);
Async_Actor_Walk_To_Waypoint(affectionTowardsActor, 437, 36, 0);
- } else if (Game_Flag_Query(530)) {
+ } else if (Game_Flag_Query(kFlagHF06toHF05)) {
Actor_Set_At_XYZ(affectionTowardsActor, 288.0f, 40.63f, 410.0f, 909);
} else if (Game_Flag_Query(kFlagHF07toHF05)) {
Actor_Set_At_XYZ(affectionTowardsActor, 298.0f, 40.63f, -107.0f, 512);
@@ -261,14 +295,19 @@ void SceneScriptHF05::PlayerWalkedIn() {
Actor_Set_At_XYZ(affectionTowardsActor, 284.0f, 40.63f, 286.0f, 0);
}
}
+
if (Game_Flag_Query(684)) {
sub_4042E4();
- } else if (Actor_Clue_Query(kActorMcCoy, kClueSpinnerKeys) || Game_Flag_Query(559)) {
- if (Game_Flag_Query(559) && !Game_Flag_Query(663)) {
+ } else if (Actor_Clue_Query(kActorMcCoy, kClueSpinnerKeys)
+ || Game_Flag_Query(559)
+ ) {
+ if ( Game_Flag_Query(559)
+ && !Game_Flag_Query(663)
+ ) {
Game_Flag_Set(663);
Music_Play(1, 40, 0, 2, -1, 0, 0);
- Actor_Says(kActorOfficerGrayford, 200, 3);
- Actor_Says(kActorOfficerGrayford, 210, 3);
+ Actor_Says(kActorOfficerGrayford, 200, kAnimationModeTalk);
+ Actor_Says(kActorOfficerGrayford, 210, kAnimationModeTalk);
Actor_Set_Goal_Number(kActorOfficerLeary, 420);
if (sub_4048C0() == 3) {
sub_403F0C();
@@ -280,24 +319,26 @@ void SceneScriptHF05::PlayerWalkedIn() {
sub_403A34(affectionTowardsActor);
}
} else if (Game_Flag_Query(kFlagHF01toHF05)) {
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 399.0f, 40.63f, -85.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 399.0f, 40.63f, -85.0f, 0, false, false, 0);
} 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);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 4, true, kAnimationModeIdle);
}
+
if (Actor_Query_In_Set(kActorCrazylegs, kSetHF05)) {
- if (Game_Flag_Query(562)) {
- if (!Game_Flag_Query(563) && Global_Variable_Query(kVariableChapter) == 3) {
- sub_402970();
- Game_Flag_Set(563);
- }
- } else {
- sub_402370();
- Game_Flag_Set(562);
+ if (!Game_Flag_Query(kFlagHF05CrazyLegsTalk1)) {
+ talkWithCrazyLegs1();
+ Game_Flag_Set(kFlagHF05CrazyLegsTalk1);
+ } else if (!Game_Flag_Query(kFlagHF05CrazyLegsTalk2)
+ && Global_Variable_Query(kVariableChapter) == 3
+ ) {
+ talkWithCrazyLegs2();
+ Game_Flag_Set(kFlagHF05CrazyLegsTalk2);
}
}
+
Game_Flag_Reset(kFlagHF01toHF05);
- Game_Flag_Reset(530);
+ Game_Flag_Reset(kFlagHF06toHF05);
Game_Flag_Reset(kFlagHF07toHF05);
//return false;
@@ -314,58 +355,72 @@ void SceneScriptHF05::PlayerWalkedOut() {
void SceneScriptHF05::DialogueQueueFlushed(int a1) {
}
-void SceneScriptHF05::sub_402970() {
- Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 72, 0, false);
+void SceneScriptHF05::talkWithCrazyLegs2() {
+ Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 72, false, false);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
- Actor_Says(kActorCrazylegs, 370, 3);
- Actor_Says(kActorMcCoy, 1855, 3);
+ Actor_Says(kActorCrazylegs, 370, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 1855, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 380, 12);
Actor_Says(kActorCrazylegs, 390, 14);
Actor_Says(kActorCrazylegs, 400, 15);
Actor_Says(kActorCrazylegs, 410, 16);
- Actor_Says(kActorMcCoy, 1860, 3);
- Actor_Says(kActorCrazylegs, 420, 3);
- Actor_Says(kActorMcCoy, 1865, 3);
+ Actor_Says(kActorMcCoy, 1860, kAnimationModeTalk);
+ Actor_Says(kActorCrazylegs, 420, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 1865, kAnimationModeTalk);
}
-void SceneScriptHF05::sub_402AE4() {
+void SceneScriptHF05::dialogueWithCrazylegs1() {
Dialogue_Menu_Clear_List();
- if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) == 1 && Global_Variable_Query(kVariableChapter) == 3) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1180, 3, 6, 7);
+ if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) // bug? there is no way how to obtain this clue
+ && Global_Variable_Query(kVariableChapter) == 3
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1180, 3, 6, 7); // ADVERTISEMENT
}
- if (Actor_Clue_Query(kActorMcCoy, kClueCrazylegsInterview1) == 1) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1190, 2, 7, 4);
+ if (Actor_Clue_Query(kActorMcCoy, kClueCrazylegsInterview1)) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1190, 2, 7, 4); // WOMAN
}
- if (Actor_Clue_Query(kActorMcCoy, kClueDektorasDressingRoom) == 1) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1200, 5, 5, 3);
+ if (Actor_Clue_Query(kActorMcCoy, kClueDektorasDressingRoom)) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1200, 5, 5, 3); // WOMAN'S PHOTO
}
- if (Actor_Clue_Query(kActorMcCoy, kClueLucy) == 1 && Actor_Query_Goal_Number(kActorLucy) != 599) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1210, 4, 6, 2);
+ if (Actor_Clue_Query(kActorMcCoy, kClueLucy)
+ && Actor_Query_Goal_Number(kActorLucy) != 599
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1210, 4, 6, 2); // LUCY'S PHOTO
}
- if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansResources) == 1 || (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) == 1 && Global_Variable_Query(kVariableChapter) == 3)) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1220, -1, 2, 8);
+ if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansResources)
+ || (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
+ && Global_Variable_Query(kVariableChapter) == 3
+ )
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1220, -1, 2, 8); // GRIGORIAN
}
- if (Actor_Clue_Query(kActorMcCoy, kClueCarRegistration1) == 1 || Actor_Clue_Query(kActorMcCoy, kClueCarRegistration3) == 1) {
- DM_Add_To_List_Never_Repeat_Once_Selected(1230, 4, 7, -1);
+ if (Actor_Clue_Query(kActorMcCoy, kClueCarRegistration1)
+ || Actor_Clue_Query(kActorMcCoy, kClueCarRegistration3)
+ ) {
+ DM_Add_To_List_Never_Repeat_Once_Selected(1230, 4, 7, -1); // CAR REGISTRATION
}
+
if (!Dialogue_Menu_Query_List_Size()) {
Actor_Says(kActorMcCoy, 1880, 15);
- Actor_Says(kActorCrazylegs, 490, 3);
- Actor_Says(kActorMcCoy, 1885, 3);
+ Actor_Says(kActorCrazylegs, 490, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 1885, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 500, 16);
return;
}
- Dialogue_Menu_Add_DONE_To_List(1240);
+
+ Dialogue_Menu_Add_DONE_To_List(1240); // DONE
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
+
switch (answer) {
- case 1180:
+ case 1180: // ADVERTISEMENT
Actor_Says(kActorMcCoy, 1890, 23);
- Actor_Says(kActorCrazylegs, 510, 3);
+ Actor_Says(kActorCrazylegs, 510, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 1920, 23);
- Actor_Says(kActorMcCoy, 1925, 3);
+ Actor_Says(kActorMcCoy, 1925, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 530, 12);
Actor_Says(kActorMcCoy, 1930, 18);
Actor_Says(kActorCrazylegs, 540, 14);
@@ -376,47 +431,51 @@ void SceneScriptHF05::sub_402AE4() {
Actor_Says(kActorCrazylegs, 560, 15);
Actor_Says(kActorCrazylegs, 570, 16);
Actor_Says(kActorMcCoy, 1950, 17);
- sub_403738();
+ dialogueWithCrazylegs2();
break;
- case 1190:
- Actor_Says(kActorMcCoy, 1895, 0);
- Actor_Says(kActorCrazylegs, 620, 3);
+
+ case 1190: // WOMAN
+ Actor_Says(kActorMcCoy, 1895, kAnimationModeIdle);
+ Actor_Says(kActorCrazylegs, 620, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 630, 12);
Actor_Says(kActorMcCoy, 2000, 13);
Actor_Says(kActorCrazylegs, 640, 14);
Actor_Says(kActorCrazylegs, 650, 15);
Actor_Says(kActorCrazylegs, 660, 16);
- Actor_Says(kActorMcCoy, 2005, 0);
- Actor_Says(kActorMcCoy, 2010, 3);
- Actor_Says(kActorCrazylegs, 670, 3);
+ Actor_Says(kActorMcCoy, 2005, kAnimationModeIdle);
+ Actor_Says(kActorMcCoy, 2010, kAnimationModeTalk);
+ Actor_Says(kActorCrazylegs, 670, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 680, 12);
Actor_Says(kActorCrazylegs, 690, 14);
Actor_Says(kActorMcCoy, 2015, 14);
Actor_Says(kActorCrazylegs, 700, 15);
Actor_Says(kActorMcCoy, 2020, 18);
break;
- case 1200:
+
+ case 1200: // WOMAN'S PHOTO
Actor_Says(kActorMcCoy, 1900, 23);
Actor_Says(kActorCrazylegs, 710, 16);
- Actor_Says(kActorMcCoy, 2025, 0);
- Actor_Says(kActorCrazylegs, 720, 3);
+ Actor_Says(kActorMcCoy, 2025, kAnimationModeIdle);
+ Actor_Says(kActorCrazylegs, 720, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 730, 12);
break;
- case 1210:
+
+ case 1210: // LUCY'S PHOTO
Actor_Says(kActorMcCoy, 1905, 23);
Actor_Says(kActorCrazylegs, 740, 14);
Actor_Says(kActorMcCoy, 2030, 13);
Actor_Says(kActorCrazylegs, 750, 15);
Actor_Says(kActorMcCoy, 2035, 18);
Actor_Says(kActorCrazylegs, 760, 16);
- Actor_Says(kActorCrazylegs, 770, 3);
- Actor_Says(kActorMcCoy, 2040, 0);
+ Actor_Says(kActorCrazylegs, 770, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 2040, kAnimationModeIdle);
break;
- case 1220:
- Actor_Says(kActorMcCoy, 1910, 3);
+
+ case 1220: // GRIGORIAN
+ Actor_Says(kActorMcCoy, 1910, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 780, 12);
Actor_Says(kActorMcCoy, 2045, 17);
- Actor_Says(kActorMcCoy, 2050, 3);
+ Actor_Says(kActorMcCoy, 2050, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 790, 14);
Actor_Says(kActorMcCoy, 2055, 19);
Actor_Says(kActorMcCoy, 2060, -1);
@@ -424,59 +483,62 @@ void SceneScriptHF05::sub_402AE4() {
Actor_Says(kActorMcCoy, 2065, 18);
Actor_Says(kActorMcCoy, 2070, 14);
Actor_Says(kActorCrazylegs, 810, 16);
- sub_403738();
+ dialogueWithCrazylegs2();
break;
- case 1230:
+
+ case 1230: // CAR REGISTRATION
Actor_Says(kActorMcCoy, 1915, 12);
if (Actor_Clue_Query(kActorMcCoy, kClueCarRegistration1)) {
- Actor_Says(kActorCrazylegs, 820, 3);
+ Actor_Says(kActorCrazylegs, 820, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 2075, 13);
Actor_Says(kActorCrazylegs, 830, 12);
Actor_Says(kActorCrazylegs, 840, 14);
Actor_Says(kActorCrazylegs, 850, 15);
- Actor_Says(kActorMcCoy, 2080, 3);
+ Actor_Says(kActorMcCoy, 2080, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 860, 16);
- Actor_Says(kActorCrazylegs, 870, 3);
+ Actor_Says(kActorCrazylegs, 870, kAnimationModeTalk);
} else if (Actor_Clue_Query(kActorMcCoy, kClueCarRegistration3)) {
Actor_Says(kActorCrazylegs, 880, 12);
Actor_Says(kActorCrazylegs, 890, 14);
- Actor_Says(kActorMcCoy, 2085, 3);
+ Actor_Says(kActorMcCoy, 2085, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 900, 15);
Actor_Says(kActorMcCoy, 2090, 19);
Actor_Says(kActorCrazylegs, 910, 16);
Actor_Says(kActorMcCoy, 2095, 14);
- Actor_Says(kActorCrazylegs, 920, 3);
+ Actor_Says(kActorCrazylegs, 920, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 2100, 15);
Actor_Says(kActorCrazylegs, 930, 12);
Actor_Says(kActorCrazylegs, 940, 14);
- Actor_Says(kActorMcCoy, 2105, 3);
+ Actor_Says(kActorMcCoy, 2105, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 950, 15);
- Actor_Says(kActorMcCoy, 2110, 0);
+ Actor_Says(kActorMcCoy, 2110, kAnimationModeIdle);
Actor_Says(kActorCrazylegs, 960, 16);
}
break;
}
}
-void SceneScriptHF05::sub_403738() {
+void SceneScriptHF05::dialogueWithCrazylegs2() {
Dialogue_Menu_Clear_List();
- DM_Add_To_List_Never_Repeat_Once_Selected(1250, -1, -1, 10);
- DM_Add_To_List_Never_Repeat_Once_Selected(1260, 10, 5, -1);
+ DM_Add_To_List_Never_Repeat_Once_Selected(1250, -1, -1, 10); // ARREST
+ DM_Add_To_List_Never_Repeat_Once_Selected(1260, 10, 5, -1); // WARNING
+
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
- if (answer == 1250) {
+
+ if (answer == 1250) { // ARREST
Actor_Says(kActorMcCoy, 1955, 17);
Actor_Says(kActorMcCoy, 1960, 23);
Item_Pickup_Spin_Effect(986, 315, 327);
Delay(2000);
Actor_Says(kActorMcCoy, 1980, 23);
- Actor_Says(kActorMcCoy, 1985, 3);
- Actor_Says(kActorCrazylegs, 580, 3);
+ Actor_Says(kActorMcCoy, 1985, kAnimationModeTalk);
+ Actor_Says(kActorCrazylegs, 580, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 590, 15);
Actor_Says(kActorMcCoy, 1990, 17);
Actor_Says(kActorCrazylegs, 600, 16);
- Actor_Says(kActorMcCoy, 1995, 3);
+ Actor_Says(kActorMcCoy, 1995, kAnimationModeTalk);
Game_Flag_Set(kFlagCrazylegsArrested);
Actor_Put_In_Set(kActorCrazylegs, kSetPS09);
Actor_Set_At_XYZ(kActorCrazylegs, -315.15f, 0.0f, 241.06f, 583);
@@ -488,10 +550,10 @@ void SceneScriptHF05::sub_403738() {
Game_Flag_Set(kFlagHF05toHF01);
Set_Enter(kSetHF01, kSceneHF01);
}
- } else if (answer == 1260) {
+ } else if (answer == 1260) { // WARNING
Actor_Says(kActorMcCoy, 1965, 12);
- Actor_Says(kActorMcCoy, 1970, 3);
- Actor_Says(kActorMcCoy, 1975, 3);
+ Actor_Says(kActorMcCoy, 1970, kAnimationModeTalk);
+ Actor_Says(kActorMcCoy, 1975, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 610, 16);
}
}
@@ -527,7 +589,7 @@ void SceneScriptHF05::sub_403F0C() {
Actor_Face_Actor(kActorMcCoy, kActorDektora, true);
Actor_Face_Actor(kActorDektora, kActorMcCoy, true);
Actor_Says(kActorDektora, 2660, 12);
- Actor_Says(kActorMcCoy, 8990, 3);
+ Actor_Says(kActorMcCoy, 8990, kAnimationModeTalk);
Actor_Says(kActorDektora, 2670, 13);
Actor_Says(kActorDektora, 2680, 17);
Actor_Says(kActorMcCoy, 8995, 14);
@@ -537,8 +599,8 @@ void SceneScriptHF05::sub_403F0C() {
Actor_Says(kActorMcCoy, 1765, 17);
Actor_Says(kActorDektora, 160, 12);
Actor_Says(kActorMcCoy, 1770, 15);
- Actor_Says(kActorMcCoy, 1775, 3);
- Actor_Says(kActorDektora, 170, 3);
+ Actor_Says(kActorMcCoy, 1775, kAnimationModeTalk);
+ Actor_Says(kActorDektora, 170, kAnimationModeTalk);
Actor_Says_With_Pause(kActorMcCoy, 1780, 1.0f, 18);
}
@@ -553,64 +615,66 @@ void SceneScriptHF05::sub_40410C() {
Actor_Says(kActorLucy, 430, 18);
Actor_Says_With_Pause(kActorMcCoy, 1760, 1.0f, 15);
Actor_Says(kActorMcCoy, 1765, 17);
- Actor_Says(kActorLucy, 440, 3);
+ Actor_Says(kActorLucy, 440, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 1770, 15);
- Actor_Says(kActorMcCoy, 1775, 3);
+ Actor_Says(kActorMcCoy, 1775, kAnimationModeTalk);
Actor_Says(kActorLucy, 450, 17);
Actor_Says_With_Pause(kActorMcCoy, 1780, 1.0f, 18);
}
void SceneScriptHF05::sub_403A34(int affectionTowardsActor) {
- if (affectionTowardsActor != -1 && Actor_Query_In_Set(kActorCrazylegs, kSetHF05)) {
- Async_Actor_Walk_To_Waypoint(affectionTowardsActor, 437, 36, 0);
- Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 437, 0, 0, false);
+ if (affectionTowardsActor != -1
+ && Actor_Query_In_Set(kActorCrazylegs, kSetHF05)
+ ) {
+ Async_Actor_Walk_To_Waypoint(affectionTowardsActor, 437, 36, false);
+ Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 437, 0, false, false);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
Actor_Face_Actor(affectionTowardsActor, kActorCrazylegs, true);
- Actor_Says(kActorCrazylegs, 0, 3);
+ Actor_Says(kActorCrazylegs, 0, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 10, 12);
Actor_Says(kActorMcCoy, 1715, 19);
Actor_Says(kActorMcCoy, 1720, -1);
Actor_Says(kActorCrazylegs, 20, 14);
Actor_Says(kActorCrazylegs, 30, 15);
- Actor_Says(kActorMcCoy, 1725, 3);
+ Actor_Says(kActorMcCoy, 1725, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 40, 16);
- Actor_Says(kActorCrazylegs, 50, 3);
+ Actor_Says(kActorCrazylegs, 50, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 60, 12);
Actor_Says(kActorCrazylegs, 70, 13);
- Actor_Says(kActorMcCoy, 1730, 3);
- Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 28, 0, false);
+ Actor_Says(kActorMcCoy, 1730, kAnimationModeTalk);
+ Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 28, false, false);
Item_Pickup_Spin_Effect(986, 315, 327);
Actor_Says(kActorCrazylegs, 80, 23);
Actor_Clue_Acquire(kActorMcCoy, kClueSpinnerKeys, true, kActorCrazylegs);
Actor_Says(kActorCrazylegs, 90, 15);
Actor_Says(kActorMcCoy, 1735, 17);
Actor_Says(kActorCrazylegs, 100, 16);
- Actor_Says(kActorCrazylegs, 110, 3);
+ Actor_Says(kActorCrazylegs, 110, kAnimationModeTalk);
Actor_Face_Actor(affectionTowardsActor, kActorMcCoy, true);
if (affectionTowardsActor == kActorDektora) {
- Actor_Says(kActorDektora, 90, 3);
+ Actor_Says(kActorDektora, 90, kAnimationModeTalk);
} else {
- Actor_Says(kActorLucy, 380, 3);
+ Actor_Says(kActorLucy, 380, kAnimationModeTalk);
}
Actor_Says(kActorMcCoy, 1740, 14);
Actor_Says(kActorCrazylegs, 120, 12);
Actor_Set_Goal_Number(kActorCrazylegs, 2);
if (affectionTowardsActor == kActorDektora) {
- Actor_Says(kActorDektora, 100, 3);
+ Actor_Says(kActorDektora, 100, kAnimationModeTalk);
} else {
- Actor_Says(kActorLucy, 390, 3);
+ Actor_Says(kActorLucy, 390, kAnimationModeTalk);
}
Actor_Face_Actor(kActorMcCoy, affectionTowardsActor, true);
- Actor_Says(kActorMcCoy, 1745, 3);
+ Actor_Says(kActorMcCoy, 1745, kAnimationModeTalk);
Async_Actor_Walk_To_XYZ(affectionTowardsActor, 309.0f, 40.63f, 402.0f, 0, false);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 277.0f, 40.63f, 410.0f, 0, 0, false, 0);
- Game_Flag_Set(529);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 277.0f, 40.63f, 410.0f, 0, false, false, 0);
+ Game_Flag_Set(kFlagHF05toHF06);
Set_Enter(kSetHF06, kSceneHF06);
}
}
-void SceneScriptHF05::sub_402370() {
+void SceneScriptHF05::talkWithCrazyLegs1() {
Player_Loses_Control();
if (Global_Variable_Query(kVariableChapter) == 3) {
ADQ_Flush();
@@ -619,33 +683,33 @@ void SceneScriptHF05::sub_402370() {
ADQ_Add(kActorCrazylegs, 150, 18);
ADQ_Add(kActorCrazylegs, 160, 17);
}
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 307.0f, 40.63f, 184.0f, 0, 0, false, 0);
- Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 72, 0, false);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 307.0f, 40.63f, 184.0f, 0, false, false, 0);
+ Loop_Actor_Walk_To_Actor(kActorCrazylegs, kActorMcCoy, 72, false, false);
Ambient_Sounds_Play_Sound(149, 99, 99, 0, 0);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
- Actor_Says(kActorCrazylegs, 170, 3);
+ Actor_Says(kActorCrazylegs, 170, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 180, 12);
Actor_Says(kActorCrazylegs, 190, 14);
Actor_Says(kActorCrazylegs, 200, 15);
Actor_Says(kActorMcCoy, 1815, 12);
Actor_Says(kActorCrazylegs, 210, 16);
Actor_Says(kActorMcCoy, 1820, -1);
- Actor_Says(kActorCrazylegs, 220, 3);
+ Actor_Says(kActorCrazylegs, 220, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 230, 12);
Actor_Says(kActorCrazylegs, 240, 14);
- Actor_Says(kActorMcCoy, 1825, 0);
+ Actor_Says(kActorMcCoy, 1825, kAnimationModeIdle);
Actor_Says(kActorCrazylegs, 250, 15);
Actor_Face_Object(kActorCrazylegs, "MONTE CARLO DRY", true);
Actor_Says(kActorCrazylegs, 260, 16);
Actor_Face_Object(kActorMcCoy, "MONTE CARLO DRY", true);
- Actor_Says(kActorMcCoy, 1830, 0);
+ Actor_Says(kActorMcCoy, 1830, kAnimationModeIdle);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
- Actor_Says(kActorCrazylegs, 270, 3);
+ Actor_Says(kActorCrazylegs, 270, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 280, 12);
Async_Actor_Walk_To_XYZ(kActorCrazylegs, 276.0f, 40.63f, 182.0f, 12, false);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 335.0f, 40.63f, 131.0f, 12, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 335.0f, 40.63f, 131.0f, 12, false, false, 0);
Actor_Face_Object(kActorCrazylegs, "MONTE CARLO DRY", true);
Actor_Face_Object(kActorMcCoy, "MONTE CARLO DRY", true);
Actor_Says(kActorCrazylegs, 290, 14);
@@ -653,19 +717,19 @@ void SceneScriptHF05::sub_402370() {
Actor_Says(kActorCrazylegs, 310, 16);
Actor_Says(kActorMcCoy, 1835, 12);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
- Actor_Says(kActorCrazylegs, 320, 3);
+ Actor_Says(kActorCrazylegs, 320, kAnimationModeTalk);
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
Actor_Says(kActorCrazylegs, 330, 12);
- Actor_Says(kActorMcCoy, 1840, 3);
+ Actor_Says(kActorMcCoy, 1840, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 340, 14);
- Actor_Says(kActorMcCoy, 1845, 3);
+ Actor_Says(kActorMcCoy, 1845, kAnimationModeTalk);
Actor_Says(kActorCrazylegs, 350, 15);
Actor_Says(kActorCrazylegs, 360, 16);
- Actor_Says(kActorMcCoy, 1850, 3);
+ Actor_Says(kActorMcCoy, 1850, kAnimationModeTalk);
Player_Gains_Control();
}
-void SceneScriptHF05::sub_404474() {
+void SceneScriptHF05::addAmbientSounds() {
Ambient_Sounds_Add_Sound(87, 20, 80, 20, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Speech_Sound(23, 250, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(23, 330, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
@@ -673,16 +737,21 @@ void SceneScriptHF05::sub_404474() {
Ambient_Sounds_Add_Speech_Sound(23, 360, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(24, 380, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(24, 510, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
- Ambient_Sounds_Add_Speech_Sound(38, 80, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
+ Ambient_Sounds_Add_Speech_Sound(38, 80, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(38, 160, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(38, 280, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
}
int SceneScriptHF05::sub_4048C0() {
- if (Actor_Query_In_Set(kActorDektora, kSetHF05) && Actor_Query_Goal_Number(kActorDektora) != 599) {
+ if (Actor_Query_In_Set(kActorDektora, kSetHF05)
+ && Actor_Query_Goal_Number(kActorDektora) != 599
+ ) {
return kActorDektora;
}
- if (Actor_Query_In_Set(kActorLucy, kSetHF05) && Actor_Query_Goal_Number(kActorLucy) != 599) {
+
+ if (Actor_Query_In_Set(kActorLucy, kSetHF05)
+ && Actor_Query_Goal_Number(kActorLucy) != 599
+ ) {
return kActorLucy;
}
return kActorMcCoy;
diff --git a/engines/bladerunner/script/scene/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp
index bb073bcce7..64ea124b2e 100644
--- a/engines/bladerunner/script/scene/hf06.cpp
+++ b/engines/bladerunner/script/scene/hf06.cpp
@@ -26,19 +26,21 @@ namespace BladeRunner {
void SceneScriptHF06::InitializeScene() {
Setup_Scene_Information(150.0f, 349.93f, 502.0f, 229);
- Game_Flag_Reset(529);
+ Game_Flag_Reset(kFlagHF05toHF06);
Scene_Exit_Add_2D_Exit(0, 195, 197, 271, 237, 2);
- Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1);
- Ambient_Sounds_Add_Looping_Sound(99, 40, -100, 1);
- Ambient_Sounds_Add_Looping_Sound(100, 40, 100, 1);
- Ambient_Sounds_Add_Sound(68, 10, 100, 25, 50, 0, 0, -101, -101, 0, 0);
- Ambient_Sounds_Add_Sound(69, 10, 100, 25, 50, 0, 0, -101, -101, 0, 0);
+
+ Ambient_Sounds_Add_Looping_Sound( 54, 50, 0, 1);
+ Ambient_Sounds_Add_Looping_Sound( 99, 40, -100, 1);
+ Ambient_Sounds_Add_Looping_Sound(100, 40, 100, 1);
+ Ambient_Sounds_Add_Sound( 68, 10, 100, 25, 50, 0, 0, -101, -101, 0, 0);
+ Ambient_Sounds_Add_Sound( 69, 10, 100, 25, 50, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(375, 10, 70, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(376, 10, 70, 50, 100, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(377, 10, 70, 50, 100, 0, 0, -101, -101, 0, 0);
+
if (Game_Flag_Query(559)) {
Scene_Loop_Set_Default(3);
- sub_4023E0();
+ addAmbientSounds();
} else {
Scene_Loop_Set_Default(0);
}
@@ -61,14 +63,22 @@ bool SceneScriptHF06::MouseClick(int x, int y) {
}
bool SceneScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) {
- if (Object_Query_Click("BOX28", objectName) || Object_Query_Click("BOX29", objectName) || Object_Query_Click("BOX30", objectName) || Object_Query_Click("HOOD BOX", objectName)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 14.33f, 367.93f, 399.0f, 0, 1, false, 0)) {
+ if (Object_Query_Click("BOX28", objectName)
+ || Object_Query_Click("BOX29", objectName)
+ || Object_Query_Click("BOX30", objectName)
+ || Object_Query_Click("HOOD BOX", objectName)
+ ) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 14.33f, 367.93f, 399.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 486, true);
- if (Actor_Query_In_Set(kActorDektora, kSetHF06) && Actor_Query_Goal_Number(kActorDektora) != 599) {
+ if (Actor_Query_In_Set(kActorDektora, kSetHF06)
+ && Actor_Query_Goal_Number(kActorDektora) != 599
+ ) {
Actor_Face_Actor(kActorDektora, kActorMcCoy, true);
Actor_Says(kActorDektora, 210, 12);
Actor_Says(kActorMcCoy, 2125, 12);
- } else if (Actor_Query_In_Set(kActorLucy, kSetHF06) && Actor_Query_Goal_Number(kActorLucy) != 599) {
+ } else if (Actor_Query_In_Set(kActorLucy, kSetHF06)
+ && Actor_Query_Goal_Number(kActorLucy) != 599
+ ) {
Actor_Face_Actor(kActorLucy, kActorMcCoy, true);
Actor_Says(kActorLucy, 490, 18);
Actor_Says(kActorMcCoy, 2125, 12);
@@ -78,15 +88,19 @@ bool SceneScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) {
}
return false;
}
- if (Object_Query_Click("BOX19", objectName) || Object_Query_Click("BOX21", objectName)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 290.0f, 367.93f, 318.0f, 0, 1, false, 0)) {
+
+ if (Object_Query_Click("BOX19", objectName)
+ || Object_Query_Click("BOX21", objectName)
+ ) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 290.0f, 367.93f, 318.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 85, true);
Actor_Says(kActorMcCoy, 8522, 0);
}
return false;
}
+
if (Object_Query_Click("BOX13", objectName)) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 63.0f, 367.93f, 120.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 63.0f, 367.93f, 120.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 568, true);
Actor_Says(kActorMcCoy, 8522, 0);
}
@@ -96,14 +110,18 @@ bool SceneScriptHF06::ClickedOn3DObject(const char *objectName, bool a2) {
}
bool SceneScriptHF06::ClickedOnActor(int actorId) {
- if (actorId == kActorLucy && Actor_Query_Goal_Number(kActorLucy) != 599) {
+ if (actorId == kActorLucy
+ && Actor_Query_Goal_Number(kActorLucy) != 599
+ ) {
Actor_Face_Actor(kActorLucy, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorLucy, true);
if (Game_Flag_Query(559)) {
Actor_Says(kActorLucy, 390, 18);
Actor_Says(kActorMcCoy, 2115, 17);
}
- } else if (actorId == kActorDektora && Actor_Query_Goal_Number(kActorDektora) != 599) {
+ } else if (actorId == kActorDektora
+ && Actor_Query_Goal_Number(kActorDektora) != 599
+ ) {
Actor_Face_Actor(kActorDektora, kActorMcCoy, true);
Actor_Face_Actor(kActorMcCoy, kActorDektora, true);
if (Game_Flag_Query(559)) {
@@ -120,12 +138,12 @@ bool SceneScriptHF06::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptHF06::ClickedOnExit(int exitId) {
if (exitId == 0) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 170.0f, 367.93f, 497.0f, 0, 1, false, 0)) {
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 170.0f, 367.93f, 497.0f, 0, true, false, 0)) {
Actor_Face_Heading(kActorMcCoy, 730, false);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 0, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 2, false, kAnimationModeIdle);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
- Game_Flag_Set(530);
+ Game_Flag_Set(kFlagHF06toHF05);
Set_Enter(kSetHF05, kSceneHF05);
}
return true;
@@ -141,18 +159,27 @@ void SceneScriptHF06::SceneFrameAdvanced(int frame) {
}
void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
- if (actorId == kActorSteele && oldGoal != 599 && newGoal == 599) {
- Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 24, 0, false);
+ if (actorId == kActorSteele
+ && oldGoal != 599
+ && newGoal == 599
+ ) {
+ Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 24, false, false);
Actor_Says(kActorSteele, 250, -1);
- Actor_Says(kActorMcCoy, 2120, 4);
+ Actor_Says(kActorMcCoy, 2120, kAnimationModeCombatIdle);
Actor_Says(kActorSteele, 260, -1);
Actor_Says(kActorSteele, 270, -1);
+
int otherActorId = -1;
- if (Actor_Query_In_Set(kActorDektora, kSetHF06) && Actor_Query_Goal_Number(kActorDektora) == 599) {
+ if (Actor_Query_In_Set(kActorDektora, kSetHF06)
+ && Actor_Query_Goal_Number(kActorDektora) == 599
+ ) {
otherActorId = kActorDektora;
- } else if (Actor_Query_In_Set(kActorLucy, kSetHF06) && Actor_Query_Goal_Number(kActorLucy) == 599) {
+ } else if (Actor_Query_In_Set(kActorLucy, kSetHF06)
+ && Actor_Query_Goal_Number(kActorLucy) == 599
+ ) {
otherActorId = kActorLucy;
}
+
if (otherActorId != -1) {
Music_Play(21, 35, 0, 3, -1, 0, 0);
Player_Set_Combat_Mode(false);
@@ -160,7 +187,7 @@ void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
Actor_Voice_Over(990, kActorVoiceOver);
Actor_Voice_Over(1000, kActorVoiceOver);
Actor_Voice_Over(1010, kActorVoiceOver);
- Loop_Actor_Walk_To_Actor(kActorMcCoy, otherActorId, 24, 0, false);
+ Loop_Actor_Walk_To_Actor(kActorMcCoy, otherActorId, 24, false, false);
Item_Pickup_Spin_Effect(932, 355, 200);
Actor_Voice_Over(1020, kActorVoiceOver);
Actor_Voice_Over(1030, kActorVoiceOver);
@@ -168,9 +195,11 @@ void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
Actor_Voice_Over(1050, kActorVoiceOver);
Actor_Clue_Acquire(kActorMcCoy, kClueBomb, true, -1);
}
+
if (Actor_Query_In_Set(kActorDektora, kSetHF06)) {
Actor_Set_Targetable(kActorDektora, false);
}
+
if (Actor_Query_In_Set(kActorLucy, kSetHF06)) {
Actor_Set_Targetable(kActorLucy, false);
}
@@ -203,9 +232,12 @@ void SceneScriptHF06::PlayerWalkedIn() {
}
}
Footstep_Sound_Override_On(3);
- Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 1, kAnimationModeIdle);
+ Loop_Actor_Travel_Stairs(kActorMcCoy, 2, true, kAnimationModeIdle);
Footstep_Sound_Override_Off();
- if (Game_Flag_Query(662) && !Game_Flag_Query(559)) {
+
+ if ( Game_Flag_Query(662)
+ && !Game_Flag_Query(559)
+ ) {
sub_401EF4();
}
}
@@ -227,10 +259,11 @@ void SceneScriptHF06::sub_401EF4() {
} else {
return;
}
+
Actor_Set_Targetable(actorId, true);
- Loop_Actor_Walk_To_XYZ(kActorMcCoy, 14.33f, 367.93f, 399.0f, 0, 0, true, 0);
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 14.33f, 367.93f, 399.0f, 0, false, true, 0);
Actor_Face_Heading(kActorMcCoy, 486, true);
- sub_4023E0();
+ addAmbientSounds();
Actor_Put_In_Set(kActorSteele, kSetHF06);
Actor_Set_At_XYZ(kActorSteele, 92.0f, 367.93f, 19.0f, 0);
Actor_Set_Targetable(kActorSteele, true);
@@ -246,7 +279,7 @@ void SceneScriptHF06::sub_401EF4() {
Player_Set_Combat_Mode(true);
Actor_Change_Animation_Mode(kActorMcCoy, 5);
Actor_Change_Animation_Mode(kActorSteele, 7);
- Loop_Actor_Walk_To_XYZ(kActorSteele, 92.0f, 367.93f, 107.0f, 0, 0, false, 0);
+ Loop_Actor_Walk_To_XYZ(kActorSteele, 92.0f, 367.93f, 107.0f, 0, false, false, 0);
Actor_Face_Actor(kActorSteele, kActorMcCoy, true);
Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatIdle);
Actor_Says(kActorSteele, 290, 58);
@@ -264,7 +297,7 @@ void SceneScriptHF06::sub_401EF4() {
Game_Flag_Set(644);
Actor_Set_Goal_Number(kActorSteele, 402);
Actor_Face_Actor(kActorSteele, actorId, true);
- Actor_Change_Animation_Mode(kActorSteele, 6);
+ Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatAttack);
Delay(500);
Scene_Loop_Set_Default(3);
Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true);
@@ -274,7 +307,7 @@ void SceneScriptHF06::sub_401EF4() {
Non_Player_Actor_Combat_Mode_On(kActorSteele, kActorCombatStateUncover, true, actorId, 15, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, 0, 100, 10, 300, false);
}
-void SceneScriptHF06::sub_4023E0() {
+void SceneScriptHF06::addAmbientSounds() {
Ambient_Sounds_Add_Sound(87, 20, 80, 20, 100, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Speech_Sound(23, 250, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(23, 330, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
@@ -282,7 +315,7 @@ void SceneScriptHF06::sub_4023E0() {
Ambient_Sounds_Add_Speech_Sound(23, 360, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(24, 380, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(24, 510, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
- Ambient_Sounds_Add_Speech_Sound(38, 80, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
+ Ambient_Sounds_Add_Speech_Sound(38, 80, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(38, 160, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
Ambient_Sounds_Add_Speech_Sound(38, 280, 5, 70, 7, 10, -50, 50, -101, -101, 1, 1);
}
diff --git a/engines/bladerunner/script/scene/ps09.cpp b/engines/bladerunner/script/scene/ps09.cpp
index 4f586c834d..02aa88e93d 100644
--- a/engines/bladerunner/script/scene/ps09.cpp
+++ b/engines/bladerunner/script/scene/ps09.cpp
@@ -30,7 +30,9 @@ void SceneScriptPS09::InitializeScene() {
} else {
Setup_Scene_Information(-559.0f, 0.0f, -85.06f, 250);
}
+
Scene_Exit_Add_2D_Exit(0, 0, 0, 30, 479, 3);
+
Ambient_Sounds_Remove_All_Non_Looping_Sounds(0);
Ambient_Sounds_Add_Looping_Sound(138, 50, 0, 0);
Ambient_Sounds_Add_Looping_Sound(137, 30, 0, 0);
@@ -38,6 +40,7 @@ void SceneScriptPS09::InitializeScene() {
Ambient_Sounds_Add_Sound(125, 15, 60, 7, 10, 100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(126, 25, 60, 7, 10, 100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(127, 25, 60, 7, 10, 100, 100, -101, -101, 0, 0);
+
if (!Game_Flag_Query(kFlagGrigorianArrested)) {
Actor_Put_In_Set(kActorGrigorian, kSetPS09);
Actor_Set_At_XYZ(kActorGrigorian, -417.88f, 0.0f, -200.74f, 512);
@@ -100,9 +103,9 @@ bool SceneScriptPS09::ClickedOnActor(int actorId) {
if (!Game_Flag_Query(kFlagPS09GrigorianDialogue)
&& Game_Flag_Query(kFlagPS09GrigorianTalk1)
&& (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewA)
- || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1)
- || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2)
- || Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
+ || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB1)
+ || Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewB2)
+ || Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote)
)
) {
Game_Flag_Set(kFlagPS09GrigorianDialogue);
diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h
index 06288204e8..498424af81 100644
--- a/engines/bladerunner/script/scene_script.h
+++ b/engines/bladerunner/script/scene_script.h
@@ -213,22 +213,22 @@ DECLARE_SCRIPT(HF04)
END_SCRIPT
DECLARE_SCRIPT(HF05)
- void sub_402370();
- void sub_402970();
- void sub_402AE4();
- void sub_403738();
+ void talkWithCrazyLegs1();
+ void talkWithCrazyLegs2();
+ void dialogueWithCrazylegs1();
+ void dialogueWithCrazylegs2();
void sub_403A34(int actorId);
void sub_403F0C();
void sub_40410C();
void sub_4042E4();
- void sub_404474();
+ void addAmbientSounds();
int getAffectionTowardsActor();
int sub_4048C0();
END_SCRIPT
DECLARE_SCRIPT(HF06)
void sub_401EF4();
- void sub_4023E0();
+ void addAmbientSounds();
END_SCRIPT
DECLARE_SCRIPT(HF07)