]> git.tdb.fi Git - libs/demoscene.git/blobdiff - source/action.cpp
Put everything in namespace Msp::DemoScene
[libs/demoscene.git] / source / action.cpp
index b7cf08278485747282d4aa80ee5b997ff9c7ba4b..de3b08a1e3c1bde940a3bc36632ccba359d25b6f 100644 (file)
@@ -1,7 +1,10 @@
 #include "action.h"
 
-InterpolationAction::InterpolationAction(bool h):
-       hermite(h),
+namespace Msp {
+namespace DemoScene {
+
+InterpolationAction::InterpolationAction(Mode m):
+       mode(m),
        start_beat(0),
        duration(0)
 { }
@@ -19,7 +22,7 @@ void InterpolationAction::tick(float b, float d)
        {
                float t = (b-start_beat)/duration;
                float dt = d/duration;
-               if(hermite)
+               if(mode==HERMITE)
                {
                        dt = t-dt;
                        t = (3-2*t)*t*t;
@@ -35,3 +38,12 @@ void InterpolationAction::end(float)
 {
        interpolate(1.0f, 0.0f);
 }
+
+
+Action::Loader::Loader(Action &a, Demo &d):
+       DataFile::ObjectLoader<Action>(a),
+       demo(d)
+{ }
+
+} // namespace DemoScene
+} // namespace Msp