aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/scene/ug03.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner/script/scene/ug03.cpp')
-rw-r--r--engines/bladerunner/script/scene/ug03.cpp85
1 files changed, 46 insertions, 39 deletions
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;