]> git.tdb.fi Git - libs/demoscene.git/commitdiff
Minor cleanups
authorMikko Rasa <tdb@tdb.fi>
Wed, 22 May 2019 20:17:40 +0000 (23:17 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 22 May 2019 20:17:40 +0000 (23:17 +0300)
source/fadeoverlay.h
source/sequencer.cpp
source/stage.cpp
source/stage.h

index e25d16848ebe054fa166f244ed81b2480f9ea226..e427c4ee9914c38752e1038a5edebbde08ddc2d7 100644 (file)
@@ -47,7 +47,6 @@ private:
 public:
        FadeOverlay(Msp::DataFile::Collection &);
 
-       void set_content(Msp::GL::Renderable *);
        void set_color(const Msp::GL::Color &);
 
        virtual void render(Msp::GL::Renderer &, const Msp::GL::Texture2D &, const Msp::GL::Texture2D &);
index 3807e1c15a760777273cc65a0c7030287f8c7467..8bca70bb368764d7a94058b95aaf595623a95913 100644 (file)
@@ -34,12 +34,12 @@ void Sequencer::add_action(Action &act, float sb, float eb)
        if(sb<0 || sb>eb)
                throw invalid_argument("Sequencer::add_action");
 
-       Segment seq_act;
-       seq_act.action = &act;
-       seq_act.start_beat = sb;
-       seq_act.end_beat = eb;
+       Segment seg;
+       seg.action = &act;
+       seg.start_beat = sb;
+       seg.end_beat = eb;
        auto i = find_if(segments, [=](const Segment &s){ return s.start_beat>sb; });
-       segments.insert(i, seq_act);
+       segments.insert(i, seg);
 }
 
 void Sequencer::start()
index cbe576fa24ba566d2e33bcb2e04201c8c40be027..94782add256f16ddc7cd2ed5c06905ae3dd4fd54 100644 (file)
@@ -43,16 +43,16 @@ void Stage::UseInView::start(float, float)
 Stage::UseInView::Loader::Loader(UseInView &u, Demo &d):
        DataFile::DerivedObjectLoader<UseInView, Action::Loader>(u, d)
 {
-       add("view", &Loader::view);
        add("stage", &Loader::stage);
+       add("view", &Loader::view);
 }
 
-void Stage::UseInView::Loader::view(const string &n)
+void Stage::UseInView::Loader::stage(const string &n)
 {
-       obj.view = &demo.get_thing<GL::View>(n);
+       obj.stage = &demo.get_thing<Stage>(n);
 }
 
-void Stage::UseInView::Loader::stage(const string &n)
+void Stage::UseInView::Loader::view(const string &n)
 {
-       obj.stage = &demo.get_thing<Stage>(n);
+       obj.view = &demo.get_thing<GL::View>(n);
 }
index c43cccb31601e2d86637706c69224973f7489979..1ab32d83d27d07fa50be5510c5b7bf8216ab43db 100644 (file)
@@ -16,8 +16,8 @@ struct Stage
                        Loader(UseInView &, Demo &);
 
                private:
-                       void view(const std::string &);
                        void stage(const std::string &);
+                       void view(const std::string &);
                };
 
        private: