]> git.tdb.fi Git - libs/demoscene.git/blobdiff - source/demo.h
Make it possible for Stages to add things to the Demo
[libs/demoscene.git] / source / demo.h
index e9d369bf9b337b202480b8ef1cf128a47127fb80..35be62454e0c70100b13f392f560ef8784446a07 100644 (file)
@@ -13,6 +13,8 @@
 #include "action.h"
 #include "sequencer.h"
 
+class Stage;
+
 class Demo
 {
 private:
@@ -30,6 +32,8 @@ private:
        };
 
 public:
+       typedef std::map<std::string, Msp::Variant> ThingMap;
+
        sigc::signal<void> signal_finished;
 
 protected:
@@ -46,7 +50,7 @@ protected:
        Msp::Time::TimeStamp last_tick;
        Msp::Time::TimeStamp next_frame;
 
-       std::map<std::string, Msp::Variant> things;
+       ThingMap things;
 
        Demo(Msp::Graphics::Window &, Msp::Graphics::GLContext &, Msp::DataFile::Collection &);
 public:
@@ -55,6 +59,9 @@ public:
        Msp::DataFile::Collection &get_resources() const { return resources; }
        Msp::GL::AnimationPlayer &get_animation_player() { return anim_player; }
 
+protected:
+       void add_stage(const std::string &, Stage &);
+public:
        template<typename T>
        T &get_thing(const std::string &);