]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Transition.hh
refactoring needed for win32 crash
[chaz/yoink] / src / Moof / Transition.hh
index f1e1bcb4c6efb0a4523e7e3d2320fe7e70f09d2c..dfc2602ec988bbe3bb6fd692a2cd56bd86ed036e 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <boost/shared_ptr.hpp>
 
-#include <Moof/Engine.hh>
+#include <Moof/Core.hh>
 #include <Moof/Interpolator.hh>
 #include <Moof/Layer.hh>
 #include <Moof/Log.hh>
@@ -51,15 +51,12 @@ class Transition : public Layer
 
        T               mInterp;
 
-       Engine* mEngine;
-
 public:
 
        Transition(LayerP t, LayerP f, const T& interp) :
                mTo(t),
                mFrom(f),
-               mInterp(interp),
-               mEngine(0) {}
+               mInterp(interp) {}
 
        typedef boost::shared_ptr<Transition> Ptr;
 
@@ -69,14 +66,9 @@ public:
        }
 
 
-       void pushed(Engine& engine)
-       {
-               mEngine = &engine;
-       }
-
-       void popped(Engine& engine)
+       void removedFromCore()
        {
-               if (mTo) engine.push(mTo);
+               if (mTo) core.push(mTo);
        }
 
        void update(Scalar t, Scalar dt)
@@ -89,7 +81,7 @@ public:
                if (mInterp.isDone())
                {
                        // to should /replace/ this
-                       mEngine->pop(this);
+                       core.pop(this);
                }
        }
 
@@ -105,15 +97,15 @@ public:
                glMatrixMode(GL_MODELVIEW);
                glPushMatrix();
                glLoadIdentity();
-               glColor4(1.0, 1.0, 1.0, alpha);
+               glColor(1.0, 1.0, 1.0, alpha);
                Mf::Texture::resetBind();
 
                //glRectf(-1.0f, -1.0f, 1.0f, 1.0f);
                glBegin(GL_QUADS);
-                       glVertex3f(-1.0, -1.0, -0.1);
-                       glVertex3f(1.0, -1.0, -0.1);
-                       glVertex3f(1.0, 1.0, -0.1);
-                       glVertex3f(-1.0, 1.0, -0.1);
+                       glVertex(-1.0, -1.0, -0.1);
+                       glVertex(1.0, -1.0, -0.1);
+                       glVertex(1.0, 1.0, -0.1);
+                       glVertex(-1.0, 1.0, -0.1);
                glEnd();
 
                glDisable(GL_BLEND);
@@ -129,7 +121,7 @@ public:
        void draw(Scalar alpha) const
        {
                Scalar a = mInterp.getState(alpha);
-               logInfo("draw state: %f", a);
+               logInfo << "transition state: " << a << std::endl;
 
                //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
This page took 0.022763 seconds and 4 git commands to generate.