1 /* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 *
21 */
22
23 #include "bladerunner/script/scene_script.h"
24
25 namespace BladeRunner {
26
InitializeScene()27 void SceneScriptCT03::InitializeScene() {
28 if (Game_Flag_Query(kFlagCT02McCoyFell)) {
29 Setup_Scene_Information(-852.58f, -621.3f, 285.6f, 0);
30 } else if (Game_Flag_Query(kFlagCT02toCT03)) {
31 Game_Flag_Reset(kFlagCT02toCT03);
32 Setup_Scene_Information(-557.1f, -616.31f, 224.29f, 249);
33 } else if (Game_Flag_Query(kFlagCT04toCT03)) {
34 Game_Flag_Reset(kFlagCT04toCT03);
35 Setup_Scene_Information(-173.99f, -619.19f, 347.54f, 808);
36 } else {
37 Setup_Scene_Information(-708.58f, -619.19f, 277.6f, 239);
38 }
39 Scene_Exit_Add_2D_Exit(0, 0, 460, 639, 479, 2);
40 Scene_Exit_Add_2D_Exit(1, 40, 40, 134, 302, 3);
41 Scene_Exit_Add_2D_Exit(2, 390, 0, 539, 230, 1);
42 Ambient_Sounds_Add_Looping_Sound(kSfxCTRAIN1, 50, 1, 1);
43 Ambient_Sounds_Add_Looping_Sound(kSfxCTAMBR1, 22, -100, 1);
44 Ambient_Sounds_Add_Looping_Sound(kSfxCTRUNOFF, 34, -100, 1);
45 Ambient_Sounds_Add_Sound(kSfxSPIN2B, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0);
46 Ambient_Sounds_Add_Sound(kSfxSPIN3A, 10, 40, 33, 50, 0, 0, -101, -101, 0, 0);
47 Ambient_Sounds_Add_Sound(kSfxDISH1, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0);
48 Ambient_Sounds_Add_Sound(kSfxDISH2, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0);
49 Ambient_Sounds_Add_Sound(kSfxDISH3, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0);
50 Ambient_Sounds_Add_Sound(kSfxDISH4, 3, 30, 8, 10, -100, 0, -101, -101, 0, 0);
51 Ambient_Sounds_Add_Speech_Sound(kActorBlimpGuy, 0, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1);
52 Ambient_Sounds_Add_Speech_Sound(kActorBlimpGuy, 20, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1);
53 Ambient_Sounds_Add_Speech_Sound(kActorBlimpGuy, 40, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1);
54 Ambient_Sounds_Add_Speech_Sound(kActorBlimpGuy, 50, 10, 260, 27, 47, -100, 100, -101, -101, 1, 1);
55 Ambient_Sounds_Add_Sound(kSfxTHNDER3, 10, 60, 33, 50, -100, 100, -101, -101, 0, 0);
56 Ambient_Sounds_Add_Sound(kSfxTHNDER4, 10, 60, 33, 50, -100, 100, -101, -101, 0, 0);
57 }
58
SceneLoaded()59 void SceneScriptCT03::SceneLoaded() {
60 Obstacle_Object("TRASH CAN", true);
61 Unclickable_Object("TRASH CAN");
62 Footstep_Sounds_Set(0, 0);
63 Footstep_Sounds_Set(1, 1);
64 }
65
MouseClick(int x,int y)66 bool SceneScriptCT03::MouseClick(int x, int y) {
67 return false;
68 }
69
ClickedOn3DObject(const char * objectName,bool a2)70 bool SceneScriptCT03::ClickedOn3DObject(const char *objectName, bool a2) {
71 return false;
72 }
73
ClickedOnActor(int actorId)74 bool SceneScriptCT03::ClickedOnActor(int actorId) {
75 return false;
76 }
77
ClickedOnItem(int itemId,bool a2)78 bool SceneScriptCT03::ClickedOnItem(int itemId, bool a2) {
79 return false;
80 }
81
ClickedOnExit(int exitId)82 bool SceneScriptCT03::ClickedOnExit(int exitId) {
83 if (exitId == 0) {
84 if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -745.09f, -619.09f, 293.36f, 0, true, false, false)) {
85 Game_Flag_Set(kFlagCT03toCT01);
86 Set_Enter(kSetCT01_CT12, kSceneCT01);
87 }
88 return true;
89 }
90 if (exitId == 1) {
91 if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -604.38f, -616.15f, 221.6f, 0, true, false, false)) {
92 Game_Flag_Set(kFlagCT03toCT02);
93 Set_Enter(kSetCT02, kSceneCT02);
94 }
95 return true;
96 }
97 if (exitId == 2) {
98 if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -150.0f, -621.3f, 357.0f, 0, true, false, false)) {
99 Game_Flag_Set(kFlagCT03toCT04);
100 Async_Actor_Walk_To_XYZ(kActorMcCoy, -67.0f, -621.3f, 477.0f, 0, false);
101 Set_Enter(kSetCT03_CT04, kSceneCT04);
102 }
103 return true;
104 }
105 return false;
106 }
107
ClickedOn2DRegion(int region)108 bool SceneScriptCT03::ClickedOn2DRegion(int region) {
109 return false;
110 }
111
SceneFrameAdvanced(int frame)112 void SceneScriptCT03::SceneFrameAdvanced(int frame) {
113 }
114
ActorChangedGoal(int actorId,int newGoal,int oldGoal,bool currentSet)115 void SceneScriptCT03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
116 }
117
PlayerWalkedIn()118 void SceneScriptCT03::PlayerWalkedIn() {
119 if (Actor_Query_Goal_Number(kActorZuben) == kGoalZubenCT02RunToFreeSlotG) {
120 Actor_Set_Goal_Number(kActorZuben, kGoalZubenCT06HideAtFreeSlotA);
121 }
122 }
123
PlayerWalkedOut()124 void SceneScriptCT03::PlayerWalkedOut() {
125 Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
126 Ambient_Sounds_Remove_All_Looping_Sounds(1);
127 }
128
DialogueQueueFlushed(int a1)129 void SceneScriptCT03::DialogueQueueFlushed(int a1) {
130 }
131
132 } // End of namespace BladeRunner
133