X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FGameLayer.hh;h=53613617b513aa7e95ef993fe376b21ec1bf335a;hp=a1b5d6d87f3a5dbf38922de6487d3981e5f76f1c;hb=a295f8def17036c8071b56e181364f99a377cae7;hpb=a31d65a998121df0651c57bfb68782e2a07d2e2f diff --git a/src/GameLayer.hh b/src/GameLayer.hh index a1b5d6d..5361361 100644 --- a/src/GameLayer.hh +++ b/src/GameLayer.hh @@ -36,20 +36,22 @@ #include #include +#include #include -#include -#include -#include #include #include #include -#include "Character.hh" -#include "Heroine.hh" +#include +#include +#include +#include +#include + #include "Hud.hh" -#include "Scene.hh" +#include "GameState.hh" class GameLayer; @@ -58,6 +60,7 @@ typedef boost::shared_ptr GameLayerP; class GameLayer : public Mf::Layer { public: + GameLayer(); static GameLayerP alloc() @@ -65,28 +68,36 @@ public: return GameLayerP(new GameLayer); } - void pushed(Mf::Engine& engine); + void pushedOntoEngine(); + void update(Mf::Scalar t, Mf::Scalar dt); void draw(Mf::Scalar alpha) const; bool handleEvent(const Mf::Event& event); private: + void loadSceneLoader(); + void advanceScene(); + + void thinkTimer(); + void setProjection(); void setProjection(Mf::Scalar width, Mf::Scalar height); + GameState mState; + Mf::Timer mThinkTimer; - Mf::Sound mMusic; + HudP mHud; - HeroineP mHeroine; - SceneP mScene; + Mf::SoundStream mMusic; Mf::Sound mPunchSound; - Mf::PolynomialInterpolator<5> mInterp; + Mf::Ray<2> mRay; + Mf::Line<2> mLine; + Mf::Sphere<2> mSphere; - Mf::Camera mCamera; - - HudP mHud; + Mf::Timer mRayTimer; + void rayTimer(); };