ScummVM API documentation
thereware.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 MTROPOLIS_PLUGIN_THEREWARE_H
23 #define MTROPOLIS_PLUGIN_THEREWARE_H
24 
25 #include "mtropolis/modifiers.h"
26 #include "mtropolis/modifier_factory.h"
27 #include "mtropolis/runtime.h"
28 #include "mtropolis/plugin/thereware_data.h"
29 
30 namespace MTropolis {
31 
32 namespace Thereware {
33 
34 class ConductorModifier : public Modifier {
35 public:
38 
39  bool load(const PlugInModifierLoaderContext &context, const Data::Thereware::ConductorModifier &data);
40 
41  bool respondsToEvent(const Event &evt) const override;
42  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
43 
44  void disable(Runtime *runtime) override;
45 
46 #ifdef MTROPOLIS_DEBUG_ENABLE
47  const char *debugGetTypeName() const override { return "Conductor Modifier"; }
48  void debugInspect(IDebugInspectionReport *report) const override;
49 #endif
50 
51 private:
52  Common::SharedPtr<Modifier> shallowClone() const override;
53  const char *getDefaultName() const override;
54 };
55 
56 class AlphaMaticModifier : public Modifier {
57 public:
60 
61  bool load(const PlugInModifierLoaderContext &context, const Data::Thereware::AlphaMaticModifier &data);
62 
63  bool respondsToEvent(const Event &evt) const override;
64  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
65 
66  void disable(Runtime *runtime) override;
67 
68 #ifdef MTROPOLIS_DEBUG_ENABLE
69  const char *debugGetTypeName() const override { return "AlphaMatic Modifier"; }
70  void debugInspect(IDebugInspectionReport *report) const override;
71 #endif
72 
73 private:
74  Common::SharedPtr<Modifier> shallowClone() const override;
75  const char *getDefaultName() const override;
76 };
77 
78 class RotatorModifier : public Modifier {
79 public:
81  ~RotatorModifier();
82 
83  bool load(const PlugInModifierLoaderContext &context, const Data::Thereware::RotatorModifier &data);
84 
85  bool respondsToEvent(const Event &evt) const override;
86  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
87 
88  void disable(Runtime *runtime) override;
89 
90 #ifdef MTROPOLIS_DEBUG_ENABLE
91  const char *debugGetTypeName() const override { return "Rotator Modifier"; }
92  void debugInspect(IDebugInspectionReport *report) const override;
93 #endif
94 
95 private:
96  Common::SharedPtr<Modifier> shallowClone() const override;
97  const char *getDefaultName() const override;
98 };
99 
100 class TrackerModifier : public Modifier {
101 public:
102  TrackerModifier();
103  ~TrackerModifier();
104 
105  bool load(const PlugInModifierLoaderContext &context, const Data::Thereware::TrackerModifier &data);
106 
107  bool respondsToEvent(const Event &evt) const override;
108  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
109 
110  void disable(Runtime *runtime) override;
111 
112 #ifdef MTROPOLIS_DEBUG_ENABLE
113  const char *debugGetTypeName() const override { return "Tracker Modifier"; }
114  void debugInspect(IDebugInspectionReport *report) const override;
115 #endif
116 
117 private:
118  Common::SharedPtr<Modifier> shallowClone() const override;
119  const char *getDefaultName() const override;
120 };
121 
122 class MouseTrapModifier : public Modifier {
123 public:
126 
127  bool load(const PlugInModifierLoaderContext &context, const Data::Thereware::MouseTrapModifier &data);
128 
129  bool respondsToEvent(const Event &evt) const override;
130  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
131 
132  void disable(Runtime *runtime) override;
133 
134 #ifdef MTROPOLIS_DEBUG_ENABLE
135  const char *debugGetTypeName() const override { return "MouseTrap Modifier"; }
136  void debugInspect(IDebugInspectionReport *report) const override;
137 #endif
138 
139 private:
140  Common::SharedPtr<Modifier> shallowClone() const override;
141  const char *getDefaultName() const override;
142 };
143 
145 public:
148 
149  bool load(const PlugInModifierLoaderContext &context, const Data::Thereware::DoubleClickModifier &data);
150 
151  bool respondsToEvent(const Event &evt) const override;
152  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
153 
154  void disable(Runtime *runtime) override;
155 
156 #ifdef MTROPOLIS_DEBUG_ENABLE
157  const char *debugGetTypeName() const override { return "DoubleClick Modifier"; }
158  void debugInspect(IDebugInspectionReport *report) const override;
159 #endif
160 
161 private:
162  Common::SharedPtr<Modifier> shallowClone() const override;
163  const char *getDefaultName() const override;
164 };
165 
166 class WrapAroundModifier : public Modifier {
167 public:
170 
171  bool load(const PlugInModifierLoaderContext &context, const Data::Thereware::WrapAroundModifier &data);
172 
173  bool respondsToEvent(const Event &evt) const override;
174  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
175 
176  void disable(Runtime *runtime) override;
177 
178 #ifdef MTROPOLIS_DEBUG_ENABLE
179  const char *debugGetTypeName() const override { return "WrapAround Modifier"; }
180  void debugInspect(IDebugInspectionReport *report) const override;
181 #endif
182 
183 private:
184  Common::SharedPtr<Modifier> shallowClone() const override;
185  const char *getDefaultName() const override;
186 };
187 
189 public:
192 
193  bool load(const PlugInModifierLoaderContext &context, const Data::Thereware::EasyScrollerModifier &data);
194 
195  bool respondsToEvent(const Event &evt) const override;
196  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
197 
198  void disable(Runtime *runtime) override;
199 
200 #ifdef MTROPOLIS_DEBUG_ENABLE
201  const char *debugGetTypeName() const override { return "EasyScroller Modifier"; }
202  void debugInspect(IDebugInspectionReport *report) const override;
203 #endif
204 
205 private:
206  Common::SharedPtr<Modifier> shallowClone() const override;
207  const char *getDefaultName() const override;
208 };
209 
210 class GoThereModifier : public Modifier {
211 public:
212  GoThereModifier();
213  ~GoThereModifier();
214 
215  bool load(const PlugInModifierLoaderContext &context, const Data::Thereware::GoThereModifier &data);
216 
217  bool respondsToEvent(const Event &evt) const override;
218  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
219 
220  void disable(Runtime *runtime) override;
221 
222 #ifdef MTROPOLIS_DEBUG_ENABLE
223  const char *debugGetTypeName() const override { return "GoThere Modifier"; }
224  void debugInspect(IDebugInspectionReport *report) const override;
225 #endif
226 
227 private:
228  Common::SharedPtr<Modifier> shallowClone() const override;
229  const char *getDefaultName() const override;
230 };
231 
232 class RandomizerModifier : public Modifier {
233 public:
236 
237  bool load(const PlugInModifierLoaderContext &context, const Data::Thereware::RandomizerModifier &data);
238 
239  bool respondsToEvent(const Event &evt) const override;
240  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
241 
242  void disable(Runtime *runtime) override;
243 
244 #ifdef MTROPOLIS_DEBUG_ENABLE
245  const char *debugGetTypeName() const override { return "Randomizer Modifier"; }
246  void debugInspect(IDebugInspectionReport *report) const override;
247 #endif
248 
249 private:
250  Common::SharedPtr<Modifier> shallowClone() const override;
251  const char *getDefaultName() const override;
252 };
253 
254 class TimeLoopModifier : public Modifier {
255 public:
257  ~TimeLoopModifier();
258 
259  bool load(const PlugInModifierLoaderContext &context, const Data::Thereware::TimeLoopModifier &data);
260 
261  bool respondsToEvent(const Event &evt) const override;
262  VThreadState consumeMessage(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) override;
263 
264  void disable(Runtime *runtime) override;
265 
266 #ifdef MTROPOLIS_DEBUG_ENABLE
267  const char *debugGetTypeName() const override { return "TimeLoop Modifier"; }
268  void debugInspect(IDebugInspectionReport *report) const override;
269 #endif
270 
271 private:
272  Common::SharedPtr<Modifier> shallowClone() const override;
273  const char *getDefaultName() const override;
274 };
275 
276 
278 public:
279  TherewarePlugIn();
280  ~TherewarePlugIn();
281 
282  void registerModifiers(IPlugInModifierRegistrar *registrar) const override;
283 
284 private:
296 };
297 
298 } // End of namespace Thereware
299 
300 } // End of namespace MTropolis
301 
302 #endif
Definition: thereware_data.h:130
Definition: thereware.h:122
Definition: thereware_data.h:100
Definition: thereware.h:100
Definition: thereware.h:277
Definition: thereware_data.h:193
Definition: thereware_data.h:223
Definition: thereware_data.h:207
Definition: thereware_data.h:86
Definition: thereware_data.h:179
Definition: thereware.h:166
Definition: runtime.h:1575
Definition: runtime.h:1185
Definition: runtime.h:3035
Definition: modifier_factory.h:57
Definition: thereware.h:254
Definition: thereware_data.h:105
Definition: modifier_factory.h:48
Definition: runtime.h:369
Definition: thereware.h:34
Definition: runtime.h:1180
Definition: debug.h:59
Definition: thereware.h:232
Definition: thereware.h:210
Definition: thereware.h:78
Definition: actions.h:25
Definition: thereware_data.h:168
Definition: ptr.h:159
Definition: thereware_data.h:156
Definition: thereware_data.h:143