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 
27 namespace BladeRunner {
28 
29 class BladeRunnerEngine;
30 
31 class SceneScriptBase : public ScriptBase {
32 public:
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) \
51 class SceneScript##name : public SceneScriptBase { \
52 public: \
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); \
69 private:
70 #define END_SCRIPT };
71 
72 DECLARE_SCRIPT(AR01)
73  void dialogueWithFishDealerBuyGoldfish();
74 END_SCRIPT
75 
76 DECLARE_SCRIPT(AR02)
77  void dialogueWithInsectDealer1();
78  void dialogueWithInsectDealerBuyBracelet();
79  void dialogueWithInsectDealerBuySlug();
80  void dialogueWithHassan();
81  void dialogueWithHassanBuySnake();
82 END_SCRIPT
83 
84 DECLARE_SCRIPT(BB01)
85 END_SCRIPT
86 
87 DECLARE_SCRIPT(BB02)
88 END_SCRIPT
89 
90 DECLARE_SCRIPT(BB03)
91 END_SCRIPT
92 
93 DECLARE_SCRIPT(BB04)
94 END_SCRIPT
95 
96 DECLARE_SCRIPT(BB05)
97 END_SCRIPT
98 
99 DECLARE_SCRIPT(BB06)
100 END_SCRIPT
101 
102 DECLARE_SCRIPT(BB07)
103 END_SCRIPT
104 
105 DECLARE_SCRIPT(BB08)
106 END_SCRIPT
107 
108 DECLARE_SCRIPT(BB09)
109 END_SCRIPT
110 
111 DECLARE_SCRIPT(BB10)
112 END_SCRIPT
113 
114 DECLARE_SCRIPT(BB11)
115 END_SCRIPT
116 
117 DECLARE_SCRIPT(BB12)
118 END_SCRIPT
119 
120 DECLARE_SCRIPT(BB51)
121 END_SCRIPT
122 
123 DECLARE_SCRIPT(CT01)
124  void dialogueWithHowieLee();
125 END_SCRIPT
126 
127 DECLARE_SCRIPT(CT02)
128  void dialogueWithZuben();
129 END_SCRIPT
130 
131 DECLARE_SCRIPT(CT03)
132 END_SCRIPT
133 
134 DECLARE_SCRIPT(CT04)
135  void dialogueWithHomeless();
136 END_SCRIPT
137 
138 DECLARE_SCRIPT(CT05)
139 END_SCRIPT
140 
141 DECLARE_SCRIPT(CT06)
142 END_SCRIPT
143 
144 DECLARE_SCRIPT(CT07)
145 END_SCRIPT
146 
147 DECLARE_SCRIPT(CT08)
148 END_SCRIPT
149 
150 DECLARE_SCRIPT(CT09)
151 END_SCRIPT
152 
153 DECLARE_SCRIPT(CT10)
154  void checkCabinet();
155 END_SCRIPT
156 
157 DECLARE_SCRIPT(CT11)
158 END_SCRIPT
159 
160 DECLARE_SCRIPT(CT12)
161 END_SCRIPT
162 
163 DECLARE_SCRIPT(CT51)
164 END_SCRIPT
165 
166 DECLARE_SCRIPT(DR01)
167 END_SCRIPT
168 
169 DECLARE_SCRIPT(DR02)
170 END_SCRIPT
171 
172 DECLARE_SCRIPT(DR03)
173  void dialogueWithChew();
174 END_SCRIPT
175 
176 DECLARE_SCRIPT(DR04)
177  bool farEnoughFromExplosion();
178 END_SCRIPT
179 
180 DECLARE_SCRIPT(DR05)
181 END_SCRIPT
182 
183 DECLARE_SCRIPT(DR06)
184 END_SCRIPT
185 
186 DECLARE_SCRIPT(HC01)
187  void dialogueWithIzo();
188  void takePhotoAndRunAway();
189 END_SCRIPT
190 
191 DECLARE_SCRIPT(HC02)
192 END_SCRIPT
193 
194 DECLARE_SCRIPT(HC03)
195 END_SCRIPT
196 
197 DECLARE_SCRIPT(HC04)
198  void dialogueWithIsabella();
199 END_SCRIPT
200 
201 DECLARE_SCRIPT(HF01)
202  void dialogueWithMiaAndMurray();
203  void talkWithDektora();
204  void talkWithLucy();
205 END_SCRIPT
206 
207 DECLARE_SCRIPT(HF02)
208 END_SCRIPT
209 
210 DECLARE_SCRIPT(HF03)
211  void dialogueWithLucy();
212 END_SCRIPT
213 
214 DECLARE_SCRIPT(HF04)
215 END_SCRIPT
216 
217 DECLARE_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();
229 END_SCRIPT
230 
231 DECLARE_SCRIPT(HF06)
232  void steelInterruption();
233  void addAmbientSounds();
234 END_SCRIPT
235 
236 DECLARE_SCRIPT(HF07)
237  int getAffectionTowardsActor();
238 END_SCRIPT
239 
240 DECLARE_SCRIPT(KP01)
241 END_SCRIPT
242 
243 DECLARE_SCRIPT(KP02)
244 END_SCRIPT
245 
246 DECLARE_SCRIPT(KP03)
247  void saveSteele();
248 END_SCRIPT
249 
250 DECLARE_SCRIPT(KP04)
251 END_SCRIPT
252 
253 DECLARE_SCRIPT(KP05)
254 END_SCRIPT
255 
256 DECLARE_SCRIPT(KP06)
257 END_SCRIPT
258 
259 DECLARE_SCRIPT(KP07)
260 END_SCRIPT
261 
262 DECLARE_SCRIPT(MA01)
263 END_SCRIPT
264 
265 DECLARE_SCRIPT(MA02)
266  void talkWithRajif();
267  bool isPhoneRinging();
268  void selectNextTvNews();
269 END_SCRIPT
270 
271 //MA03 does not exists
272 
273 DECLARE_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();
283 END_SCRIPT
284 
285 DECLARE_SCRIPT(MA05)
286  bool isPhoneRinging();
287 END_SCRIPT
288 
289 DECLARE_SCRIPT(MA06)
290  bool isElevatorOnDifferentFloor();
291  void activateElevator();
292 END_SCRIPT
293 
294 DECLARE_SCRIPT(MA07)
295 END_SCRIPT
296 
297 DECLARE_SCRIPT(MA08)
298 END_SCRIPT
299 
300 DECLARE_SCRIPT(NR01)
301 END_SCRIPT
302 
303 DECLARE_SCRIPT(NR02)
304  void playNextMusic();
305 END_SCRIPT
306 
307 DECLARE_SCRIPT(NR03)
308  void rotateActorOnTable(int frame);
309  void playNextMusic();
310 END_SCRIPT
311 
312 DECLARE_SCRIPT(NR04)
313  void dialogueWithEarlyQ();
314  void druggedEffect(int frame);
315  void playNextMusic();
316 END_SCRIPT
317 
318 DECLARE_SCRIPT(NR05)
319  void rotateActorOnTable(int frame);
320  void talkToBartender();
321  void talkToEarlyQ();
322  void rotateActorOnGround(int actorId);
323  void playNextMusic();
324 END_SCRIPT
325 
326 DECLARE_SCRIPT(NR06)
327  void playNextMusic();
328 END_SCRIPT
329 
330 DECLARE_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();
341 END_SCRIPT
342 
343 DECLARE_SCRIPT(NR08)
344  void playNextMusic();
345 END_SCRIPT
346 
347 DECLARE_SCRIPT(NR09)
348  void playNextMusic();
349 END_SCRIPT
350 
351 DECLARE_SCRIPT(NR10)
352 END_SCRIPT
353 
354 DECLARE_SCRIPT(NR11)
355  void actorSweepArea(int actorId, signed int frame);
356  void untargetEverything();
357 END_SCRIPT
358 
359 DECLARE_SCRIPT(PS01)
360 END_SCRIPT
361 
362 DECLARE_SCRIPT(PS02)
363  void activateElevator();
364 END_SCRIPT
365 
366 DECLARE_SCRIPT(PS03)
367 END_SCRIPT
368 
369 DECLARE_SCRIPT(PS04)
370  void dialogueWithGuzza();
371 END_SCRIPT
372 
373 DECLARE_SCRIPT(PS05)
374  void selectNextTvNews();
375  void turnOnTV();
376 END_SCRIPT
377 
378 DECLARE_SCRIPT(PS06)
379 END_SCRIPT
380 
381 DECLARE_SCRIPT(PS07)
382 END_SCRIPT
383 
384 // PS08 does not exits
385 
386 DECLARE_SCRIPT(PS09)
387  void dialogueWithGrigorian();
388 END_SCRIPT
389 
390 DECLARE_SCRIPT(PS10)
391  void removeTargets();
392  public:
393  static int getPoliceMazePS10TargetCount();
394 END_SCRIPT
395 
396 DECLARE_SCRIPT(PS11)
397  void removeTargets();
398  public:
399  static int getPoliceMazePS11TargetCount();
400 END_SCRIPT
401 
402 DECLARE_SCRIPT(PS12)
403  void removeTargets();
404  public:
405  static int getPoliceMazePS12TargetCount();
406 END_SCRIPT
407 
408 DECLARE_SCRIPT(PS13)
409  void removeTargets();
410  public:
411  static int getPoliceMazePS13TargetCount();
412 END_SCRIPT
413 
414 DECLARE_SCRIPT(PS14)
415 END_SCRIPT
416 
417 DECLARE_SCRIPT(PS15)
418 END_SCRIPT
419 
420 DECLARE_SCRIPT(RC01)
421  void interrogateCrowd();
422  void walkToCenter();
423 END_SCRIPT
424 
425 DECLARE_SCRIPT(RC02)
426  void dialogueWithRunciter();
427 END_SCRIPT
428 
429 DECLARE_SCRIPT(RC03)
430  void talkWithSteele();
431 END_SCRIPT
432 
433 DECLARE_SCRIPT(RC04)
434  void dialogueWithBulletBob();
435 END_SCRIPT
436 
437 DECLARE_SCRIPT(RC51)
438 END_SCRIPT
439 
440 DECLARE_SCRIPT(TB02)
441  void dialogueWithTyrellGuard();
442  void dialogueWithSteele();
443 END_SCRIPT
444 
445 DECLARE_SCRIPT(TB03)
446 END_SCRIPT
447 
448 DECLARE_SCRIPT(TB05)
449 END_SCRIPT
450 
451 DECLARE_SCRIPT(TB06)
452 END_SCRIPT
453 
454 DECLARE_SCRIPT(TB07)
455  void McCoyTalkWithRachaelAndTyrell();
456 END_SCRIPT
457 
458 DECLARE_SCRIPT(UG01)
459 END_SCRIPT
460 
461 DECLARE_SCRIPT(UG02)
462  bool walkToCenter();
463 END_SCRIPT
464 
465 DECLARE_SCRIPT(UG03)
466 END_SCRIPT
467 
468 DECLARE_SCRIPT(UG04)
469 END_SCRIPT
470 
471 DECLARE_SCRIPT(UG05)
472  int getAffectionTowardsActor();
473  void endGame();
474 END_SCRIPT
475 
476 DECLARE_SCRIPT(UG06)
477 END_SCRIPT
478 
479 DECLARE_SCRIPT(UG07)
480 END_SCRIPT
481 
482 DECLARE_SCRIPT(UG08)
483 END_SCRIPT
484 
485 DECLARE_SCRIPT(UG09)
486 END_SCRIPT
487 
488 DECLARE_SCRIPT(UG10)
489 END_SCRIPT
490 
491 // UG11 does not exists
492 
493 DECLARE_SCRIPT(UG12)
494 END_SCRIPT
495 
496 DECLARE_SCRIPT(UG13)
497  void talkAboutGuzza();
498  void dialogueWithHomeless1();
499  void dialogueWithHomeless2();
500 END_SCRIPT
501 
502 DECLARE_SCRIPT(UG14)
503 END_SCRIPT
504 
505 DECLARE_SCRIPT(UG15)
506 END_SCRIPT
507 
508 DECLARE_SCRIPT(UG16)
509  void dialogueWithLuther();
510 END_SCRIPT
511 
512 DECLARE_SCRIPT(UG17)
513 END_SCRIPT
514 
515 DECLARE_SCRIPT(UG18)
516  void talkWithGuzza();
517  void talkWithClovis();
518 END_SCRIPT
519 
520 DECLARE_SCRIPT(UG19)
521 END_SCRIPT
522 
523 #undef DECLARE_SCRIPT
524 #undef END_SCRIPT
525 
526 class SceneScript {
527 protected:
528  BladeRunnerEngine *_vm;
529  int _inScriptCounter;
530  SceneScriptBase *_currentScript;
531 
532 public:
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: str.h:59
Definition: actor.h:31
Definition: scene_script.h:526
Definition: scene_script.h:31
Definition: script.h:34
Definition: bladerunner.h:113