]> git.tdb.fi Git - libs/demoscene.git/blobdiff - source/demo.h
Merge CameraControl functionality into other classes
[libs/demoscene.git] / source / demo.h
index 77eb671601fc52f79386b341acf06777d7e1c07a..e9d369bf9b337b202480b8ef1cf128a47127fb80 100644 (file)
@@ -8,11 +8,27 @@
 #include <msp/al/source.h>
 #include <msp/al/streamer.h>
 #include <msp/datafile/collection.h>
+#include <msp/gl/animationplayer.h>
 #include <msp/gl/windowview.h>
+#include "action.h"
 #include "sequencer.h"
 
 class Demo
 {
+private:
+       class AnimationAction: public Action
+       {
+       private:
+               Msp::GL::AnimationPlayer &player;
+
+       public:
+               AnimationAction(Msp::GL::AnimationPlayer &);
+
+               virtual void validate() const { }
+
+               virtual void tick(float, float);
+       };
+
 public:
        sigc::signal<void> signal_finished;
 
@@ -20,6 +36,8 @@ protected:
        Sequencer sequencer;
        Msp::DataFile::Collection &resources;
        Msp::GL::WindowView view;
+       Msp::GL::AnimationPlayer anim_player;
+       AnimationAction anim_action;
        Msp::AL::Source *music_source;
        Msp::AL::Streamer *streamer;
        Msp::IO::Seekable *music_io;
@@ -34,6 +52,9 @@ protected:
 public:
        virtual ~Demo();
 
+       Msp::DataFile::Collection &get_resources() const { return resources; }
+       Msp::GL::AnimationPlayer &get_animation_player() { return anim_player; }
+
        template<typename T>
        T &get_thing(const std::string &);