ScummVM API documentation
module1200_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_MODULE1200_SPRITES_H
23 #define NEVERHOOD_MODULES_MODULE1200_SPRITES_H
24 
25 #include "neverhood/neverhood.h"
26 #include "neverhood/module.h"
27 #include "neverhood/scene.h"
28 
29 namespace Neverhood {
30 
31 // Used for both the scene sprites and the scene itself (for clipping)
32 static const NPoint kScene1201PointArray[] = {
33  {218, 193}, {410, 225}, {368, 277},
34  {194, 227}, {366, 174}, {458, 224},
35  {242, 228}, {512, 228}, {458, 277},
36  {217, 233}, {458, 173}, {410, 276},
37  {203, 280}, {371, 226}, {508, 279},
38  {230, 273}, {410, 171}, {493, 174}
39 };
40 
42 public:
43  AsScene1201Tape(NeverhoodEngine *vm, Scene *parentScene, uint32 nameHash, int surfacePriority, int16 x, int16 y, uint32 fileHash);
44 protected:
45  Scene *_parentScene;
46  uint32 _nameHash;
47  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
48 };
49 
51 public:
52  AsScene1201TntManRope(NeverhoodEngine *vm, bool isDummyHanging);
53 protected:
54  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
55 };
56 
58 public:
59  AsScene1201RightDoor(NeverhoodEngine *vm, Sprite *klaymen, bool isOpen);
60 protected:
61  Sprite *_klaymen;
62  int _countdown;
63  void update();
64  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
65  void stOpenDoor();
66  void stCloseDoor();
67  void stCloseDoorDone();
68 };
69 
71 public:
73 protected:
74  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
75 };
76 
78 public:
79  AsScene1201TntMan(NeverhoodEngine *vm, Scene *parentScene, Sprite *asTntManRope, bool isDown);
80  ~AsScene1201TntMan() override;
81 protected:
82  Scene *_parentScene;
83  Sprite *_asTntManRope;
84  Sprite *_sprite;
85  bool _isMoving;
86  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
87  uint32 hmComingDown(int messageNum, const MessageParam &param, Entity *sender);
88  void suMoving();
89  void stStanding();
90  void stComingDown();
91  void stMoving();
92 };
93 
95 public:
97  ~AsScene1201TntManFlame() override;
98 protected:
99  Sprite *_asTntMan;
100  void update();
101  void suUpdate();
102 };
103 
105 public:
106  AsScene1201Match(NeverhoodEngine *vm, Scene *parentScene);
107 protected:
108  Scene *_parentScene;
109  int _countdown;
110  int _status;
111  void update();
112  uint32 hmOnDoorFrameAboutToMove(int messageNum, const MessageParam &param, Entity *sender);
113  uint32 hmOnDoorFrameMoving(int messageNum, const MessageParam &param, Entity *sender);
114  uint32 hmIdle(int messageNum, const MessageParam &param, Entity *sender);
115  void stOnDoorFrameMoving();
116  void stFallingFromDoorFrame();
117  void stOnDoorFrameAboutToMove();
118  void stIdleOnDoorFrame();
119  void stIdleOnFloor();
120 };
121 
123 public:
124  AsScene1201Creature(NeverhoodEngine *vm, Scene *parentScene, Sprite *klaymen);
125 protected:
126  Scene *_parentScene;
127  Sprite *_klaymen;
128  int _countdown;
129  bool _klaymenTooClose;
130  void update();
131  uint32 hmWaiting(int messageNum, const MessageParam &param, Entity *sender);
132  uint32 hmPincerSnap(int messageNum, const MessageParam &param, Entity *sender);
133  uint32 hmPincerSnapKlaymen(int messageNum, const MessageParam &param, Entity *sender);
134  void stWaiting();
135  void stPincerSnap();
136  void stStartReachForTntDummy();
137  void stReachForTntDummy();
138  void stPincerSnapKlaymen();
139 };
140 
142 public:
144 protected:
145  Sprite *_klaymen;
146  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
147  void stCloseDoor();
148 };
149 
150 class SsScene1201Tnt : public StaticSprite {
151 public:
152  SsScene1201Tnt(NeverhoodEngine *vm, uint32 elemIndex, uint32 pointIndex, int16 clipY2);
153 };
154 
156 public:
157  AsScene1202TntItem(NeverhoodEngine *vm, Scene *parentScene, int index);
158 protected:
159  Scene *_parentScene;
160  int _itemIndex, _newPosition;
161  uint32 hmShowIdle(int messageNum, const MessageParam &param, Entity *sender);
162  uint32 hmChangePosition(int messageNum, const MessageParam &param, Entity *sender);
163  void stShowIdle();
164  void stChangePositionFadeOut();
165  void stChangePositionFadeIn();
166  void stChangePositionDone();
167 };
168 
169 class KmScene1201 : public Klaymen {
170 public:
171  KmScene1201(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
172 protected:
173  void stCloseEyes();
174  void stTumbleHeadless();
175  void stFetchMatch();
176  void stLightMatch();
177 
178  uint32 hmTumbleHeadless(int messageNum, const MessageParam &param, Entity *sender);
179  uint32 hmMatch(int messageNum, const MessageParam &param, Entity *sender);
180 
181  uint32 xHandleMessage(int messageNum, const MessageParam &param) override;
182 };
183 
184 } // End of namespace Neverhood
185 
186 #endif /* NEVERHOOD_MODULES_MODULE1200_SPRITES_H */
Definition: background.h:30
Definition: neverhood.h:60
Definition: module1200_sprites.h:155
Definition: module1200_sprites.h:150
Definition: module1200_sprites.h:50
Definition: sprite.h:140
Definition: entity.h:42
Definition: module1200_sprites.h:122
Definition: entity.h:77
Definition: module1200_sprites.h:169
Definition: module1200_sprites.h:77
Definition: scene.h:41
Definition: sprite.h:54
Definition: sprite.h:119
Definition: module1200_sprites.h:104
Definition: module1200_sprites.h:94
Definition: module1200_sprites.h:141
Definition: klaymen.h:59
Definition: module1200_sprites.h:70
Definition: module1200_sprites.h:41
Definition: module1200_sprites.h:57