1 /* ResidualVM - A 3D game interpreter
2  *
3  * ResidualVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the AUTHORS
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (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, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef STARK_MOVEMENT_FOLLOW_PATH_LIGHT_H
24 #define STARK_MOVEMENT_FOLLOW_PATH_LIGHT_H
25 
26 #include "engines/stark/movement/movement.h"
27 
28 namespace Stark {
29 
30 namespace Resources {
31 class Light;
32 class Path;
33 }
34 
35 /**
36  * Make a light follow pre-computed path
37  */
38 class FollowPathLight : public Movement {
39 public:
40 	FollowPathLight(Resources::ItemVisual *item);
41 	virtual ~FollowPathLight();
42 
43 	// Movement API
44 	void start() override;
45 	void onGameLoop() override;
46 	void stop(bool force = false) override;
47 	uint32 getType() const override;
48 	void saveLoad(ResourceSerializer *serializer) override;
49 
50 	/** Set the path to follow */
51 	void setPath(Resources::Path *path);
52 
53 	/** Set the light to move */
54 	void setLight(Resources::Light *light);
55 
56 	/** Set the movement speed on the path */
57 	void setSpeed(float speed);
58 
59 private:
60 	Resources::Path *_path;
61 	Resources::Light *_light;
62 	float _speed;
63 
64 	float _position;
65 	bool _previouslyEnabled;
66 };
67 
68 } // End of namespace Stark
69 
70 #endif // STARK_MOVEMENT_FOLLOW_PATH_LIGHT_H
71