ScummVM API documentation
module1900_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_MODULE1900_SPRITES_H
23 #define NEVERHOOD_MODULES_MODULE1900_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 Scene1907;
32 
34 public:
35  AsScene1907Symbol(NeverhoodEngine *vm, Scene1907 *parentScene, int elementIndex, int positionIndex);
36  void moveUp();
37  void moveDown();
38  void fallOff(int newPositionIndex, int fallOffDelay);
39  bool isPluggedIn() { return _isPluggedIn; }
40  bool isMoving() { return _isMoving; }
41 protected:
42  Scene1907 *_parentScene;
43  int _elementIndex;
44  int _currPositionIndex;
45  int _newPositionIndex;
46  bool _isPluggedIn;
47  bool _isMoving;
48  int _someX, _someY;
49  int _xBreak;
50  int _currStep;
51  int _yAccel;
52  int _yIncr;
53  int _fallOffDelay;
54  int _deltaX, _smallDeltaX;
55  int _deltaY, _smallDeltaY;
56  // Dumb, change if possible
57  static bool _plugInFailed;
58  static int _plugInTryCount;
59  void update();
60  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
61  uint32 hmTryToPlugIn(int messageNum, const MessageParam &param, Entity *sender);
62  void suTryToPlugIn();
63  void suFallOff();
64  void suFallOffHitGround();
65  void suMoveDown();
66  void suMoveUp();
67  void tryToPlugIn();
68  void stFallOffHitGround();
69  void cbFallOffHitGroundEvent();
70  void stPlugIn();
71  void stPlugInFail();
72 };
73 
75 public:
77  void show();
78 protected:
79  void update();
80  uint32 hmShowing(int messageNum, const MessageParam &param, Entity *sender);
81  void hide();
82 };
83 
85 public:
86  SsScene1907UpDownButton(NeverhoodEngine *vm, Scene1907 *parentScene, AsScene1907Symbol *asScene1907Symbol);
87  void setToUpPosition();
88  void setToDownPosition();
89 protected:
90  Scene1907 *_parentScene;
91  AsScene1907Symbol *_asScene1907Symbol;
92  int _countdown1;
93  void update();
94  uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
95 };
96 
97 class KmScene1901 : public Klaymen {
98 public:
99  KmScene1901(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
100 protected:
101  uint32 xHandleMessage(int messageNum, const MessageParam &param) override;
102 };
103 
104 } // End of namespace Neverhood
105 
106 #endif /* NEVERHOOD_MODULES_MODULE1900_SPRITES_H */
Definition: background.h:30
Definition: module1900_sprites.h:74
Definition: module1900.h:51
Definition: neverhood.h:60
Definition: module1900_sprites.h:33
Definition: sprite.h:140
Definition: entity.h:42
Definition: entity.h:77
Definition: module1900_sprites.h:97
Definition: scene.h:41
Definition: sprite.h:119
Definition: module1900_sprites.h:84
Definition: klaymen.h:59