ScummVM API documentation
ringworld2_scenes2.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 TSAGE_RINGWORLD2_SCENES2_H
23 #define TSAGE_RINGWORLD2_SCENES2_H
24 
25 #include "common/scummsys.h"
26 #include "tsage/converse.h"
27 #include "tsage/events.h"
28 #include "tsage/core.h"
29 #include "tsage/scenes.h"
30 #include "tsage/globals.h"
31 #include "tsage/sound.h"
32 #include "tsage/ringworld2/ringworld2_logic.h"
33 #include "tsage/ringworld2/ringworld2_speakers.h"
34 
35 namespace TsAGE {
36 
37 namespace Ringworld2 {
38 
39 using namespace TsAGE;
40 
41 class Scene2000 : public SceneExt {
42  class Action1 : public ActionExt {
43  public:
44  void signal() override;
45  };
46 
47  class WestExit : public SceneExit {
48  public:
49  void changeScene() override;
50  };
51  class EastExit : public SceneExit {
52  public:
53  void changeScene() override;
54  };
55  class SouthExit : public SceneExit {
56  public:
57  void changeScene() override;
58  };
59  class NorthExit : public SceneExit {
60  public:
61  void changeScene() override;
62  };
63  class DoorExit : public SceneExit {
64  public:
65  void changeScene() override;
66  };
67 public:
68  bool _exitingFlag;
69  int _mazePlayerMode;
70 
71  NamedHotspot _background;
72  SceneActor _companion;
73  SceneActor _persons[11];
74  WestExit _westExit;
75  EastExit _eastExit;
76  SouthExit _southExit;
77  NorthExit _northExit;
78  DoorExit _doorExit;
79  Action1 _action1, _action2, _action3, _action4, _action5;
80  SequenceManager _sequenceManager;
81 
82  Scene2000();
83  void postInit(SceneObjectList *OwnerList = NULL) override;
84  void remove() override;
85  void signal() override;
86  void process(Event &event) override;
87  void synchronize(Serializer &s) override;
88 
89  void initExits();
90  void initPlayer();
91 };
92 
93 class Scene2350 : public SceneExt {
94  class Companion : public SceneActor {
95  bool startAction(CursorType action, Event &event) override;
96  };
97  class Balloon : public SceneActor {
98  bool startAction(CursorType action, Event &event) override;
99  };
100 
101  class ExitUp : public SceneExit {
102  void changeScene() override;
103  };
104  class ExitWest : public SceneExit {
105  void changeScene() override;
106  };
107 public:
108  SpeakerQuinn _quinnSpeaker;
109  SpeakerPharisha _pharishaSpeaker;
110  NamedHotspot _background;
111  SceneActor _person;
112  Companion _companion;
113  Balloon _balloon;
114  Balloon _harness;
115  ExitUp _exitUp;
116  ExitWest _exitWest;
117  SequenceManager _sequenceManager;
118 
119  void postInit(SceneObjectList *OwnerList = NULL) override;
120  void remove() override;
121  void signal() override;
122 };
123 
124 class Scene2400 : public SceneExt {
125  class WestExit : public SceneExit {
126  void changeScene() override;
127  };
128  class EastExit : public SceneExit {
129  void changeScene() override;
130  };
131 public:
132  WestExit _westExit;
133  EastExit _eastExit;
134  SequenceManager _sequenceManager;
135 
136  void postInit(SceneObjectList *OwnerList = NULL) override;
137  void signal() override;
138 };
139 
140 class Scene2425 : public SceneExt {
141  class RopeDest1 : public NamedHotspot {
142  public:
143  bool startAction(CursorType action, Event &event) override;
144  };
145  class RopeDest2 : public NamedHotspot {
146  public:
147  bool startAction(CursorType action, Event &event) override;
148  };
149  class Crevasse : public NamedHotspot {
150  public:
151  bool startAction(CursorType action, Event &event) override;
152  };
153  class Background : public NamedHotspot {
154  public:
155  bool startAction(CursorType action, Event &event) override;
156  };
157 
158  class Rope : public SceneActor {
159  public:
160  bool startAction(CursorType action, Event &event) override;
161  };
162  class Pictographs : public SceneActor {
163  public:
164  bool startAction(CursorType action, Event &event) override;
165  };
166 
167  class SouthEastExit : public SceneExit {
168  public:
169  void changeScene() override;
170  };
171 public:
172  RopeDest1 _ropeDest1;
173  RopeDest2 _ropeDest2;
174  Crevasse _crevasse;
175  Background _background;
176  Rope _rope;
177  Pictographs _pictographs1;
178  Pictographs _pictographs2;
179  SouthEastExit _southEastExit;
180  SequenceManager _sequenceManager;
181 
182  void postInit(SceneObjectList *OwnerList = NULL) override;
183  void remove() override;
184  void signal() override;
185 };
186 
187 class Scene2430 : public SceneExt {
188  class Companion : public SceneActor {
189  public:
190  bool startAction(CursorType action, Event &event) override;
191  };
192  class GunPowder : public SceneActor {
193  public:
194  bool startAction(CursorType action, Event &event) override;
195  };
196  class OilLamp : public SceneActor {
197  public:
198  bool startAction(CursorType action, Event &event) override;
199  };
200 
201  class SouthExit : public SceneExit {
202  public:
203  void changeScene() override;
204  };
205 public:
206  NamedHotspot _background;
207  NamedHotspot _bottles2;
208  NamedHotspot _furnishings;
209  NamedHotspot _rug1;
210  NamedHotspot _mirror;
211  NamedHotspot _garments;
212  NamedHotspot _bed;
213  NamedHotspot _towel;
214  NamedHotspot _bottles1;
215  NamedHotspot _post;
216  NamedHotspot _clothesPile1;
217  NamedHotspot _clothesPile2;
218  NamedHotspot _rug2;
219  Companion _companion;
220  GunPowder _gunPowder;
221  OilLamp _oilLamp;
222  SouthExit _southExit;
223  SequenceManager _sequenceManager;
224 
225  void postInit(SceneObjectList *OwnerList = NULL) override;
226  void signal() override;
227 };
228 
229 class Scene2435 : public SceneExt {
230  class Companion : public SceneActor {
231  public:
232  bool startAction(CursorType action, Event &event) override;
233  };
234  class Astor : public SceneActor {
235  public:
236  bool startAction(CursorType action, Event &event) override;
237  };
238 
239  class SouthExit : public SceneExit {
240  public:
241  void changeScene() override;
242  };
243 public:
244  SpeakerQuinn2435 _quinnSpeaker;
245  SpeakerSeeker2435 _seekerSpeaker;
246  SpeakerPharisha2435 _pharishaSpeaker;
247  NamedHotspot _background;
248  NamedHotspot _leftWindow;
249  NamedHotspot _rightWindow;
250  Companion _companion;
251  Astor _astor;
252  SouthExit _southExit;
253  SequenceManager _sequenceManager;
254 
255  void postInit(SceneObjectList *OwnerList = NULL) override;
256  void remove() override;
257  void signal() override;
258 };
259 
260 class Scene2440 : public SceneExt {
261  class Companion : public SceneActor {
262  public:
263  bool startAction(CursorType action, Event &event) override;
264  };
265  class OilLamp : public SceneActor {
266  public:
267  bool startAction(CursorType action, Event &event) override;
268  };
269 
270  class SouthEastExit : public SceneExit {
271  public:
272  void changeScene() override;
273  };
274 public:
275  NamedHotspot _background;
276  NamedHotspot _garments;
277  NamedHotspot _bedspread;
278  NamedHotspot _post;
279  NamedHotspot _rug;
280  NamedHotspot _furnishings;
281  NamedHotspot _bottles;
282  Companion _companion;
283  OilLamp _oilLamp;
284  SouthEastExit _southEastExit;
285  SequenceManager _sequenceManager;
286 
287  void postInit(SceneObjectList *OwnerList = NULL) override;
288  void remove() override;
289  void signal() override;
290 };
291 
292 class Scene2445 : public SceneExt {
293 public:
294  SequenceManager _sequenceManager;
295 
296  void postInit(SceneObjectList *OwnerList = NULL) override;
297  void signal() override;
298 };
299 
300 class Scene2450 : public SceneExt {
301  class Parker : public SceneActor {
302  public:
303  bool startAction(CursorType action, Event &event) override;
304  };
305  class CareTaker : public SceneActor {
306  public:
307  bool startAction(CursorType action, Event &event) override;
308  };
309 
310  class SouthWestExit : public SceneExit {
311  public:
312  void changeScene() override;
313  };
314 public:
315  SpeakerQuinn2450 _quinnSpeaker;
316  SpeakerSeeker2450 _seekerSpeaker;
317  SpeakerCaretaker2450 _caretakerSpeaker;
318  NamedHotspot _background;
319  NamedHotspot _post;
320  NamedHotspot _bedspread;
321  SceneActor _companion;
322  Parker _parker;
323  CareTaker _careTaker;
324  SouthWestExit _southWestExit;
325  SequenceManager _sequenceManager;
326 
327  void postInit(SceneObjectList *OwnerList = NULL) override;
328  void remove() override;
329  void signal() override;
330 };
331 
332 class Scene2455 : public SceneExt {
333  class Lamp : public SceneActor {
334  public:
335  bool startAction(CursorType action, Event &event) override;
336  };
337  class Pool : public SceneActor {
338  public:
339  bool startAction(CursorType action, Event &event) override;
340  };
341  class ScrithKey : public SceneActor {
342  public:
343  bool startAction(CursorType action, Event &event) override;
344  };
345 
346  class NorthExit : public SceneExit {
347  public:
348  void changeScene() override;
349  };
350 public:
351  NamedHotspot _background;
352  Lamp _lamp;
353  Pool _pool;
354  ScrithKey _scrithKey;
355  NorthExit _northExit;
356  SequenceManager _sequenceManager;
357 
358  void postInit(SceneObjectList *OwnerList = NULL) override;
359  void remove() override;
360  void signal() override;
361 };
362 
363 class Scene2500 : public SceneExt {
364  class WestExit : public SceneExit {
365  public:
366  void changeScene() override;
367  };
368 public:
369  SpeakerQuinn _quinnSpeaker;
370  SpeakerSeeker _seekerSpeaker;
371  SpeakerMiranda _mirandaSpeaker;
372  SpeakerWebbster2500 _webbsterSpeaker;
373  NamedHotspot _background;
374  SceneActor _companion;
375  SceneActor _quinn;
376  SceneActor _ship;
377  WestExit _westExit;
378  SequenceManager _sequenceManager;
379 
380  void postInit(SceneObjectList *OwnerList = NULL) override;
381  void signal() override;
382 };
383 
384 class Scene2525 : public SceneExt {
385  class StopCock : public NamedHotspot {
386  public:
387  bool startAction(CursorType action, Event &event) override;
388  };
389 
390  class GlassDome : public SceneActor {
391  public:
392  bool startAction(CursorType action, Event &event) override;
393  };
394 
395  class SouthExit : public SceneExit {
396  public:
397  void changeScene() override;
398  };
399 public:
400  NamedHotspot _background;
401  NamedHotspot _machine;
402  NamedHotspot _pipes1;
403  NamedHotspot _pipes2;
404  StopCock _stopcock;
405  SceneActor _companion;
406  SceneActor _compressor;
407  GlassDome _glassDome;
408  SouthExit _southExit;
409  SequenceManager _sequenceManager;
410 
411  void postInit(SceneObjectList *OwnerList = NULL) override;
412  void remove() override;
413  void signal() override;
414 };
415 
416 class Scene2530 : public SceneExt {
417  class Flask : public SceneActor {
418  public:
419  bool startAction(CursorType action, Event &event) override;
420  };
421  class Crank : public SceneActor {
422  public:
423  bool startAction(CursorType action, Event &event) override;
424  };
425 
426  class SouthExit : public SceneExit {
427  public:
428  void changeScene() override;
429  };
430 public:
431  NamedHotspot _background;
432  NamedHotspot _crank2;
433  NamedHotspot _shelf;
434  NamedHotspot _item4;
435  NamedHotspot _rope;
436  SceneActor _companion;
437  Flask _flask;
438  Crank _crank;
439  SouthExit _southExit;
440  SequenceManager _sequenceManager;
441 
442  void postInit(SceneObjectList *OwnerList = NULL) override;
443  void signal() override;
444 };
445 
446 class Scene2535 : public SceneExt {
447  class RebreatherTank : public SceneActor {
448  public:
449  bool startAction(CursorType action, Event &event) override;
450  };
451  class TannerMask : public SceneActor {
452  public:
453  bool startAction(CursorType action, Event &event) override;
454  };
455 
456  class SouthExit : public SceneExit {
457  public:
458  void changeScene() override;
459  };
460 public:
461  NamedHotspot _background;
462  NamedHotspot _roof;
463  NamedHotspot _skin1;
464  NamedHotspot _skin2;
465  NamedHotspot _skin3;
466  NamedHotspot _skin4;
467  NamedHotspot _depression;
468  SceneActor _companion;
469  SceneActor _rope;
470  RebreatherTank _rebreatherTank;
471  TannerMask _tannerMask;
472  SouthExit _southExit;
473  SequenceManager _sequenceManager;
474 
475  void postInit(SceneObjectList *OwnerList = NULL) override;
476  void signal() override;
477 };
478 
479 class Scene2600 : public SceneExt {
480 public:
481  SequenceManager _sequenceManager;
482  PaletteRotation *_rotation;
483 
484  Scene2600();
485  void synchronize(Serializer &s) override;
486  void postInit(SceneObjectList *OwnerList = NULL) override;
487  void remove() override;
488  void signal() override;
489 };
490 
491 class Scene2700 : public SceneExt {
492  class Action1: public Action {
493  public:
494  void signal() override;
495  };
496  class Action2: public Action {
497  public:
498  void signal() override;
499  };
500  class Action3: public Action {
501  public:
502  void signal() override;
503  };
504  class Action4: public Action {
505  public:
506  void signal() override;
507  };
508 
509  class SouthExit: public SceneArea {
510  public:
511  void process(Event &event) override;
512  };
513  class EastExit: public SceneArea {
514  public:
515  void process(Event &event) override;
516  };
517 public:
518  SpeakerQuinn2700 _quinnSpeaker;
519  SpeakerNej2700 _nejSpeaker;
520  NamedHotspot _background;
521  NamedHotspot _ghoulHome1;
522  NamedHotspot _ghoulHome2;
523  NamedHotspot _ghoulHome3;
524  NamedHotspot _ghoulHome4;
525  NamedHotspot _ghoulHome5;
526  SceneActor _nej;
527  SceneActor _ghoulHome6;
528  SceneActor _ghoulHome7;
529  SceneActor _ghoulHome8;
530  SceneActor _ghoulHome9;
531  Action1 _action1;
532  Action2 _action2;
533  Action3 _action3;
534  Action4 _action4;
535  SouthExit _southExit;
536  EastExit _eastExit;
537  Rect _walkRect1, _walkRect2, _walkRect3;
538  Rect _walkRect4, _walkRect5, _walkRect6;
539  SequenceManager _sequenceManager;
540  int _areaMode, _moveMode, _stripNumber;
541 
542  Scene2700();
543  void synchronize(Serializer &s) override;
544  void postInit(SceneObjectList *OwnerList = NULL) override;
545  void signal() override;
546  void process(Event &event) override;
547 };
548 
549 class Scene2750 : public SceneExt {
550  class Action1: public Action {
551  public:
552  void signal() override;
553  };
554  class Action2: public Action {
555  public:
556  void signal() override;
557  };
558  class Action3: public Action {
559  public:
560  void signal() override;
561  };
562  class Action4: public Action {
563  public:
564  void signal() override;
565  };
566  class Action5: public Action {
567  public:
568  void signal() override;
569  };
570  class Action6: public Action {
571  public:
572  void signal() override;
573  };
574  class Action7: public Action {
575  public:
576  void signal() override;
577  };
578 
579  class WestExit: public SceneArea {
580  public:
581  void process(Event &event) override;
582  };
583  class EastExit: public SceneArea {
584  public:
585  void process(Event &event) override;
586  };
587 public:
588  SpeakerQuinn2750 _quinnSpeaker;
589  SpeakerNej2750 _nejSpeaker;
590  NamedHotspot _background;
591  NamedHotspot _ghoulHome1;
592  NamedHotspot _ghoulHome2;
593  NamedHotspot _ghoulHome3;
594  NamedHotspot _ghoulHome4;
595  SceneActor _nej;
596  SceneActor _fire;
597  SceneActor _bird1;
598  SceneActor _folliage1;
599  SceneActor _bird2;
600  SceneActor _folliage2;
601  SceneActor _folliage3;
602  SceneActor _folliage4;
603  SceneActor _folliage5;
604  SceneActor _folliage6;
605  SceneActor _folliage7;
606  Action1 _action1;
607  Action2 _action2;
608  Action3 _action3;
609  Action4 _action4;
610  Action5 _action5;
611  Action6 _action6;
612  Action7 _action7;
613  WestExit _westExit;
614  EastExit _eastExit;
615  Rect _walkRect1, _walkRect2, _walkRect3;
616  SequenceManager _sequenceManager;
617  int _areaMode, _moveMode, _stripNumber;
618 
619  Scene2750();
620  void synchronize(Serializer &s) override;
621  void postInit(SceneObjectList *OwnerList = NULL) override;
622  void signal() override;
623  void process(Event &event) override;
624 };
625 
626 class Scene2800 : public SceneExt {
627  class Outpost : public NamedHotspot {
628  public:
629  bool startAction(CursorType action, Event &event) override;
630  };
631 
632  class Guard : public SceneActor {
633  bool startAction(CursorType action, Event &event) override;
634  };
635 
636  class Action1: public Action {
637  public:
638  void signal() override;
639  };
640  class Action2: public Action {
641  SceneObject _object2;
642  SceneObject _object3;
643  SceneObject _object4;
644  public:
645  void signal() override;
646  };
647 public:
648  SpeakerQuinn2800 _quinnSpeaker;
649  SpeakerNej2800 _nejSpeaker;
650  SpeakerGuard2800 _guardSpeaker;
651  NamedHotspot _background;
652  Outpost _outpost;
653  Guard _guard;
654  SceneActor _nej;
655  SceneActor _lightBar;
656  SceneObject _bird;
657  Action1 _action1;
658  Action2 _action2;
659  SequenceManager _sequenceManager;
660  int _stripNumber;
661 
662  Scene2800();
663  void synchronize(Serializer &s) override;
664  void postInit(SceneObjectList *OwnerList = NULL) override;
665  void signal() override;
666 };
667 
668 class Scene2900 : public SceneExt {
669  /* Items */
670  class Scenery : public NamedHotspot {
671  public:
672  bool startAction(CursorType action, Event &event) override;
673  };
674  class ControlPanel : public NamedHotspot {
675  public:
676  bool startAction(CursorType action, Event &event) override;
677  };
678  class Altimeter : public NamedHotspot {
679  public:
680  bool startAction(CursorType action, Event &event) override;
681  };
682  class KnobLeft : public NamedHotspot {
683  public:
684  bool startAction(CursorType action, Event &event) override;
685  };
686  class KnobRight : public NamedHotspot {
687  public:
688  bool startAction(CursorType action, Event &event) override;
689  };
690  class Skip : public NamedHotspot {
691  public:
692  bool startAction(CursorType action, Event &event) override;
693  };
694 
695  /* Actions */
696  class Action1: public Action {
697  public:
698  void signal() override;
699  };
700 
701  /* Miscellaneous */
702  class Map {
703  private:
704  void moveArea(Rect &r, int xAmt, int yAmt);
705  void moveLine(int xpSrc, int ypSrc, int xpDest, int ypDest, int width);
706  int adjustRect(Common::Rect &r1, const Common::Rect &r2);
707  void drawBlock(const byte *data, int xp, int yp, const Rect &r1, const Rect &r2);
708  public:
709  int _mapWidth, _mapHeight;
710  int _resNum;
711  int _xV, _yV;
712  Rect _bounds;
713 
714  Map();
715  void load(int resNum);
716  Common::Point setPosition(const Common::Point &pos, bool initialFlag = false);
717  void synchronize(Serializer &s);
718  void redraw(Rect *updateRect = NULL);
719  };
720 public:
721  SceneObject _leftEdge;
722  SceneObject _rightEdge;
723  SceneObject _knob;
724  SceneObject _altimeterContent;
725  SceneObject _knobRightContent;
726  SceneObject _knobLeftContent;
727  Scenery _scenery;
728  ControlPanel _controlPanel;
729  Altimeter _altimeter;
730  KnobLeft _knobLeft;
731  KnobRight _knobRight;
732  Skip _skip;
733  Action1 _action1;
734  Map _map;
735  SceneText _skipText;
736 
737  bool _controlsActiveChanging;
738  bool _altitudeChanging;
739  bool _majorMinorFlag;
740  int _altitudeMinorChange;
741  int _altitudeMajorChange;
742  Common::Point _balloonLocation;
743  Common::Point _balloonScreenPos;
744  int _newAltitude;
745  int _xAmount;
746  int _xComparison;
747  int _fadeCounter;
748  bool _paletteReloadNeeded;
749 
750  Scene2900();
751  void synchronize(Serializer &s) override;
752  void postInit(SceneObjectList *OwnerList = NULL) override;
753  void remove() override;
754  void signal() override;
755  void dispatch() override;
756  void refreshBackground(int xAmount, int yAmount) override;
757 };
758 
759 } // End of namespace Ringworld2
760 } // End of namespace TsAGE
761 
762 #endif
Definition: ringworld2_logic.h:243
Definition: ringworld2_scenes2.h:187
Definition: ringworld2_scenes2.h:416
Definition: ringworld2_speakers.h:452
Definition: ringworld2_speakers.h:610
Definition: ringworld2_logic.h:78
Definition: ringworld2_speakers.h:296
Definition: ringworld2_logic.h:263
Definition: core.h:736
Definition: core.h:134
Definition: ringworld2_scenes2.h:41
Definition: ringworld2_scenes2.h:124
Definition: rect.h:144
Definition: ringworld2_scenes2.h:491
Definition: ringworld2_scenes2.h:626
Definition: ringworld2_scenes2.h:363
Definition: ringworld2_scenes2.h:479
Definition: ringworld2_scenes2.h:332
Definition: ringworld2_scenes2.h:668
Definition: ringworld2_scenes2.h:140
Definition: ringworld2_scenes2.h:384
Definition: ringworld2_speakers.h:115
Definition: ringworld2_scenes2.h:93
Definition: ringworld2_scenes2.h:300
Definition: ringworld2_scenes2.h:549
Definition: ringworld2_speakers.h:90
Definition: ringworld2_speakers.h:416
Definition: ringworld2_scenes2.h:292
Definition: ringworld2_scenes2.h:260
Definition: ringworld2_speakers.h:446
Definition: rect.h:45
Definition: events.h:47
Definition: blueforce_dialogs.h:30
Definition: ringworld2_speakers.h:149
Definition: ringworld2_speakers.h:223
Definition: saveload.h:63
Definition: ringworld2_speakers.h:244
Definition: core.h:163
Definition: ringworld2_speakers.h:237
Definition: core.h:519
Definition: graphics.h:40
Definition: core.h:315
Definition: ringworld2_speakers.h:272
Definition: core.h:625
Definition: ringworld2_speakers.h:302
Definition: ringworld2_speakers.h:314
Definition: converse.h:38
Definition: ringworld2_scenes2.h:229
Definition: ringworld2_speakers.h:320
Definition: ringworld2_speakers.h:308
Definition: ringworld2_logic.h:44
Definition: ringworld2_scenes2.h:446
Definition: ringworld2_logic.h:63
Definition: ringworld2_speakers.h:229
Definition: ringworld2_speakers.h:217