]> git.tdb.fi Git - libs/demoscene.git/blob - source/animate.h
d386a7ac452a90cedb392cadf5c859a9f2c15e31
[libs/demoscene.git] / source / animate.h
1 #ifndef MSP_DEMOSCENE_ANIMATE_H_
2 #define MSP_DEMOSCENE_ANIMATE_H_
3
4 #include <msp/gl/animation.h>
5 #include <msp/gl/animationplayer.h>
6 #include "action.h"
7
8 class Animate: public Action
9 {
10 public:
11         class Loader: public Msp::DataFile::DerivedObjectLoader<Animate, Action::Loader>
12         {
13         public:
14                 Loader(Animate &, Demo &);
15
16         private:
17                 void animation(const std::string &);
18                 void target(const std::string &);
19         };
20
21 private:
22         Msp::GL::Placeable *target;
23         const Msp::GL::Animation *anim;
24         Msp::GL::AnimationPlayer *player;
25
26 public:
27         Animate();
28         Animate(Msp::GL::Placeable &, const Msp::GL::Animation &, Msp::GL::AnimationPlayer &);
29
30         virtual void validate() const;
31
32         virtual void start(float, float);
33 };
34
35 #endif