ScummVM API documentation
module2800.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 NEVERHOOD_MODULES_MODULE2800_H
23 #define NEVERHOOD_MODULES_MODULE2800_H
24 
25 #include "neverhood/neverhood.h"
26 #include "neverhood/module.h"
27 #include "neverhood/scene.h"
28 
29 namespace Neverhood {
30 
31 // Module2800
32 
33 class Module2800 : public Module {
34 public:
35  Module2800(NeverhoodEngine *vm, Module *parentModule, int which);
36  ~Module2800() override;
37 protected:
38  int _sceneNum;
39  uint32 _currentMusicFileHash;
40  MusicResource *_musicResource;
41  void createScene(int sceneNum, int which);
42  void updateScene();
43  void updateMusic(bool halfVolume);
44 };
45 
46 class Scene2801 : public Scene {
47 public:
48  Scene2801(NeverhoodEngine *vm, Module *parentModule, int which);
49  ~Scene2801() override;
50 protected:
51  Sprite *_asTape;
52  uint32 _paletteHash;
53  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
54 };
55 
56 class Scene2802 : public Scene {
57 public:
58  Scene2802(NeverhoodEngine *vm, Module *parentModule, int which);
59  ~Scene2802() override;
60 protected:
61  SmackerPlayer *_smackerPlayer;
62  uint _currRadioMusicIndex;
63  int _currTuneStatus;
64  int _countdown1;
65  int _countdown2;
66  void update();
67  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
68  void incRadioMusicIndex(int delta);
69  void changeTuneStatus(int prevTuneStatus, int newTuneStatus);
70 };
71 
73 
74 class Scene2803 : public Scene {
75 public:
76  Scene2803(NeverhoodEngine *vm, Module *parentModule, int which);
77 protected:
78  StaticSprite *_asTestTubeOne;
79  StaticSprite *_asTestTubeTwo;
80  StaticSprite *_asTestTubeThree;
81  Sprite *_asRope;
82  AsScene2803LightCord *_asLightCord;
83  StaticSprite *_sprite3;
84  StaticSprite *_sprite4;
85  StaticSprite *_sprite5;
86  StaticSprite *_sprite6;
87  StaticSprite *_sprite7;
88  StaticSprite *_sprite8;
89  StaticSprite *_sprite9;
90  Sprite *_sprite10;
91  NRect _clipRectsFloor[2];
92  NRect _clipRectsStairs[3];
93  int _paletteArea;
94  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
95  void upKlaymenStairs();
96  void klaymenStairs();
97  void klaymenFloor();
98  void toggleBackground();
99  void changeBackground();
100  void setPaletteArea0();
101  void setPaletteArea1();
102  void updatePaletteArea();
103 };
104 
105 class Scene2803Small : public Scene {
106 public:
107  Scene2803Small(NeverhoodEngine *vm, Module *parentModule, int which);
108 protected:
109  int _paletteArea;
110  Sprite *_sprite1;
111  Sprite *_sprite2;
112  Sprite *_sprite3;
113  Sprite *_sprite4;
114  Sprite *_sprite5;
115  Sprite *_sprite6;
116  Sprite *_sprite7;
117  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
118  void upKlaymenSlope();
119  void upKlaymenFloor();
120  void klaymenSlope();
121  void klaymenFloor();
122  void setPaletteArea0();
123  void setPaletteArea1();
124  void setPaletteArea2();
125  void setPaletteArea3();
126  void updatePaletteArea(bool instantly);
127 };
128 
129 class SsScene2804Flash;
130 class AsScene2804Crystal;
131 
132 class Scene2804 : public Scene {
133 public:
134  Scene2804(NeverhoodEngine *vm, Module *parentModule, int which);
135  bool isWorking() const { return _isWorking; }
136 protected:
137  int _countdown1;
138  int _countdown2;
139  int _countdown3;
140  int _beamStatus;
141  bool _isSolved;
142  bool _isWorking;
143  Sprite *_ssRedButton;
144  Sprite *_asCoil;
145  Sprite *_asTarget;
146  SsScene2804Flash *_ssFlash;
147  AsScene2804Crystal *_asCrystals[5];
148  Sprite *_ssCrystalButtons[5];
149  void update();
150  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
151 };
152 
153 class Scene2805 : public Scene {
154 public:
155  Scene2805(NeverhoodEngine *vm, Module *parentModule, int which);
156 protected:
157  Sprite *_sprite1;
158  Sprite *_sprite2;
159  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
160 };
161 
162 class Scene2806 : public Scene {
163 public:
164  Scene2806(NeverhoodEngine *vm, Module *parentModule, int which);
165 protected:
166  NPointArray *_pointList;
167  int _pointIndex;
168  NRect _clipRects[4];
169  Sprite *_sprite1;
170  Sprite *_sprite2;
171  Sprite *_sprite3;
172  Sprite *_sprite4;
173  Sprite *_asSpew;
174  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
175  void update();
176  void findClosestPoint();
177 };
178 
179 class Scene2807 : public Scene {
180 public:
181  Scene2807(NeverhoodEngine *vm, Module *parentModule, int which);
182 protected:
183  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
184 };
185 
186 class AsScene2808Flow;
187 class AsScene2808TestTube;
188 
189 class Scene2808 : public Scene {
190 public:
191  Scene2808(NeverhoodEngine *vm, Module *parentModule, int which);
192 protected:
193  int _countdown;
194  int _testTubeSetNum;
195  AsScene2808Flow *_asFlow;
196  int _leaveResult;
197  bool _isFlowing;
198  AsScene2808TestTube *_asTestTubes[3];
199  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
200  void update();
201  bool isMixtureGood();
202  bool isAnyTestTubeFilled();
203 };
204 
205 class Scene2809 : public Scene {
206 public:
207  Scene2809(NeverhoodEngine *vm, Module *parentModule, int which);
208 protected:
209  NPointArray *_pointList;
210  int _pointIndex;
211  NRect _clipRects[4];
212  Sprite *_sprite1;
213  Sprite *_sprite2;
214  Sprite *_sprite3;
215  Sprite *_sprite4;
216  Sprite *_asSpew;
217  void update();
218  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
219  void findClosestPoint();
220 };
221 
222 class Scene2810 : public Scene {
223 public:
224  Scene2810(NeverhoodEngine *vm, Module *parentModule, int which);
225  ~Scene2810() override;
226 protected:
227  Sprite *_sprite1;
228  Sprite *_sprite2;
229  Sprite *_sprite3;
230  Sprite *_asRope;
231  Sprite *_sprite4;
232  Sprite *_asTape;
233  Sprite *_sprite5;
234  Sprite *_sprite6;
235  bool _isRopingDown;
236  NRect _clipRects[2];
237  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
238  void insertKlaymenLadder();
239 };
240 
241 class Scene2812 : public Scene {
242 public:
243  Scene2812(NeverhoodEngine *vm, Module *parentModule, int which);
244 protected:
245  Sprite *_asWinch;
246  Sprite *_asTrapDoor;
247  Sprite *_asRope;
248  Sprite *_sprite3;
249  Sprite *_sprite2;
250  Sprite *_sprite4;
251  Sprite *_ssTape;
252  Sprite *_asKey;
253  Sprite *_sprite1;
254  bool _isRopingDown;
255  int _paletteArea;
256  void update();
257  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
258  void setPaletteArea0(bool instantly);
259  void setPaletteArea1(bool instantly);
260  void setPaletteArea2(bool instantly);
261  void updatePaletteArea(bool instantly);
262 };
263 
264 class Scene2822 : public Scene {
265 public:
266  Scene2822(NeverhoodEngine *vm, Module *parentModule, int which);
267 protected:
268  Sprite *_ssButton;
269  int _scrollIndex;
270  int _countdown;
271  int _countdownStatus;
272  void update();
273  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
274 };
275 
276 } // End of namespace Neverhood
277 
278 #endif /* NEVERHOOD_MODULES_MODULE2800_H */
Definition: module2800_sprites.h:31
Definition: background.h:30
Definition: module2800.h:132
Definition: module2800.h:179
Definition: neverhood.h:60
Definition: array.h:52
Definition: module2800.h:56
Definition: module2800.h:74
Definition: module2800_sprites.h:110
Definition: module2800_sprites.h:206
Definition: graphics.h:42
Definition: entity.h:42
Definition: module2800.h:33
Definition: module2800.h:46
Definition: module2800_sprites.h:179
Definition: entity.h:77
Definition: smackerplayer.h:61
Definition: module2800.h:241
Definition: scene.h:41
Definition: sound.h:62
Definition: sprite.h:54
Definition: module2800.h:162
Definition: sprite.h:119
Definition: module.h:45
Definition: module2800.h:205
Definition: module2800.h:105
Definition: module2800.h:153
Definition: module2800_sprites.h:95
Definition: module2800.h:222
Definition: module2800.h:189
Definition: module2800.h:264