X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FTransition.hh;h=dfc2602ec988bbe3bb6fd692a2cd56bd86ed036e;hp=f1e1bcb4c6efb0a4523e7e3d2320fe7e70f09d2c;hb=3f6e44698c38b74bb622ad81ea9d2daa636981d2;hpb=a31d65a998121df0651c57bfb68782e2a07d2e2f diff --git a/src/Moof/Transition.hh b/src/Moof/Transition.hh index f1e1bcb..dfc2602 100644 --- a/src/Moof/Transition.hh +++ b/src/Moof/Transition.hh @@ -31,7 +31,7 @@ #include -#include +#include #include #include #include @@ -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 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);