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
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (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, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef TSAGE_BLUEFORCE_SCENES9_H
24 #define TSAGE_BLUEFORCE_SCENES9_H
25 
26 #include "common/scummsys.h"
27 #include "tsage/blue_force/blueforce_logic.h"
28 #include "tsage/blue_force/blueforce_speakers.h"
29 #include "tsage/converse.h"
30 #include "tsage/events.h"
31 #include "tsage/core.h"
32 #include "tsage/scenes.h"
33 #include "tsage/globals.h"
34 #include "tsage/sound.h"
35 
36 namespace TsAGE {
37 
38 namespace BlueForce {
39 
40 using namespace TsAGE;
41 
42 class Scene900: public PalettedScene {
43 	/* Items */
44 	class Exterior: public NamedHotspot {
45 	public:
46 		bool startAction(CursorType action, Event &event) override;
47 	};
48 	class WestExit: public NamedHotspot {
49 	public:
50 		bool startAction(CursorType action, Event &event) override;
51 	};
52 	/* Objects */
53 	class Gate: public NamedObject {
54 	public:
55 		bool startAction(CursorType action, Event &event) override;
56 	};
57 	class Door: public NamedObjectExt {
58 	public:
59 		bool startAction(CursorType action, Event &event) override;
60 	};
61 	class Dog: public NamedObjectExt {
62 	public:
63 		bool startAction(CursorType action, Event &event) override;
64 	};
65 	class Lyle: public NamedObject {
66 	public:
67 		bool startAction(CursorType action, Event &event) override;
68 	};
69 	class Body: public NamedObject {
70 	public:
71 		bool startAction(CursorType action, Event &event) override;
72 	};
73 
74 	/* Actions */
75 	class Action1 : public Action {
76 	public:
77 		void signal() override;
78 	};
79 	class Action2 : public Action {
80 	public:
81 		void signal() override;
82 	};
83 	class Action3 : public Action {
84 	public:
85 		void signal() override;
86 	};
87 	class Action4 : public Action {
88 	public:
89 		void signal() override;
90 	};
91 
92 public:
93 	SequenceManager _sequenceManager1, _sequenceManager2;
94 	SpeakerGameText _gameTextSpeaker;
95 	SpeakerJakeJacket _jakeJacketSpeaker;
96 	SpeakerLyleHat _lyleHatSpeaker;
97 	Exterior _exterior;
98 	Gate _gate;
99 	Door _door;
100 	Dog _dog;
101 	NamedHotspot _item2;
102 	NamedHotspot _item3;
103 	NamedObject _object4;
104 	NamedObject _object5;
105 	Lyle _lyle;
106 	Body _body;
107 	WestExit _westExit;
108 	ASoundExt _sound1;
109 	Action1 _action1;
110 	Action2 _action2;
111 	Action3 _action3;
112 	Action4 _action4;
113 	int _lyleDialogCtr;
114 	int _field1976;
115 
116 	Scene900();
117 	void postInit(SceneObjectList *OwnerList = NULL) override;
118 	void signal() override;
119 	void process(Event &event) override;
120 	void dispatch() override;
121 	void synchronize(Serializer &s) override;
122 };
123 
124 class Scene910: public PalettedScene {
125 	/* Actions */
126 	class Action1 : public Action {
127 	public:
128 		void signal() override;
129 	};
130 	class Action2 : public Action {
131 	public:
132 		void signal() override;
133 	};
134 	/* Objects */
135 	class Lyle: public NamedObject {
136 	public:
137 		int _field90;
138 		void synchronize(Serializer &s) override;
139 		bool startAction(CursorType action, Event &event) override;
140 	};
141 	class Nico: public NamedObject {
142 	public:
143 		bool startAction(CursorType action, Event &event) override;
144 	};
145 	class Stuart: public NamedObject {
146 	public:
147 		bool startAction(CursorType action, Event &event) override;
148 	};
149 	class Forbes: public NamedObject {
150 	public:
151 		bool startAction(CursorType action, Event &event) override;
152 	};
153 	class PowerCord: public NamedObject {
154 	public:
155 		int _field90, _field92;
156 
157 		void synchronize(Serializer &s) override;
158 		bool startAction(CursorType action, Event &event) override;
159 		void init(int val);
160 
161 	};
162 	class BreakerBox: public NamedObject {
163 	public:
164 		bool startAction(CursorType action, Event &event) override;
165 	};
166 	class FakeWall: public NamedObject {
167 	public:
168 		bool startAction(CursorType action, Event &event) override;
169 	};
170 
171 	class Object13: public NamedObject {
172 	protected:
173 		int _state, _mode;
174 	public:
175 		void setupBreaker(int x, int y, int mode, int8 frameNumber);
176 		void synchronize(Serializer &s) override;
177 		bool startAction(CursorType action, Event &event) override;
178 		void remove() override;
179 	};
180 
181 	class BlackPlug: public Object13 {
182 	public:
183 		void init(int x, int y, int arg8, int8 mode);
184 		bool startAction(CursorType action, Event &event) override;
185 		void remove() override;
186 	};
187 
188 	class Object25: public NamedObject {
189 		int _field90, _field92;
190 	public:
191 		Object25();
192 		void setupHiddenSwitch(int x, int y, int arg8, int argA);
193 		void synchronize(Serializer &s) override;
194 		bool startAction(CursorType action, Event &event) override;
195 		void remove() override;
196 	};
197 
198 	class BreakerBoxInset: public FocusObject {
199 		Object13 _object13, _object14, _object15, _object16, _object17, _object18;
200 		Object13 _object19, _object20, _object21, _object22, _object23, _object24;
201 		Object25 _object25, _object26;
202 	public:
203 		Object13 _object27;
204 		BlackPlug _object28;
getClassName()205 		Common::String getClassName() override { return "Scene910_object12"; }
206 		void postInit(SceneObjectList *OwnerList = NULL) override;
207 		void remove() override;
208 	};
209 
210 	class PowerButton: public NamedObject {
211 	public:
212 		NamedObject _object32;
213 		void remove() override;
214 		bool startAction(CursorType action, Event &event) override;
215 		void init(int frame);
216 	};
217 
218 	class GeneratorInset: public FocusObject {
219 		BlackPlug _blackPlug;
220 		PowerButton _powerButton;
221 	public:
getClassName()222 		Common::String getClassName() override { return "Scene910_object29"; }
223 		void postInit(SceneObjectList *OwnerList = NULL) override;
224 		void remove() override;
225 	};
226 
227 	/* Items */
228 	class Generator: public NamedHotspot {
229 	public:
230 		bool startAction(CursorType action, Event &event) override;
231 	};
232 	class Item2: public NamedHotspot {
233 	public:
234 		bool startAction(CursorType action, Event &event) override;
235 	};
236 	class Item3: public NamedHotspot {
237 	public:
238 		bool startAction(CursorType action, Event &event) override;
239 	};
240 	class Item9: public NamedHotspot {
241 	public:
242 		bool startAction(CursorType action, Event &event) override;
243 	};
244 	class Item15: public NamedHotspot {
245 	public:
246 		bool startAction(CursorType action, Event &event) override;
247 	};
248 	class Item16: public NamedHotspot {
249 	public:
250 		bool startAction(CursorType action, Event &event) override;
251 	};
252 	class Item17: public NamedHotspot {
253 	public:
254 		bool startAction(CursorType action, Event &event) override;
255 	};
256 
257 	int _sceneSubMode, _breakerButtonCtr, _field2DE0, _field2DE2, _field2DE4;
258 	Common::Point _destPos;
259 public:
260 	SequenceManager _sequenceManager1, _sequenceManager2;
261 	SpeakerGameText _gameTextSpeaker;
262 	SpeakerJakeJacket _jakeJacketSpeaker;
263 	SpeakerLyleHat _lyleHatSpeaker;
264 	SpeakerFBI _fbiSpeaker;
265 	SpeakerNico _nicoSpeaker;
266 	SpeakerDA _daSpeaker;
267 	Action1 _action1;
268 	Action2 _action2;
269 	Timer _timer1;
270 	Lyle _lyle;
271 	Nico _nico;
272 	Stuart _stuart;
273 	Forbes _forbes;
274 	NamedObject _object5,  _vent, _shadow;
275 	PowerCord _blackCord, _yellowCord;
276 	BreakerBox _breakerBox;
277 	FakeWall _fakeWall;
278 	BreakerBoxInset _breakerBoxInset;
279 	GeneratorInset _generatorInset;
280 	NamedObject _object30, _object31, _object32;
281 	Generator _generator;
282 	Item2 _item2;
283 	Item3 _item3;
284 	NamedHotspot _item4,  _item5,  _item6,  _item7,  _item8;
285 	Item9 _item9, _item10;
286 	NamedHotspot _item11, _backWall, _item13, _item14;
287 	Item15 _item15;
288 	Item16 _item16;
289 	Item17 _item17;
290 	ASoundExt _sound1, _sound2;
291 
292 	void postInit(SceneObjectList *OwnerList = NULL) override;
293 	void synchronize(Serializer &s) override;
294 	void remove() override;
295 	void signal() override;
296 	void process(Event &event) override;
297 	void dispatch() override;
298 	void checkGun() override;
299 	void openHiddenDoor();
300 	void closeHiddenDoor();
301 };
302 
303 class Scene920: public SceneExt {
304 	/* Items */
305 	class Item1: public NamedHotspot {
306 	public:
307 		bool startAction(CursorType action, Event &event) override;
308 	};
309 	class Item8: public NamedHotspot {
310 	public:
311 		bool startAction(CursorType action, Event &event) override;
312 	};
313 
314 public:
315 	SequenceManager _sequenceManager1;
316 	SpeakerGameText _gameTextSpeaker;
317 	SpeakerJakeJacket _jakeJacketSpeaker;
318 
319 	Item1 _crate;
320 	NamedHotspot _item2;
321 	NamedHotspot _item3;
322 	NamedHotspot _item4;
323 	NamedHotspot _item5;
324 	NamedHotspot _item6;
325 	NamedHotspot _item7;
326 	NamedObject _crateTop;
327 	NamedObject _crateWindow;
328 	NamedObject _doorway;
329 	Item8 _exitN;
330 	Common::Point _oldCoord;
331 
332 	void postInit(SceneObjectList *OwnerList = NULL) override;
333 	void signal() override;
334 	void process(Event &event) override;
335 	void dispatch() override;
336 	void synchronize(Serializer &s) override;
337 };
338 
339 class Scene930: public PalettedScene {
340 	/* Objects */
341 	class Object1: public NamedObject {
342 	public:
343 		bool startAction(CursorType action, Event &event) override;
344 	};
345 	class Object2: public FocusObject {
346 	public:
347 		bool startAction(CursorType action, Event &event) override;
348 	};
349 	class Object3: public NamedObject {
350 	public:
351 		bool startAction(CursorType action, Event &event) override;
352 	};
353 	class Object4: public FocusObject {
354 	public:
355 		bool startAction(CursorType action, Event &event) override;
356 		void remove() override;
357 	};
358 	class Object5: public FocusObject {
359 	public:
360 		bool startAction(CursorType action, Event &event) override;
361 		void remove() override;
362 	};
363 	/* Items */
364 	class Item1: public NamedHotspot {
365 	public:
366 		bool startAction(CursorType action, Event &event) override;
367 	};
368 	/* Actions */
369 	class Action1 : public Action {
370 	public:
371 		void signal() override;
372 	};
373 	class Action2 : public Action {
374 	public:
375 		void signal() override;
376 	};
377 	class Action3 : public Action {
378 	public:
379 		void signal() override;
380 	};
381 
382 	void showBootInset();
383 	void showBoxInset();
384 	void showSoleInset();
385 public:
386 	SequenceManager _sequenceManager1;
387 	Object1 _box;
388 	Object2 _boxInset;
389 	Object3 _boots;
390 	Object4 _bootsInset;
391 	Object5 _soleInset;
392 
393 	Item1 _item1;
394 	NamedHotspot _item2;
395 	NamedHotspot _item3;
396 	NamedHotspot _item4;
397 	NamedHotspot _item5;
398 	NamedHotspot _item6;
399 	NamedHotspot _item7;
400 	NamedHotspot _item8;
401 	NamedHotspot _item9;
402 	NamedHotspot _item10;
403 	NamedHotspot _item11;
404 	NamedHotspot _item12;
405 	NamedHotspot _item13;
406 	NamedHotspot _item14;
407 	NamedHotspot _item15;
408 	NamedHotspot _item16;
409 	NamedHotspot _item17;
410 	NamedHotspot _item18;
411 	NamedHotspot _item19;
412 	NamedHotspot _item20;
413 	NamedHotspot _item21;
414 
415 	Action1 _action1;
416 	Action2 _action2;
417 	Action3 _action3;
418 
419 	SpeakerGameText gameTextSpeaker;
420 
421 	bool _soleOpened;
422 	int _bootInsetDisplayed;
423 
424 	void postInit(SceneObjectList *OwnerList = NULL) override;
425 	void signal() override;
426 	void dispatch() override;
427 	void synchronize(Serializer &s) override;
428 };
429 
430 class Scene935: public PalettedScene {
431 	/* Actions */
432 	class Action1 : public Action {
433 	public:
434 		void signal() override;
435 	};
436 
437 public:
438 	SequenceManager _sequenceManager;
439 	NamedObject _object1;
440 	NamedObject _object2;
441 	NamedObject _object3;
442 	Action1 _action1;
443 	VisualSpeaker _visualSpeaker;
444 
445 	void postInit(SceneObjectList *OwnerList = NULL) override;
446 	void remove() override;
447 	void signal() override;
448 	void dispatch() override;
449 };
450 
451 class Scene940: public SceneExt {
452 	/* Items */
453 	class Item1: public NamedHotspot {
454 	public:
455 		bool startAction(CursorType action, Event &event) override;
456 	};
457 	/* Actions */
458 	class Action1 : public Action {
459 	public:
460 		void signal() override;
461 	};
462 
463 public:
464 	SequenceManager _sequenceManager1;
465 	SequenceManager _sequenceManager2;
466 	SequenceManager _sequenceManager3;
467 	SequenceManager _sequenceManager4;
468 	NamedObject _object1;
469 	NamedObject _object2;
470 	NamedObject _object3;
471 	NamedObject _object4;
472 	NamedObject _object5;
473 	NamedObject _object6;
474 	NamedObject _object7;
475 	NamedObject _object8;
476 	NamedObject _object9;
477 	NamedObject _object10;
478 	NamedObject _object11;
479 	NamedObject _object12;
480 	NamedObject _object13;
481 	NamedObject _object14;
482 	NamedObject _object15;
483 	NamedObject _object16;
484 	NamedObject _object17;
485 	NamedObject _object18;
486 	Item1 _item1;
487 	Action1 _action1;
488 
489 	SpeakerGameText _gameTextSpeaker1;
490 	SpeakerGameText _gameTextSpeaker2;
491 
492 	void postInit(SceneObjectList *OwnerList = NULL) override;
493 	void remove() override;
494 };
495 
496 } // End of namespace BlueForce
497 } // End of namespace TsAGE
498 
499 #endif
500