ScummVM API documentation
module2200.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_H
23 #define NEVERHOOD_MODULES_MODULE2200_H
24 
25 #include "neverhood/neverhood.h"
26 #include "neverhood/module.h"
27 #include "neverhood/scene.h"
28 #include "neverhood/modules/module1000.h"
29 #include "neverhood/graphics.h"
30 
31 namespace Neverhood {
32 
33 class Module2200 : public Module {
34 public:
35  Module2200(NeverhoodEngine *vm, Module *parentModule, int which);
36  ~Module2200() override;
37 protected:
38  int _sceneNum;
39  void createScene(int sceneNum, int which);
40  void updateScene();
41  void createHallOfRecordsScene(int which, uint32 hallOfRecordsInfoId);
42  bool shouldSkipHall();
43 };
44 
45 class Scene2201 : public Scene {
46 public:
47  Scene2201(NeverhoodEngine *vm, Module *parentModule, int which);
48  ~Scene2201() override;
49 protected:
50  NRect _clipRects[2];
51  Sprite *_ssDoorLight;
52  Sprite *_asDoor;
53  Sprite *_ssDoorButton;
54  Sprite *_asTape;
55  bool _isSoundPlaying;
56  void update();
57  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
58 };
59 
60 class Scene2202 : public Scene {
61 public:
62  Scene2202(NeverhoodEngine *vm, Module *parentModule, int which);
63  ~Scene2202() override;
64 protected:
65  Sprite *_ssMovingCube;
66  Sprite *_ssDoneMovingCube;
67  bool _isCubeMoving;
68  int16 _movingCubePosition;
69  int _surfacePriority;
70  bool _leaveScene;
71  bool _isSolved;
72  void update();
73  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
74  int16 getFreeCubePosition(int16 index);
75  bool testIsSolved();
76 };
77 
78 class Scene2203 : public Scene {
79 public:
80  Scene2203(NeverhoodEngine *vm, Module *parentModule, int which);
81  ~Scene2203() override;
82 protected:
83  Sprite *_asLeftDoor;
84  Sprite *_asRightDoor;
85  Sprite *_ssSmallLeftDoor;
86  Sprite *_ssSmallRightDoor;
87  Sprite *_asTape;
88  Sprite *_asKey;
89  NRect _leftDoorClipRect;
90  NRect _rightDoorClipRect;
91  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
92 };
93 
95 
96 class Scene2205 : public Scene {
97 public:
98  Scene2205(NeverhoodEngine *vm, Module *parentModule, int which);
99 protected:
100  SsCommonPressButton *_ssLightSwitch;
101  Sprite *_ssDoorFrame;
102  bool _isKlaymenInLight;
103  bool _isLightOn;
104  void update();
105  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
106 };
107 
108 class Scene2206 : public Scene {
109 public:
110  Scene2206(NeverhoodEngine *vm, Module *parentModule, int which);
111  ~Scene2206() override;
112 protected:
113  Sprite *_sprite1;
114  Sprite *_sprite2;
115  Sprite *_sprite3;
116  Sprite *_asDoorSpikes;
117  Sprite *_ssButton;
118  Sprite *_asPlatform;
119  Sprite *_ssTestTube;
120  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
121  void klaymenInFrontSpikes();
122  void klaymenBehindSpikes();
123  void readClickedColumn();
124 };
125 
126 class Scene2207 : public Scene {
127 public:
128  Scene2207(NeverhoodEngine *vm, Module *parentModule);
129 protected:
130  Sprite *_asElevator;
131  Sprite *_ssMaskPart1;
132  Sprite *_ssMaskPart2;
133  Sprite *_ssMaskPart3;
134  Sprite *_asTape;
135  Sprite *_asLever;
136  Sprite *_asWallRobotAnimation;
137  Sprite *_asWallCannonAnimation;
138  Sprite *_ssButton;
139  int _elevatorSurfacePriority;
140  bool _klaymenAtElevator;
141  void update();
142  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
143  uint32 handleMessage2(int messageNum, const MessageParam &param, Entity *sender);
144 };
145 
146 class Scene2208 : public Scene {
147 public:
148  Scene2208(NeverhoodEngine *vm, Module *parentModule, int which);
149  ~Scene2208() override;
150 protected:
151  FontSurface *_fontSurface;
152  BaseSurface *_backgroundSurface;
153  BaseSurface *_topBackgroundSurface;
154  BaseSurface *_bottomBackgroundSurface;
155  TextResource _textResource;
156  int16 _backgroundScrollY;
157  int16 _newRowIndex;
158  int16 _currRowIndex;
159  int16 _rowScrollY;
160  int16 _maxRowIndex;
161  int16 _visibleRowsCount;
163  void update();
164  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
165  void drawRow(int16 rowIndex);
166 };
167 
168 class Scene2242 : public Scene {
169 public:
170  Scene2242(NeverhoodEngine *vm, Module *parentModule, int which);
171  ~Scene2242() override;
172 protected:
173  Sprite *_asTape;
174  bool _isKlaymenInLight;
175  void update();
176  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
177  void readClickedColumn();
178 };
179 
180 class HallOfRecordsScene : public Scene {
181 public:
182  HallOfRecordsScene(NeverhoodEngine *vm, Module *parentModule, int which, uint32 hallOfRecordsInfoId);
183  ~HallOfRecordsScene() override;
184 protected:
185  HallOfRecordsInfo *_hallOfRecordsInfo;
186  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
187  void readClickedColumn();
188 };
189 
190 class Scene2247 : public Scene {
191 public:
192  Scene2247(NeverhoodEngine *vm, Module *parentModule, int which);
193  ~Scene2247() override;
194 protected:
195  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
196  void readClickedColumn();
197 };
198 
199 } // End of namespace Neverhood
200 
201 #endif /* NEVERHOOD_MODULES_MODULE2200_H */
Definition: module2200.h:168
Definition: background.h:30
Definition: staticdata.h:70
Definition: module2200.h:126
Definition: neverhood.h:60
Definition: module2200.h:60
Definition: module1000_sprites.h:122
Definition: module2200.h:78
Definition: module2200.h:45
Definition: graphics.h:42
Definition: entity.h:42
Definition: module2200.h:33
Definition: entity.h:77
Definition: scene.h:41
Definition: module2200.h:108
Definition: sprite.h:54
Definition: module.h:45
Definition: resource.h:138
Definition: graphics.h:133
Definition: module2200.h:96
Definition: module2200.h:146
Definition: graphics.h:85
Definition: module2200.h:190
Definition: module2200.h:180