ScummVM API documentation
module2200_sprites.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_MODULE2200_SPRITES_H
23 #define NEVERHOOD_MODULES_MODULE2200_SPRITES_H
24 
25 #include "neverhood/neverhood.h"
26 #include "neverhood/module.h"
27 #include "neverhood/scene.h"
28 #include "neverhood/graphics.h"
29 
30 namespace Neverhood {
31 
32 static const NPoint kSsScene2201PuzzleCubePoints[] = {
33  {305, 305}, {321, 305}, {336, 305}, {305, 319},
34  {321, 319}, {336, 319}, {305, 332}, {321, 332},
35  {336, 333}
36 };
37 
38 static const uint32 kSsScene2201PuzzleCubeFileHashes[] = {
39  0x88134A44, 0xAA124340, 0xB8124602, 0xA902464C,
40  0x890A4244, 0xA8124642, 0xB812C204, 0x381A4A4C
41 };
42 
44 public:
46 };
47 
49 public:
50  AsScene2201Door(NeverhoodEngine *vm, Klaymen *klaymen, Sprite *ssDoorLight, bool isOpen);
51 protected:
52  Klaymen *_klaymen;
53  Sprite *_ssDoorLight;
54  bool _isOpen;
55  int _countdown;
56  void update();
57  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
58  void stOpenDoor();
59  void stCloseDoor();
60 };
61 
63 public:
64  SsScene2201PuzzleCube(NeverhoodEngine *vm, uint32 positionIndex, uint32 cubeIndex);
65 };
66 
68 public:
69  SsScene2202PuzzleCube(NeverhoodEngine *vm, Scene *parentScene, int16 cubePosition, int16 cubeSymbol);
70 protected:
71  Scene *_parentScene;
72  int16 _cubeSymbol;
73  int16 _cubePosition;
74  int16 _newX, _newY;
75  int16 _xDelta, _yDelta;
76  int16 _xIncr;
77  int16 _yIncr;
78  int16 _errValue;
79  int16 _counter;
80  int16 _xFlagPos;
81  bool _counterDirection;
82  bool _isMoving;
83  void update();
84  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
85  void suMoveCubeX();
86  void suMoveCubeY();
87  void moveCube(int16 newCubePosition);
88  void stopMoving();
89 };
90 
91 class AsCommonKey : public AnimatedSprite {
92 public:
93  AsCommonKey(NeverhoodEngine *vm, Scene *parentScene, int keyIndex, int surfacePriority, int16 x, int16 y);
94 protected:
95  Scene *_parentScene;
96  int _keyIndex;
97  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
98 };
99 
101 public:
102  AsScene2203Door(NeverhoodEngine *vm, Scene *parentScene, uint doorIndex);
103 protected:
104  Scene *_parentScene;
105  Sprite *_otherDoor;
106  uint _doorIndex;
107  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
108  void openDoor();
109  void closeDoor();
110 };
111 
113 public:
115 protected:
116  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
117 };
118 
120 public:
121  AsScene2206DoorSpikes(NeverhoodEngine *vm, uint32 fileHash);
122 protected:
123  int _deltaIndex;
124  void update();
125  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
126  void suOpen();
127  void suClose();
128 };
129 
131 public:
132  AsScene2206Platform(NeverhoodEngine *vm, uint32 fileHash);
133 protected:
134  int16 _yDelta;
135  void update();
136  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
137  void suMoveDown();
138 };
139 
141 public:
142  SsScene2206TestTube(NeverhoodEngine *vm, Scene *parentScene, int surfacePriority, uint32 fileHash);
143 protected:
144  Scene *_parentScene;
145  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
146 };
147 
149 public:
150  AsScene2207Elevator(NeverhoodEngine *vm, Scene *parentScene);
151  ~AsScene2207Elevator() override;
152 protected:
153  Scene *_parentScene;
154  NPointArray *_pointArray;
155  int16 _pointIndex;
156  int16 _destPointIndex, _destPointIndexDelta;
157  bool _isMoving;
158  void update();
159  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
160  void suSetPosition();
161  void moveToY(int16 y);
162 };
163 
165 public:
166  AsScene2207Lever(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, int doDeltaX);
167 protected:
168  Scene *_parentScene;
169  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
170  void stLeverDown();
171  void stLeverDownEvent();
172  void stLeverUp();
173  void stLeverUpEvent();
174 };
175 
177 public:
179  ~AsScene2207WallRobotAnimation() override;
180 protected:
181  bool _idle;
182  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
183  void stStartAnimation();
184  void stStopAnimation();
185  void cbStopAnimation();
186 };
187 
189 public:
191 protected:
192  bool _idle;
193  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
194  void stStartAnimation();
195  void stStopAnimation();
196  void cbStopAnimation();
197 };
198 
200 public:
201  SsScene2207Symbol(NeverhoodEngine *vm, uint32 fileHash, int index);
202 };
203 
204 class KmScene2201 : public Klaymen {
205 public:
206  KmScene2201(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, NRect *clipRects, int clipRectsCount);
207 protected:
208  uint32 xHandleMessage(int messageNum, const MessageParam &param) override;
209 };
210 
211 class KmScene2203 : public Klaymen {
212 public:
213  KmScene2203(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
214 protected:
215  void stClayDoorOpen();
216  uint32 hmClayDoorOpen(int messageNum, const MessageParam &param, Entity *sender);
217 
218  uint32 xHandleMessage(int messageNum, const MessageParam &param) override;
219 };
220 
221 class KmScene2205 : public Klaymen {
222 public:
223  KmScene2205(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
224 protected:
225  void xUpdate() override;
226  uint32 xHandleMessage(int messageNum, const MessageParam &param) override;
227 };
228 
229 class KmScene2206 : public Klaymen {
230 public:
231  KmScene2206(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
232  ~KmScene2206() override;
233 protected:
234  void stRidePlatformDown();
235  void suRidePlatformDown();
236 
237  void xUpdate() override;
238  uint32 xHandleMessage(int messageNum, const MessageParam &param) override;
239 };
240 
241 class KmScene2207 : public Klaymen {
242 public:
243  KmScene2207(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
244 protected:
245  uint32 xHandleMessage(int messageNum, const MessageParam &param) override;
246 };
247 
248 class KmScene2242 : public Klaymen {
249 public:
250  KmScene2242(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
251 protected:
252  void xUpdate() override;
253  uint32 xHandleMessage(int messageNum, const MessageParam &param) override;
254 };
255 
256 class KmHallOfRecords : public Klaymen {
257 public:
258  KmHallOfRecords(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
259 protected:
260  void xUpdate() override;
261  uint32 xHandleMessage(int messageNum, const MessageParam &param) override;
262 };
263 
264 class KmScene2247 : public Klaymen {
265 public:
266  KmScene2247(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
267 protected:
268  void xUpdate() override;
269  uint32 xHandleMessage(int messageNum, const MessageParam &param) override;
270 };
271 
272 } // End of namespace Neverhood
273 
274 #endif /* NEVERHOOD_MODULES_MODULE2200_SPRITES_H */
Definition: module2200_sprites.h:188
Definition: background.h:30
Definition: module2200_sprites.h:62
Definition: module2200_sprites.h:256
Definition: module2200_sprites.h:164
Definition: module2200_sprites.h:248
Definition: module2200_sprites.h:229
Definition: module2200_sprites.h:91
Definition: neverhood.h:60
Definition: array.h:52
Definition: module2200_sprites.h:67
Definition: module2200_sprites.h:176
Definition: module2200_sprites.h:140
Definition: module2200_sprites.h:43
Definition: sprite.h:140
Definition: module2200_sprites.h:148
Definition: module2200_sprites.h:221
Definition: module2200_sprites.h:112
Definition: graphics.h:42
Definition: entity.h:42
Definition: entity.h:77
Definition: module2200_sprites.h:264
Definition: module2200_sprites.h:48
Definition: module2200_sprites.h:204
Definition: scene.h:41
Definition: sprite.h:54
Definition: module2200_sprites.h:119
Definition: sprite.h:119
Definition: module2200_sprites.h:241
Definition: module2200_sprites.h:199
Definition: module2200_sprites.h:100
Definition: module2200_sprites.h:211
Definition: module2200_sprites.h:130
Definition: klaymen.h:59