X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FTitleLayer.cc;h=9c609137ce45187977ad1d105cdded4d58a41ffb;hp=11c624d07e94e59375141a98681df5a658a7370f;hb=987971a961454d97082c6448fdc0bbeb540281bb;hpb=a31d65a998121df0651c57bfb68782e2a07d2e2f diff --git a/src/TitleLayer.cc b/src/TitleLayer.cc index 11c624d..9c60913 100644 --- a/src/TitleLayer.cc +++ b/src/TitleLayer.cc @@ -26,7 +26,7 @@ *******************************************************************************/ -#include +#include #include #include @@ -34,10 +34,8 @@ #include "TitleLayer.hh" -void TitleLayer::pushed(Mf::Engine& engine) +void TitleLayer::addedToCore() { - mEngine = &engine; - Mf::Scalar coeff[] = {0.0, 1.0}; mFadeIn.init(coeff, 0.1); @@ -60,16 +58,21 @@ bool TitleLayer::handleEvent(const Mf::Event& event) switch (event.type) { case SDL_KEYUP: - Mf::LayerP titleLayer = mEngine->pop(this); - //mEngine->pushLayer(GameLayer::alloc()); + //if (event.key.keysym.sym == SDLK_ESCAPE) + //{ + //break; + //} + + Mf::LayerP titleLayer = Mf::core.pop(this); + //core.pushLayer(GameLayer::alloc()); - Mf::Scalar coeff[] = {0.0, 1.0}; - Mf::Lerp interp(coeff, 0.2); + Mf::Scalar coeff[] = {0.0, 0.75, 0.99, 1.0}; + Mf::PolynomialInterpolator<3> interp(coeff, 0.1); //Mf::LayerP mGameLayer = GameLayer::alloc(); - Mf::Transition::Ptr transition = - Mf::Transition::alloc(mGameLayer, titleLayer, interp); - mEngine->push(transition); + Mf::Transition >::Ptr transition = + Mf::Transition >::alloc(mGameLayer, titleLayer, interp); + Mf::core.push(transition); return true; }