1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
|
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "bladerunner/script/script.h"
namespace BladeRunner {
void ScriptHC04::InitializeScene() {
if (Game_Flag_Query(108)) {
Setup_Scene_Information(-112.0f, 0.14f, -655.0f, 460);
Game_Flag_Reset(108);
} else {
Setup_Scene_Information(-88.0f, 0.14f, -463.0f, 1013);
}
Music_Play(4, 14, -90, 1, -1, 1, 2);
Actor_Put_In_Set(59, 8);
Actor_Set_At_XYZ(59, -210.0f, 0.0f, -445.0f, 250);
Scene_Exit_Add_2D_Exit(0, 539, 51, 639, 309, 0);
Scene_Exit_Add_2D_Exit(1, 0, 456, 639, 479, 2);
Ambient_Sounds_Add_Looping_Sound(103, 50, 50, 0);
Ambient_Sounds_Add_Looping_Sound(329, 16, 16, 0);
Ambient_Sounds_Add_Looping_Sound(330, 40, 40, 0);
Ambient_Sounds_Add_Sound(182, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(184, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(185, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(186, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(188, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(189, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(191, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(192, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(195, 5, 70, 14, 16, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(252, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(252, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(254, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(255, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(256, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(257, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(258, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(259, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(260, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(261, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(262, 3, 60, 16, 16, -100, -100, -101, -101, 0, 0);
if (Game_Flag_Query(110)) {
Scene_Loop_Start_Special(0, 0, 0);
Scene_Loop_Set_Default(1);
Game_Flag_Reset(110);
} else {
Scene_Loop_Set_Default(1);
}
}
void ScriptHC04::SceneLoaded() {
Obstacle_Object("CAN FIRE", true);
Unobstacle_Object("ASIANMALE01", true);
Clickable_Object("CAN FIRE");
}
bool ScriptHC04::MouseClick(int x, int y) {
return false;
}
bool ScriptHC04::ClickedOn3DObject(const char *objectName, bool a2) {
return false;
}
bool ScriptHC04::ClickedOnActor(int actorId) {
if (actorId == 59) {
if (!Loop_Actor_Walk_To_XYZ(0, -155.0f, 0.0f, -475.0f, 12, 1, false, 0)) {
Actor_Face_Actor(0, 59, true);
Actor_Face_Actor(59, 0, true);
if (Game_Flag_Query(106)) {
sub_401B90();
return true;
} else {
Actor_Says(59, 0, 3);
Actor_Says(0, 1280, 3);
Actor_Says(59, 20, 3);
Game_Flag_Set(106);
return true;
}
}
}
return false;
}
bool ScriptHC04::ClickedOnItem(int itemId, bool a2) {
return false;
}
bool ScriptHC04::ClickedOnExit(int exitId) {
if (exitId == 0) {
if (!Loop_Actor_Walk_To_XYZ(0, -108.0f, 0.14f, -639.0f, 0, 1, false, 0)) {
Music_Stop(2);
Game_Flag_Set(107);
Game_Flag_Reset(479);
Game_Flag_Set(182);
Set_Enter(70, 80);
}
return true;
}
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(0, -72.0f, 0.14f, -399.0f, 0, 1, false, 0)) {
Game_Flag_Set(109);
Set_Enter(8, 32);
}
return true;
}
return false;
}
bool ScriptHC04::ClickedOn2DRegion(int region) {
return false;
}
void ScriptHC04::SceneFrameAdvanced(int frame) {
}
void ScriptHC04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
}
void ScriptHC04::PlayerWalkedIn() {
}
void ScriptHC04::PlayerWalkedOut() {
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
}
void ScriptHC04::DialogueQueueFlushed(int a1) {
}
void ScriptHC04::sub_401B90() {
Dialogue_Menu_Clear_List();
if (Actor_Clue_Query(0, 263) || Actor_Clue_Query(0, 53)) {
if (Actor_Clue_Query(0, 47)) {
DM_Add_To_List_Never_Repeat_Once_Selected(340, 5, 6, 5);
} else if (Actor_Clue_Query(0, 259)) {
DM_Add_To_List_Never_Repeat_Once_Selected(350, 5, 6, 5);
}
DM_Add_To_List_Never_Repeat_Once_Selected(360, 6, 4, 3);
}
if (Actor_Clue_Query(0, 87) && !Actor_Clue_Query(0, 101)) {
DM_Add_To_List_Never_Repeat_Once_Selected(370, 3, 4, 7);
}
if (Actor_Clue_Query(0, 101)) {
DM_Add_To_List_Never_Repeat_Once_Selected(380, -1, 5, 8);
}
DM_Add_To_List_Never_Repeat_Once_Selected(390, 7, 5, -1);
Dialogue_Menu_Add_DONE_To_List(400);
Dialogue_Menu_Appear(320, 240);
int answer = Dialogue_Menu_Query_Input();
Dialogue_Menu_Disappear();
switch (answer) {
case 340:
Actor_Says(0, 1285, 3);
Actor_Says(59, 50, 3);
Actor_Says(0, 1330, 3);
Actor_Says(59, 60, 3);
break;
case 350:
Actor_Says(0, 1290, 3);
Actor_Says(59, 70, 3);
Actor_Says(0, 1335, 3);
Actor_Says(59, 80, 3);
Actor_Says(0, 1340, 3);
Actor_Says(59, 90, 3);
Actor_Says(0, 1345, 3);
break;
case 360:
Actor_Says(0, 1295, 3);
Actor_Says(59, 100, 3);
Actor_Says(0, 1350, 3);
Actor_Says(59, 110, 3);
Actor_Says(0, 1355, 3);
Actor_Says(59, 130, 3);
Actor_Says(0, 1360, 3);
break;
case 370:
Actor_Says(0, 1300, 3);
Actor_Says(59, 140, 3);
Actor_Says(0, 1365, 3);
Actor_Says(59, 150, 3);
break;
case 380:
Actor_Says(0, 1305, 3);
Actor_Modify_Friendliness_To_Other(59, 0, -2);
Actor_Says(59, 160, 3);
Actor_Says(0, 1370, 3);
Actor_Says(59, 170, 3);
Actor_Says(0, 1375, 3);
Actor_Says(59, 180, 3);
Actor_Says(0, 1380, 3);
Actor_Says(59, 190, 3);
Actor_Says(59, 210, 3);
Actor_Says(59, 240, 3);
Actor_Says(0, 1385, 3);
Actor_Says(59, 260, 3);
Actor_Says(0, 1390, 3);
Actor_Says(59, 300, 3);
Actor_Says(59, 310, 3);
Actor_Says(59, 320, 3);
Actor_Says(0, 1395, 3);
Actor_Says(59, 330, 3);
Actor_Clue_Acquire(0, 102, 0, 59);
break;
case 390:
Actor_Says(0, 1310, 3);
Actor_Modify_Friendliness_To_Other(59, 0, 2);
Actor_Says(59, 340, 3);
break;
case 400:
Actor_Says(0, 1315, 3);
break;
default:
Actor_Says(0, 1320, 3);
Actor_Says(59, 30, 3);
Actor_Says(0, 1325, 3);
Actor_Says(0, 1345, 3);
break;
}
}
} // End of namespace BladeRunner
|