ScummVM API documentation
module1600_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_MODULE1600_SPRITES_H
23 #define NEVERHOOD_MODULES_MODULE1600_SPRITES_H
24 
25 #include "neverhood/neverhood.h"
26 #include "neverhood/module.h"
27 #include "neverhood/scene.h"
28 
29 namespace Neverhood {
30 
31 class AsCommonCar : public AnimatedSprite {
32 public:
33  AsCommonCar(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
34  ~AsCommonCar() override;
35  void setPathPoints(NPointArray *pathPoints);
36 protected:
37  Scene *_parentScene;
38  NPointArray *_pathPoints;
39  int _newMoveDirection;
40  int _currMoveDirection;
41  int _exitDirection;
42  int _currPointIndex;
43  bool _hasAgainDestPoint;
44  NPoint _againDestPoint;
45  bool _hasAgainDestPointIndex;
46  int _againDestPointIndex;
47  bool _inMainArea;
48  bool _isBraking;
49  bool _isBusy;
50  bool _isIdle;
51  bool _isMoving;
52  bool _rectFlag;
53  int _idleCounter;
54  int _idleCounterMax;
55  int _steps;
56  int _stepError;
57  int _lastDistance;
58  int _yMoveTotalSteps;
59  int _ySteps;
60  int _newDeltaXType;
61  int _soundCounter;
62  int _turnMoveStatus;
63  int16 _destX, _destY;
64  NPoint pathPoint(uint index) { return (*_pathPoints)[index]; }
65  void update();
66  void upIdle();
67  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
68  uint32 hmAnimation(int messageNum, const MessageParam &param, Entity *sender);
69  uint32 hmLeaveCar(int messageNum, const MessageParam &param, Entity *sender);
70  void stCarAtHome();
71  void updateTurnMovement();
72  void updateMovement();
73  void stEnterCar();
74  void stLeaveCar();
75  void stLeanForwardIdle();
76  void evIdleDone();
77  void stIdleBlink();
78  void stUpdateMoveDirection();
79  void stTurnCar();
80  void moveToNextPoint();
81  void stBrakeMoveToNextPoint();
82  void stTurnCarMoveToNextPoint();
83  void moveToPrevPoint();
84  void stBrakeMoveToPrevPoint();
85  void stTurnCarMoveToPrevPoint();
86  void evTurnCarDone();
87  void suMoveToNextPoint();
88  void suMoveToPrevPoint();
89  void updateSound();
90 };
91 
93 public:
94  AsCommonIdleCarLower(NeverhoodEngine *vm, int16 x, int16 y);
95 };
96 
98 public:
99  AsCommonIdleCarFull(NeverhoodEngine *vm, int16 x, int16 y);
100 };
101 
103 public:
105 protected:
106  AsCommonCar *_asCar;
107  void update();
108 };
109 
110 class Tracks : public Common::Array<TrackInfo*> {
111 public:
112  void findTrackPoint(NPoint pt, int &minMatchTrackIndex, int &minMatchDistance,
113  DataResource &dataResource);
114 };
115 
116 class KmScene1608 : public Klaymen {
117 public:
118  KmScene1608(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
119 protected:
120  uint32 xHandleMessage(int messageNum, const MessageParam &param) override;
121 };
122 
123 } // End of namespace Neverhood
124 
125 #endif /* NEVERHOOD_MODULES_MODULE1600_SPRITES_H */
Definition: background.h:30
Definition: module1600_sprites.h:110
Definition: neverhood.h:60
Definition: array.h:52
Definition: sprite.h:140
Definition: entity.h:42
Definition: module1600_sprites.h:92
Definition: entity.h:77
Definition: module1600_sprites.h:116
Definition: resource.h:162
Definition: scene.h:41
Definition: module1600_sprites.h:102
Definition: module1600_sprites.h:31
Definition: klaymen.h:59
Definition: module1600_sprites.h:97
Definition: graphics.h:32