]> git.tdb.fi Git - libs/demoscene.git/blob - source/action.h
Move the Action class out of Sequencer
[libs/demoscene.git] / source / action.h
1 #ifndef MSP_DEMOSCENE_ACTION_H_
2 #define MSP_DEMOSCENE_ACTION_H_
3
4 class Action
5 {
6 protected:
7         Action() { }
8 public:
9         virtual ~Action() { }
10
11         virtual void start(float, float) { }
12         virtual void beat(int) { }
13         virtual void tick(float, float) { }
14         virtual void end(float) { }
15 };
16
17 class InterpolationAction: public Action
18 {
19 protected:
20         bool hermite;
21         float start_beat;
22         float duration;
23
24         InterpolationAction(bool = false);
25
26 public:
27         virtual void start(float, float);
28         virtual void tick(float, float);
29         virtual void end(float);
30         virtual void interpolate(float, float) { }
31 };
32
33 #endif