ScummVM API documentation
scene_script.h
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 modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (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, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef BLADERUNNER_SCRIPT_SCENE_H
23#define BLADERUNNER_SCRIPT_SCENE_H
24
25#include "bladerunner/script/script.h"
26
27namespace BladeRunner {
28
29class BladeRunnerEngine;
30
32public:
34
35 virtual void InitializeScene() = 0;
36 virtual void SceneLoaded() = 0;
37 virtual bool MouseClick(int x, int y) = 0;
38 virtual bool ClickedOn3DObject(const char *objectName, bool combatMode) = 0;
39 virtual bool ClickedOnActor(int actorId) = 0;
40 virtual bool ClickedOnItem(int itemId, bool combatMode) = 0;
41 virtual bool ClickedOnExit(int exitId) = 0;
42 virtual bool ClickedOn2DRegion(int region) = 0;
43 virtual void SceneFrameAdvanced(int frame) = 0;
44 virtual void ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) = 0;
45 virtual void PlayerWalkedIn() = 0;
46 virtual void PlayerWalkedOut() = 0;
47 virtual void DialogueQueueFlushed(int a1) = 0;
48};
49
50#define DECLARE_SCRIPT(name) \
51class SceneScript##name : public SceneScriptBase { \
52public: \
53 SceneScript##name(BladeRunnerEngine *vm) \
54 : SceneScriptBase(vm) \
55 {} \
56 void InitializeScene(); \
57 void SceneLoaded(); \
58 bool MouseClick(int x, int y); \
59 bool ClickedOn3DObject(const char *objectName, bool combatMode); \
60 bool ClickedOnActor(int actorId); \
61 bool ClickedOnItem(int itemId, bool combatMode); \
62 bool ClickedOnExit(int exitId); \
63 bool ClickedOn2DRegion(int region); \
64 void SceneFrameAdvanced(int frame); \
65 void ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet); \
66 void PlayerWalkedIn(); \
67 void PlayerWalkedOut(); \
68 void DialogueQueueFlushed(int a1); \
69private:
70#define END_SCRIPT };
71
72DECLARE_SCRIPT(AR01)
73 void dialogueWithFishDealerBuyGoldfish();
74END_SCRIPT
75
76DECLARE_SCRIPT(AR02)
77 void dialogueWithInsectDealer1();
78 void dialogueWithInsectDealerBuyBracelet();
79 void dialogueWithInsectDealerBuySlug();
80 void dialogueWithHassan();
81 void dialogueWithHassanBuySnake();
82END_SCRIPT
83
84DECLARE_SCRIPT(BB01)
85END_SCRIPT
86
87DECLARE_SCRIPT(BB02)
88END_SCRIPT
89
90DECLARE_SCRIPT(BB03)
91END_SCRIPT
92
93DECLARE_SCRIPT(BB04)
94END_SCRIPT
95
96DECLARE_SCRIPT(BB05)
97END_SCRIPT
98
99DECLARE_SCRIPT(BB06)
100END_SCRIPT
101
102DECLARE_SCRIPT(BB07)
103END_SCRIPT
104
105DECLARE_SCRIPT(BB08)
106END_SCRIPT
107
108DECLARE_SCRIPT(BB09)
109END_SCRIPT
110
111DECLARE_SCRIPT(BB10)
112END_SCRIPT
113
114DECLARE_SCRIPT(BB11)
115END_SCRIPT
116
117DECLARE_SCRIPT(BB12)
118END_SCRIPT
119
120DECLARE_SCRIPT(BB51)
121END_SCRIPT
122
123DECLARE_SCRIPT(CT01)
124 void dialogueWithHowieLee();
125END_SCRIPT
126
127DECLARE_SCRIPT(CT02)
128 void dialogueWithZuben();
129END_SCRIPT
130
131DECLARE_SCRIPT(CT03)
132END_SCRIPT
133
134DECLARE_SCRIPT(CT04)
135 void dialogueWithHomeless();
136END_SCRIPT
137
138DECLARE_SCRIPT(CT05)
139END_SCRIPT
140
141DECLARE_SCRIPT(CT06)
142END_SCRIPT
143
144DECLARE_SCRIPT(CT07)
145END_SCRIPT
146
147DECLARE_SCRIPT(CT08)
148END_SCRIPT
149
150DECLARE_SCRIPT(CT09)
151END_SCRIPT
152
153DECLARE_SCRIPT(CT10)
154 void checkCabinet();
155END_SCRIPT
156
157DECLARE_SCRIPT(CT11)
158END_SCRIPT
159
160DECLARE_SCRIPT(CT12)
161END_SCRIPT
162
163DECLARE_SCRIPT(CT51)
164END_SCRIPT
165
166DECLARE_SCRIPT(DR01)
167END_SCRIPT
168
169DECLARE_SCRIPT(DR02)
170END_SCRIPT
171
172DECLARE_SCRIPT(DR03)
173 void dialogueWithChew();
174END_SCRIPT
175
176DECLARE_SCRIPT(DR04)
177 bool farEnoughFromExplosion();
178END_SCRIPT
179
180DECLARE_SCRIPT(DR05)
181END_SCRIPT
182
183DECLARE_SCRIPT(DR06)
184END_SCRIPT
185
186DECLARE_SCRIPT(HC01)
187 void dialogueWithIzo();
188 void takePhotoAndRunAway();
189END_SCRIPT
190
191DECLARE_SCRIPT(HC02)
192END_SCRIPT
193
194DECLARE_SCRIPT(HC03)
195END_SCRIPT
196
197DECLARE_SCRIPT(HC04)
198 void dialogueWithIsabella();
199END_SCRIPT
200
201DECLARE_SCRIPT(HF01)
202 void dialogueWithMiaAndMurray();
203 void talkWithDektora();
204 void talkWithLucy();
205END_SCRIPT
206
207DECLARE_SCRIPT(HF02)
208END_SCRIPT
209
210DECLARE_SCRIPT(HF03)
211 void dialogueWithLucy();
212END_SCRIPT
213
214DECLARE_SCRIPT(HF04)
215END_SCRIPT
216
217DECLARE_SCRIPT(HF05)
218 void talkWithCrazyLegs1();
219 void talkWithCrazyLegs2();
220 void dialogueWithCrazylegs1();
221 void dialogueWithCrazylegs2();
222 void talkWithCrazylegs3(int actorId);
223 void talkWithDektora();
224 void talkWithLucy();
225 void policeAttack();
226 void addAmbientSounds();
227 int getAffectionTowardsActor();
228 int getCompanionActor();
229END_SCRIPT
230
231DECLARE_SCRIPT(HF06)
232 void steelInterruption();
233 void addAmbientSounds();
234END_SCRIPT
235
236DECLARE_SCRIPT(HF07)
237 int getAffectionTowardsActor();
238END_SCRIPT
239
240DECLARE_SCRIPT(KP01)
241END_SCRIPT
242
243DECLARE_SCRIPT(KP02)
244END_SCRIPT
245
246DECLARE_SCRIPT(KP03)
247 void saveSteele();
248END_SCRIPT
249
250DECLARE_SCRIPT(KP04)
251END_SCRIPT
252
253DECLARE_SCRIPT(KP05)
254END_SCRIPT
255
256DECLARE_SCRIPT(KP06)
257END_SCRIPT
258
259DECLARE_SCRIPT(KP07)
260END_SCRIPT
261
262DECLARE_SCRIPT(MA01)
263END_SCRIPT
264
265DECLARE_SCRIPT(MA02)
266 void talkWithRajif();
267 bool isPhoneRinging();
268 void selectNextTvNews();
269END_SCRIPT
270
271//MA03 does not exists
272
273DECLARE_SCRIPT(MA04)
274 bool isPhoneRinging();
275 bool isPhoneMessageWaiting();
276 void phoneCallWithDektora();
277 void phoneCallWithLucy();
278 void phoneCallWithSteele();
279 void phoneCallWithClovis();
280 void turnOnTV();
281 void sleep();
282 void blip();
283END_SCRIPT
284
285DECLARE_SCRIPT(MA05)
286 bool isPhoneRinging();
287END_SCRIPT
288
289DECLARE_SCRIPT(MA06)
290 bool isElevatorOnDifferentFloor();
291 void activateElevator();
292END_SCRIPT
293
294DECLARE_SCRIPT(MA07)
295END_SCRIPT
296
297DECLARE_SCRIPT(MA08)
298END_SCRIPT
299
300DECLARE_SCRIPT(NR01)
301END_SCRIPT
302
303DECLARE_SCRIPT(NR02)
304 void playNextMusic();
305END_SCRIPT
306
307DECLARE_SCRIPT(NR03)
308 void rotateActorOnTable(int frame);
309 void playNextMusic();
310END_SCRIPT
311
312DECLARE_SCRIPT(NR04)
313 void dialogueWithEarlyQ();
314 void druggedEffect(int frame);
315 void playNextMusic();
316END_SCRIPT
317
318DECLARE_SCRIPT(NR05)
319 void rotateActorOnTable(int frame);
320 void talkToBartender();
321 void talkToEarlyQ();
322 void rotateActorOnGround(int actorId);
323 void playNextMusic();
324END_SCRIPT
325
326DECLARE_SCRIPT(NR06)
327 void playNextMusic();
328END_SCRIPT
329
330DECLARE_SCRIPT(NR07)
331 void dektoraRunAway();
332 void callHolloway();
333 void clickedOnVase();
334 void talkAboutBelt1();
335 void talkAboutBelt2();
336 void talkAboutVoightKampff();
337 void talkAboutSteele();
338 void talkAboutMoonbus();
339 void talkAboutBlackSedan();
340 void talkAboutScorpions();
341END_SCRIPT
342
343DECLARE_SCRIPT(NR08)
344 void playNextMusic();
345END_SCRIPT
346
347DECLARE_SCRIPT(NR09)
348 void playNextMusic();
349END_SCRIPT
350
351DECLARE_SCRIPT(NR10)
352END_SCRIPT
353
354DECLARE_SCRIPT(NR11)
355 void actorSweepArea(int actorId, signed int frame);
356 void untargetEverything();
357END_SCRIPT
358
359DECLARE_SCRIPT(PS01)
360END_SCRIPT
361
362DECLARE_SCRIPT(PS02)
363 void activateElevator();
364END_SCRIPT
365
366DECLARE_SCRIPT(PS03)
367END_SCRIPT
368
369DECLARE_SCRIPT(PS04)
370 void dialogueWithGuzza();
371END_SCRIPT
372
373DECLARE_SCRIPT(PS05)
374 void selectNextTvNews();
375 void turnOnTV();
376END_SCRIPT
377
378DECLARE_SCRIPT(PS06)
379END_SCRIPT
380
381DECLARE_SCRIPT(PS07)
382END_SCRIPT
383
384// PS08 does not exits
385
386DECLARE_SCRIPT(PS09)
387 void dialogueWithGrigorian();
388END_SCRIPT
389
390DECLARE_SCRIPT(PS10)
391 void removeTargets();
392 public:
393 static int getPoliceMazePS10TargetCount();
394END_SCRIPT
395
396DECLARE_SCRIPT(PS11)
397 void removeTargets();
398 public:
399 static int getPoliceMazePS11TargetCount();
400END_SCRIPT
401
402DECLARE_SCRIPT(PS12)
403 void removeTargets();
404 public:
405 static int getPoliceMazePS12TargetCount();
406END_SCRIPT
407
408DECLARE_SCRIPT(PS13)
409 void removeTargets();
410 public:
411 static int getPoliceMazePS13TargetCount();
412END_SCRIPT
413
414DECLARE_SCRIPT(PS14)
415END_SCRIPT
416
417DECLARE_SCRIPT(PS15)
418END_SCRIPT
419
420DECLARE_SCRIPT(RC01)
421 void interrogateCrowd();
422 void walkToCenter();
423END_SCRIPT
424
425DECLARE_SCRIPT(RC02)
426 void dialogueWithRunciter();
427END_SCRIPT
428
429DECLARE_SCRIPT(RC03)
430 void talkWithSteele();
431END_SCRIPT
432
433DECLARE_SCRIPT(RC04)
434 void dialogueWithBulletBob();
435END_SCRIPT
436
437DECLARE_SCRIPT(RC51)
438END_SCRIPT
439
440DECLARE_SCRIPT(TB02)
441 void dialogueWithTyrellGuard();
442 void dialogueWithSteele();
443END_SCRIPT
444
445DECLARE_SCRIPT(TB03)
446END_SCRIPT
447
448DECLARE_SCRIPT(TB05)
449END_SCRIPT
450
451DECLARE_SCRIPT(TB06)
452END_SCRIPT
453
454DECLARE_SCRIPT(TB07)
455 void McCoyTalkWithRachaelAndTyrell();
456END_SCRIPT
457
458DECLARE_SCRIPT(UG01)
459END_SCRIPT
460
461DECLARE_SCRIPT(UG02)
462 bool walkToCenter();
463END_SCRIPT
464
465DECLARE_SCRIPT(UG03)
466END_SCRIPT
467
468DECLARE_SCRIPT(UG04)
469END_SCRIPT
470
471DECLARE_SCRIPT(UG05)
472 int getAffectionTowardsActor();
473 void endGame();
474END_SCRIPT
475
476DECLARE_SCRIPT(UG06)
477END_SCRIPT
478
479DECLARE_SCRIPT(UG07)
480END_SCRIPT
481
482DECLARE_SCRIPT(UG08)
483END_SCRIPT
484
485DECLARE_SCRIPT(UG09)
486END_SCRIPT
487
488DECLARE_SCRIPT(UG10)
489END_SCRIPT
490
491// UG11 does not exists
492
493DECLARE_SCRIPT(UG12)
494END_SCRIPT
495
496DECLARE_SCRIPT(UG13)
497 void talkAboutGuzza();
498 void dialogueWithHomeless1();
499 void dialogueWithHomeless2();
500END_SCRIPT
501
502DECLARE_SCRIPT(UG14)
503END_SCRIPT
504
505DECLARE_SCRIPT(UG15)
506END_SCRIPT
507
508DECLARE_SCRIPT(UG16)
509 void dialogueWithLuther();
510END_SCRIPT
511
512DECLARE_SCRIPT(UG17)
513END_SCRIPT
514
515DECLARE_SCRIPT(UG18)
516 void talkWithGuzza();
517 void talkWithClovis();
518END_SCRIPT
519
520DECLARE_SCRIPT(UG19)
521END_SCRIPT
522
523#undef DECLARE_SCRIPT
524#undef END_SCRIPT
525
527protected:
529 int _inScriptCounter;
530 SceneScriptBase *_currentScript;
531
532public:
533 int _mouseX;
534 int _mouseY;
535
537 ~SceneScript();
538
539 bool open(const Common::String &name);
540
541 void initializeScene();
542 void sceneLoaded();
543 bool mouseClick(int x, int y);
544 bool clickedOn3DObject(const char *objectName, bool combatMode);
545 bool clickedOnActor(int actorId);
546 bool clickedOnItem(int itemId, bool combatMode);
547 bool clickedOnExit(int exitId);
548 bool clickedOn2DRegion(int region);
549 void sceneFrameAdvanced(int frame);
550 void actorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet);
551 void playerWalkedIn();
552 void playerWalkedOut();
553 void dialogueQueueFlushed(int a1);
554 bool isInsideScript() const { return _inScriptCounter > 0; }
555};
556
557} // End of namespace BladeRunner
558
559#endif
Definition: bladerunner.h:113
Definition: scene_script.h:31
Definition: scene_script.h:526
Definition: script.h:34
Definition: str.h:59