ScummVM API documentation
ringworld2_vampire.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_VAMPIRE_H
23 #define TSAGE_RINGWORLD2_VAMPIRE_H
24 
25 #include "tsage/events.h"
26 #include "tsage/core.h"
27 #include "tsage/scenes.h"
28 #include "tsage/globals.h"
29 #include "tsage/sound.h"
30 #include "tsage/ringworld2/ringworld2_logic.h"
31 
32 namespace TsAGE {
33 
34 namespace Ringworld2 {
35 
36 using namespace TsAGE;
37 
38 class Scene1950 : public SceneExt {
39  /* Windows */
40  class KeypadWindow: public ModalWindow {
41  public:
42  class KeypadButton : public SceneActor {
43  public:
44  int _buttonIndex;
45  bool _pressed;
46  bool _toggled;
47 
48  KeypadButton();
49  void synchronize(Serializer &s) override;
50 
51  void init(int indx);
52  void process(Event &event) override;
53  bool startAction(CursorType action, Event &event) override;
54  };
55 
56  SceneActor _areaActor;
57  KeypadButton _buttons[16];
58 
59  int _buttonIndex;
60 
61  KeypadWindow();
62  void synchronize(Serializer &s) override;
63  void remove() override;
64  void setup2(int visage, int stripFrameNum, int frameNum, int posX, int posY) override;
65  void setup3(int resNum, int lookLineNum, int talkLineNum, int useLineNum) override;
66  };
67 
68  class Keypad : public NamedHotspot {
69  public:
70  bool startAction(CursorType action, Event &event) override;
71  };
72 
73  /* Actors */
74  class Door : public SceneActor {
75  public:
76  bool startAction(CursorType action, Event &event) override;
77  };
78  class Scrolls : public SceneActor {
79  public:
80  bool startAction(CursorType action, Event &event) override;
81  };
82  class Gem : public SceneActor {
83  public:
84  bool startAction(CursorType action, Event &event) override;
85  };
86  class Vampire : public SceneActor {
87  public:
88  Common::Point _deadPosition;
89  int _deltaX;
90  int _deltaY;
91  int _vampireMode;
92 
93  Vampire();
94  void synchronize(Serializer &s) override;
95 
96  void signal() override;
97  bool startAction(CursorType action, Event &event) override;
98  };
99 
100  /* Exits */
101  class NorthExit : public SceneExit {
102  public:
103  void changeScene() override;
104  };
105  class UpExit : public SceneExit {
106  public:
107  void changeScene() override;
108  };
109  class EastExit : public SceneExit {
110  public:
111  void changeScene() override;
112  };
113  class DownExit : public SceneExit {
114  public:
115  void changeScene() override;
116  };
117  class SouthExit : public SceneExit {
118  public:
119  void changeScene() override;
120  };
121  class WestExit : public SceneExit {
122  public:
123  void changeScene() override;
124  };
125  class ShaftExit : public SceneExit {
126  public:
127  void changeScene() override;
128  };
129  class DoorExit : public SceneExit {
130  public:
131  void changeScene() override;
132  };
133 private:
134  void initArea();
135  void enterArea();
136  void doButtonPress(int indx);
137 public:
138  NamedHotspot _background;
139  Keypad _keypad;
140  SceneActor _southDoorway;
141  SceneObject _northDoorway;
142  Door _door;
143  Scrolls _scrolls;
144  SceneActor _containmentField;
145  Gem _gem;
146  SceneActor _cube;
147  SceneActor _pulsingLights;
148  Vampire _vampire;
149  KeypadWindow _KeypadWindow;
150  NorthExit _northExit;
151  UpExit _upExit;
152  EastExit _eastExit;
153  DownExit _downExit;
154  SouthExit _southExit;
155  WestExit _westExit;
156  ShaftExit _shaftExit;
157  DoorExit _doorExit;
158  SequenceManager _sequenceManager;
159 
160  bool _upExitStyle;
161  bool _removeFlag;
162  bool _vampireActive;
163  Common::Point _vampireDestPos;
164  int _vampireIndex;
165 
166  Scene1950();
167  void synchronize(Serializer &s) override;
168 
169  void postInit(SceneObjectList *OwnerList = NULL) override;
170  void remove() override;
171  void signal() override;
172  void process(Event &event) override;
173 };
174 
175 } // End of namespace Ringworld2
176 } // End of namespace TsAGE
177 
178 #endif
Definition: ringworld2_logic.h:243
Definition: ringworld2_logic.h:78
Definition: ringworld2_logic.h:263
Definition: core.h:736
Definition: ringworld2_logic.h:452
Definition: ringworld2_vampire.h:38
Definition: rect.h:45
Definition: events.h:47
Definition: blueforce_dialogs.h:30
Definition: saveload.h:63
Definition: core.h:519
Definition: converse.h:38
Definition: ringworld2_logic.h:63