X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FGameLayer.hh;h=53613617b513aa7e95ef993fe376b21ec1bf335a;hp=c4c5420888b63e5f7b7e7067fd5a9df9172f11da;hb=a295f8def17036c8071b56e181364f99a377cae7;hpb=a4debfe4a5f5d339410788971b698ba00cb7f09c diff --git a/src/GameLayer.hh b/src/GameLayer.hh index c4c5420..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,27 +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); - Mf::Sound music; + GameState mState; + Mf::Timer mThinkTimer; - HeroineP heroine; - SceneP scene; - Mf::Sound punchSound; + HudP mHud; - Mf::PolynomialInterpolator<5> interp; + Mf::SoundStream mMusic; + Mf::Sound mPunchSound; - Mf::Camera camera; + Mf::Ray<2> mRay; + Mf::Line<2> mLine; + Mf::Sphere<2> mSphere; - HudP hud; + Mf::Timer mRayTimer; + void rayTimer(); };