ScummVM API documentation
module2700.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_MODULE2700_H
23 #define NEVERHOOD_MODULES_MODULE2700_H
24 
25 #include "neverhood/neverhood.h"
26 #include "neverhood/module.h"
27 #include "neverhood/scene.h"
28 #include "neverhood/modules/module1600_sprites.h" // for Tracks
29 
30 namespace Neverhood {
31 
32 // Module2700
33 
34 class Module2700 : public Module {
35 public:
36  Module2700(NeverhoodEngine *vm, Module *parentModule, int which);
37  ~Module2700() override;
38 protected:
39  int _sceneNum;
40  int _soundIndex;
41  bool _radioMusicInitialized;
42  uint32 _scene2711StaticSprites[6];
43  uint32 _musicFileHash;
44  void createScene(int sceneNum, int which);
45  void updateScene();
46  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
47  void createScene2703(int which, uint32 trackInfoId);
48  void createScene2704(int which, uint32 trackInfoId, int16 value, const uint32 *staticSprites = NULL, const NRect *clipRect = NULL);
49 };
50 
51 class AsCommonCar;
52 
53 class Scene2701 : public Scene {
54 public:
55  Scene2701(NeverhoodEngine *vm, Module *parentModule, int which);
56 protected:
57  AsCommonCar *_asCar;
58  Sprite *_ssTrackShadowBackground;
59  Sprite *_asCarShadow;
60  Sprite *_asCarTrackShadow;
61  Sprite *_asCarConnectorShadow;
62  Sprite *_asCarConnector;
63  int _which1, _which2;
64  NPointArray *_trackPoints;
65  uint32 hmRidingCar(int messageNum, const MessageParam &param, Entity *sender);
66  uint32 hmCarAtHome(int messageNum, const MessageParam &param, Entity *sender);
67 };
68 
69 class Scene2702 : public Scene {
70 public:
71  Scene2702(NeverhoodEngine *vm, Module *parentModule, int which);
72 protected:
73  AsCommonCar *_asCar;
74  Sprite *_ssTrackShadowBackground;
75  Sprite *_asCarShadow;
76  Sprite *_asCarTrackShadow;
77  Sprite *_asCarConnectorShadow;
78  NPoint _newTrackDest;
79  bool _isInLight;
80  int _currTrackIndex, _newTrackIndex;
81  bool _isUpperTrack;
82  Tracks _tracks;
83  NPointArray *_trackPoints;
84  void update();
85  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
86  void moveCarToPoint(NPoint pt);
87  void changeTrack();
88 };
89 
90 class Scene2703 : public Scene {
91 public:
92  Scene2703(NeverhoodEngine *vm, Module *parentModule, int which, uint32 trackInfoId);
93 protected:
94  AsCommonCar *_asCar;
95  Sprite *_ssTrackShadowBackground;
96  Sprite *_asCarShadow;
97  Sprite *_asCarConnector;
98  Sprite *_asCarTrackShadow;
99  Sprite *_asCarConnectorShadow;
100  int _palStatus;
101  int _which1, _which2;
102  NPointArray *_trackPoints;
103  void update();
104  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
105 };
106 
107 class Scene2704 : public Scene {
108 public:
109  Scene2704(NeverhoodEngine *vm, Module *parentModule, int which, uint32 trackInfoId, int16 value,
110  const uint32 *staticSprites = NULL, const NRect *clipRect = NULL);
111 protected:
112  AsCommonCar *_asCar;
113  Sprite *_ssTrackShadowBackground;
114  Sprite *_asCarShadow;
115  Sprite *_asCarConnector;
116  Sprite *_asCarTrackShadow;
117  Sprite *_asCarConnectorShadow;
118  int _which1, _which2;
119  NPointArray *_trackPoints;
120  void update();
121  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
122 };
123 
124 class Scene2706 : public Scene {
125 public:
126  Scene2706(NeverhoodEngine *vm, Module *parentModule, int which);
127 protected:
128  AsCommonCar *_asCar;
129  Sprite *_ssTrackShadowBackground;
130  Sprite *_asCarShadow;
131  Sprite *_asCarConnector;
132  Sprite *_asCarTrackShadow;
133  Sprite *_asCarConnectorShadow;
134  NPoint _newTrackDest;
135  int _currTrackIndex, _newTrackIndex;
136  Tracks _tracks;
137  NPointArray *_trackPoints;
138  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
139  void moveCarToPoint(NPoint pt);
140  void changeTrack();
141 };
142 
143 class Scene2732 : public Scene {
144 public:
145  Scene2732(NeverhoodEngine *vm, Module *parentModule);
146 };
147 
148 } // End of namespace Neverhood
149 
150 #endif /* NEVERHOOD_MODULES_MODULE2700_H */
Definition: background.h:30
Definition: module1600_sprites.h:110
Definition: module2700.h:107
Definition: neverhood.h:60
Definition: array.h:52
Definition: module2700.h:69
Definition: module2700.h:90
Definition: graphics.h:42
Definition: entity.h:42
Definition: module2700.h:34
Definition: module2700.h:53
Definition: entity.h:77
Definition: module2700.h:143
Definition: scene.h:41
Definition: sprite.h:54
Definition: module2700.h:124
Definition: module.h:45
Definition: module1600_sprites.h:31
Definition: graphics.h:32