]> Dogcows Code - chaz/yoink/blobdiff - src/TitleLayer.cc
refactoring needed for win32 crash
[chaz/yoink] / src / TitleLayer.cc
index f5e4ef02a423300c928e5cc77c52dd153dfc96af..9c609137ce45187977ad1d105cdded4d58a41ffb 100644 (file)
@@ -26,7 +26,7 @@
 
 *******************************************************************************/
 
-#include <Moof/Engine.hh>
+#include <Moof/Core.hh>
 #include <Moof/OpenGL.hh>
 #include <Moof/Transition.hh>
 
@@ -34,7 +34,7 @@
 #include "TitleLayer.hh"
 
 
-void TitleLayer::pushed(Mf::Engine& engine)
+void TitleLayer::addedToCore()
 {
        Mf::Scalar coeff[] = {0.0, 1.0};
        mFadeIn.init(coeff, 0.1);
@@ -42,18 +42,18 @@ void TitleLayer::pushed(Mf::Engine& engine)
        mGameLayer = GameLayer::alloc();
 }
 
-void TitleLayer::update(Mf::Engine& engine, Mf::Scalar t, Mf::Scalar dt)
+void TitleLayer::update(Mf::Scalar t, Mf::Scalar dt)
 {
        if (!mFadeIn.isDone()) mFadeIn.update(t, dt);
 }
 
-void TitleLayer::draw(Mf::Engine& engine, Mf::Scalar alpha) const
+void TitleLayer::draw(Mf::Scalar alpha) const
 {
        glClearColor(0.0, 0.0, mFadeIn.getState(alpha), 1.0);
        glClear(GL_COLOR_BUFFER_BIT);
 }
 
-bool TitleLayer::handleEvent(Mf::Engine& engine, const Mf::Event& event)
+bool TitleLayer::handleEvent(const Mf::Event& event)
 {
        switch (event.type)
        {
@@ -63,8 +63,8 @@ bool TitleLayer::handleEvent(Mf::Engine& engine, const Mf::Event& event)
                                //break;
                        //}
 
-                       Mf::LayerP titleLayer = engine.pop(this);
-                       //engine.pushLayer(GameLayer::alloc());
+                       Mf::LayerP titleLayer = Mf::core.pop(this);
+                       //core.pushLayer(GameLayer::alloc());
 
                        Mf::Scalar coeff[] = {0.0, 0.75, 0.99, 1.0};
                        Mf::PolynomialInterpolator<3> interp(coeff, 0.1);
@@ -72,7 +72,7 @@ bool TitleLayer::handleEvent(Mf::Engine& engine, const Mf::Event& event)
                        //Mf::LayerP mGameLayer = GameLayer::alloc();
                        Mf::Transition<Mf::PolynomialInterpolator<3> >::Ptr transition =
                                Mf::Transition<Mf::PolynomialInterpolator<3> >::alloc(mGameLayer, titleLayer, interp);
-                       engine.push(transition);
+                       Mf::core.push(transition);
                        return true;
        }
 
This page took 0.019841 seconds and 4 git commands to generate.