ScummVM API documentation
nebular_scenes3.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 MADS_NEBULAR_SCENES3_H
23 #define MADS_NEBULAR_SCENES3_H
24 
25 #include "common/scummsys.h"
26 #include "mads/game.h"
27 #include "mads/scene.h"
28 #include "mads/nebular/nebular_scenes.h"
29 
30 namespace MADS {
31 
32 namespace Nebular {
33 
34 struct ForceField {
35  bool _flag;
36  int _vertical;
37  int _horizontal;
38  int _seqId[40];
39  uint32 _timer;
40 
41  void init() {
42  _flag = false;
43  _vertical = _horizontal = -1;
44  _timer = 0;
45  for (int i = 0; i < 40; ++i)
46  _seqId[i] = -1;
47  }
48 
49  void synchronize(Common::Serializer &s) {
50  s.syncAsByte(_flag);
51  s.syncAsSint32LE(_vertical);
52  s.syncAsSint32LE(_horizontal);
53  for (int i = 0; i < 40; ++i)
54  s.syncAsSint32LE(_seqId[i]);
55  s.syncAsUint32LE(_timer);
56  };
57 };
58 
59 class Scene3xx : public NebularScene {
60 protected:
64  void setAAName();
65 
69  void setPlayerSpritesPrefix();
70 
71  void sceneEntrySound();
72 
73  void initForceField(ForceField *force, bool flag);
74  void handleForceField(ForceField *force, int *sprites);
75  int computeScale(int low, int high, int id);
76 
77 public:
78  Scene3xx(MADSEngine *vm) : NebularScene(vm) {}
79 
80  void actions() override {}
81 };
82 
83 class Scene300s : public Scene3xx {
84 public:
85  Scene300s(MADSEngine *vm) : Scene3xx(vm) {}
86 
87  void preActions() override;
88 };
89 
90 class Scene301 : public Scene3xx {
91 public:
92  Scene301(MADSEngine *vm) : Scene3xx(vm) {}
93 
94  void setup() override;
95  void enter() override;
96  void step() override;
97 };
98 
99 class Scene302 : public Scene3xx {
100 private:
101  int _oldFrame;
102 
103 public:
104  Scene302(MADSEngine *vm);
105  void synchronize(Common::Serializer &s) override;
106 
107  void setup() override;
108  void enter() override;
109  void step() override;
110 };
111 
112 class Scene303 : public Scene3xx {
113 public:
114  Scene303(MADSEngine *vm) : Scene3xx(vm) {}
115 
116  void setup() override;
117  void enter() override;
118  void step() override;
119 };
120 
121 class Scene304 : public Scene3xx {
122 private:
123  int _explosionSpriteId;
124 
125 public:
126  Scene304(MADSEngine *vm);
127  void synchronize(Common::Serializer &s) override;
128 
129  void setup() override;
130  void enter() override;
131  void step() override;
132 };
133 
134 class Scene307 : public Scene3xx {
135 private:
136  ForceField _forceField;
137 
138  bool _afterPeeingFl;
139  bool _duringPeeingFl;
140  bool _grateOpenedFl;
141  bool _activePrisonerFl;
142 
143  int _animationMode;
144  int _prisonerMessageId;
145  int _fieldCollisionCounter;
146 
147  uint32 _lastFrameTime;
148  uint32 _guardTime;
149  uint32 _prisonerTimer;
150 
151  Common::String _subQuote2;
152 
153  Conversation _dialog1, _dialog2;
154 
155  void handleDialog();
156  void handleRexDialog(int quote);
157  void handlePrisonerDialog();
158  void handlePrisonerEncounter();
159  void setDialogNode(int node);
160  void handlePrisonerSpeech(int firstQuoteId, int number, uint32 timeout);
161 
162 public:
163  Scene307(MADSEngine *vm);
164  void synchronize(Common::Serializer &s) override;
165 
166  void setup() override;
167  void enter() override;
168  void step() override;
169  void actions() override;
170 };
171 
172 class Scene308 : public Scene3xx {
173 private:
174  ForceField _forceField;
175 
176 public:
177  Scene308(MADSEngine *vm);
178  void synchronize(Common::Serializer &s) override;
179 
180  void setup() override;
181  void enter() override;
182  void step() override;
183 };
184 
185 class Scene309 : public Scene3xx {
186 private:
187  ForceField _forceField;
188  int _characterSpriteIndexes[3];
189  int _messagesIndexes[3];
190  int _lastFrame;
191 
192 public:
193  Scene309(MADSEngine *vm);
194  void synchronize(Common::Serializer &s) override;
195 
196  void setup() override;
197  void enter() override;
198  void step() override;
199 };
200 
201 class Scene310 : public Scene3xx {
202 private:
203  ForceField _forceField;
204 
205 public:
206  Scene310(MADSEngine *vm);
207  void synchronize(Common::Serializer &s) override;
208 
209  void setup() override;
210  void enter() override;
211  void step() override;
212 };
213 
214 class Scene311 : public Scene3xx {
215 private:
216  bool _checkGuardFl;
217 
218 public:
219  Scene311(MADSEngine *vm);
220  void synchronize(Common::Serializer &s) override;
221 
222  void setup() override;
223  void enter() override;
224  void step() override;
225  void actions() override;
226 };
227 
228 class Scene313 : public Scene3xx {
229 public:
230  Scene313(MADSEngine *vm) : Scene3xx(vm) {}
231 
232  void setup() override;
233  void enter() override;
234  void actions() override;
235 };
236 
237 class Scene316 : public Scene3xx {
238 private:
239  void handleRexInGrate();
240  void handleRoxInGrate();
241 
242 public:
243  Scene316(MADSEngine *vm) : Scene3xx(vm) {}
244 
245  void setup() override;
246  void enter() override;
247  void step() override;
248  void preActions() override;
249  void actions() override;
250 };
251 
252 class Scene318 : public Scene3xx {
253 private:
254  uint32 _dropTimer;
255 
256  int _lastFrame;
257  int _animMode;
258  int _internCounter;
259  int _counter;
260 
261  bool _dialogFl;
262  bool _internTalkingFl;
263  bool _internWalkingFl;
264  bool _internVisibleFl;
265  bool _explosionFl;
266 
267  uint32 _lastFrameCounter;
268 
269  Common::String _subQuote2;
270 
271  Conversation _dialog1;
272 
273  void handleDialog();
274  void handleRexDialogs(int quote);
275  void handleInternDialog(int quoteId, int quoteNum, uint32 timeout);
276 
277 public:
278  Scene318(MADSEngine *vm);
279  void synchronize(Common::Serializer &s) override;
280 
281  void setup() override;
282  void enter() override;
283  void step() override;
284  void preActions() override;
285  void actions() override;
286 };
287 
288 class Scene319 : public Scene3xx {
289 private:
290  Conversation _dialog1, _dialog2, _dialog3;
291 
292  int _animMode, _animFrame;
293  int _nextAction1, _nextAction2;
294  int _slacheMode;
295  int _slacheTopic;
296  int _slachePosY;
297 
298  bool _slacheTalkingFl;
299  bool _slacheReady;
300  bool _slacheInitFl;
301 
302  Common::String _subQuote2;
303 
304  void handleRexDialogues(int quote);
305  void handleSlacheDialogs(int quoteId, int counter, uint32 timer);
306 public:
307  Scene319(MADSEngine *vm);
308  void synchronize(Common::Serializer &s) override;
309 
310  void setup() override;
311  void enter() override;
312  void step() override;
313  void actions() override;
314 };
315 
316 class Scene320 : public Scene300s {
317 private:
318  void setRightView(int view);
319  void setLeftView(int view);
320  void handleButtons();
321 
322  bool _blinkFl;
323  bool _flippedFl;
324 
325  int _buttonId;
326  int _lastFrame;
327  int _leftItemId;
328  int _posX;
329  int _rightItemId;
330 
331 public:
332  Scene320(MADSEngine *vm);
333  void synchronize(Common::Serializer &s) override;
334 
335  void setup() override;
336  void enter() override;
337  void step() override;
338  void actions() override;
339 };
340 
341 class Scene321 : public Scene3xx {
342 public:
343  Scene321(MADSEngine *vm) : Scene3xx(vm) {}
344 
345  void setup() override;
346  void enter() override;
347  void step() override;
348 };
349 
350 class Scene322 : public SceneTeleporter {
351 public:
352  Scene322(MADSEngine *vm) : SceneTeleporter(vm) {}
353 
354  void setup() override;
355  void enter() override;
356  void step() override;
357  void actions() override;
358 };
359 
360 class Scene351 : public Scene3xx {
361 public:
362  Scene351(MADSEngine *vm) : Scene3xx(vm) {}
363 
364  void setup() override;
365  void enter() override;
366  void step() override;
367  void actions() override;
368 };
369 
370 class Scene352 : public Scene3xx {
371 private:
372  bool _vaultOpenFl;
373  bool _mustPutArmDownFl;
374  bool _leaveRoomFl;
375 
376  int _tapePlayerHotspotIdx;
377  int _hotspot1Idx;
378  int _hotspot2Idx;
379  int _lampHostpotIdx;
380  int _commonSequenceIdx;
381  int _commonSpriteIndex;
382 
383  void putArmDown(bool corridorExit, bool doorwayExit);
384 
385 public:
386  Scene352(MADSEngine *vm);
387  void synchronize(Common::Serializer &s) override;
388 
389  void setup() override;
390  void enter() override;
391  void preActions() override;
392  void actions() override;
393 };
394 
395 class Scene353 : public Scene3xx {
396 public:
397  Scene353(MADSEngine *vm) : Scene3xx(vm) {}
398 
399  void setup() override;
400  void enter() override;
401  void actions() override;
402 };
403 
404 class Scene354 : public Scene3xx {
405 public:
406  Scene354(MADSEngine *vm) : Scene3xx(vm) {}
407 
408  void setup() override;
409  void enter() override;
410  void preActions() override;
411  void actions() override;
412 };
413 
414 class Scene357 : public Scene3xx {
415 public:
416  Scene357(MADSEngine *vm) : Scene3xx(vm) {}
417 
418  void setup() override;
419  void enter() override;
420  void preActions() override;
421  void actions() override;
422 };
423 
424 class Scene358 : public Scene3xx {
425 public:
426  Scene358(MADSEngine *vm) : Scene3xx(vm) {}
427 
428  void setup() override;
429  void enter() override;
430  void preActions() override;
431  void actions() override;
432 };
433 
434 class Scene359 : public Scene3xx {
435 private:
436  int _cardHotspotId;
437 
438 public:
439  Scene359(MADSEngine *vm);
440  void synchronize(Common::Serializer &s) override;
441 
442  void setup() override;
443  void enter() override;
444  void preActions() override;
445  void actions() override;
446 };
447 
448 class Scene360 : public Scene3xx {
449 public:
450  Scene360(MADSEngine *vm) : Scene3xx(vm) {}
451 
452  void setup() override;
453  void enter() override;
454  void preActions() override;
455  void actions() override;
456 };
457 
458 class Scene361 : public Scene3xx {
459 private:
460  void handleRexAction();
461  void handleRoxAction();
462 
463 public:
464  Scene361(MADSEngine *vm) : Scene3xx(vm) {}
465 
466  void setup() override;
467  void enter() override;
468  void step() override;
469  void preActions() override;
470  void actions() override;
471 };
472 
473 class Scene366 : public Scene300s {
474 public:
475  Scene366(MADSEngine *vm) : Scene300s(vm) {}
476 
477  void setup() override;
478  void enter() override;
479  void actions() override;
480 };
481 
482 class Scene387 : public Scene300s {
483 public:
484  Scene387(MADSEngine *vm) : Scene300s(vm) {}
485 
486  void setup() override;
487  void enter() override;
488  void actions() override;
489 };
490 
491 class Scene388 : public Scene300s {
492 public:
493  Scene388(MADSEngine *vm) : Scene300s(vm) {}
494 
495  void setup() override;
496  void enter() override;
497  void actions() override;
498 };
499 
500 class Scene389 : public Scene300s {
501 private:
502  uint32 _monsterTime;
503 
504  int _circularQuoteId;
505 
506 public:
507  Scene389(MADSEngine *vm);
508  void synchronize(Common::Serializer &s) override;
509 
510  void setup() override;
511  void enter() override;
512  void step() override;
513  void actions() override;
514 };
515 
516 class Scene390 : public Scene300s {
517 public:
518  Scene390(MADSEngine *vm) : Scene300s(vm) {}
519 
520  void setup() override;
521  void enter() override;
522  void actions() override;
523 };
524 
525 class Scene391 : public Scene300s {
526 public:
527  Scene391(MADSEngine *vm) : Scene300s(vm) {}
528 
529  void setup() override;
530  void enter() override;
531  void actions() override;
532 };
533 
534 class Scene399 : public Scene300s {
535 public:
536  Scene399(MADSEngine *vm) : Scene300s(vm) {}
537 
538  void setup() override;
539  void enter() override;
540  void actions() override;
541 };
542 
543 } // End of namespace Nebular
544 
545 } // End of namespace MADS
546 
547 #endif /* MADS_NEBULAR_SCENES3_H */
Definition: nebular_scenes3.h:34
Definition: nebular_scenes3.h:404
Definition: nebular_scenes3.h:482
Definition: nebular_scenes3.h:473
Definition: nebular_scenes3.h:448
Definition: str.h:59
Definition: nebular_scenes3.h:525
Definition: nebular_scenes3.h:237
Definition: nebular_scenes3.h:83
Definition: nebular_scenes3.h:370
Definition: nebular_scenes3.h:201
Definition: nebular_scenes3.h:350
Definition: nebular_scenes3.h:434
Definition: nebular_scenes3.h:491
void actions() override
Definition: nebular_scenes3.h:80
Definition: serializer.h:79
Definition: nebular_scenes3.h:228
Definition: nebular_scenes3.h:134
Definition: nebular_scenes3.h:458
Definition: nebular_scenes3.h:534
Definition: nebular_scenes3.h:59
Definition: nebular_scenes3.h:252
Definition: nebular_scenes3.h:214
Definition: nebular_scenes3.h:112
Definition: nebular_scenes3.h:500
Definition: nebular_scenes3.h:172
Definition: nebular_scenes3.h:316
Definition: nebular_scenes3.h:414
Definition: mads.h:87
Definition: nebular_scenes3.h:90
Definition: nebular_scenes.h:1348
Definition: nebular_scenes3.h:121
Definition: action.h:28
Definition: nebular_scenes3.h:516
Definition: nebular_scenes3.h:395
Definition: nebular_scenes3.h:288
Definition: nebular_scenes3.h:424
Definition: nebular_scenes.h:1385
Definition: nebular_scenes3.h:99
Definition: user_interface.h:96
Definition: nebular_scenes3.h:360
Definition: nebular_scenes3.h:185
Definition: nebular_scenes3.h:341