X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FGameLayer.hh;h=53613617b513aa7e95ef993fe376b21ec1bf335a;hp=b2df7ef11f3aa3433612fc17ed0fec8b86400152;hb=a295f8def17036c8071b56e181364f99a377cae7;hpb=892da43bf5796e7c5f593a6d0f53bd797a36bd3e diff --git a/src/GameLayer.hh b/src/GameLayer.hh index b2df7ef..5361361 100644 --- a/src/GameLayer.hh +++ b/src/GameLayer.hh @@ -36,19 +36,22 @@ #include #include +#include #include -#include -#include -#include #include #include -#include #include -#include "Character.hh" +#include +#include +#include +#include +#include + #include "Hud.hh" +#include "GameState.hh" class GameLayer; @@ -57,6 +60,7 @@ typedef boost::shared_ptr GameLayerP; class GameLayer : public Mf::Layer { public: + GameLayer(); static GameLayerP alloc() @@ -64,25 +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: - Mf::Sound music; + void loadSceneLoader(); + void advanceScene(); + + void thinkTimer(); + + void setProjection(); + void setProjection(Mf::Scalar width, Mf::Scalar height); + + GameState mState; + Mf::Timer mThinkTimer; - CharacterP heroine; - Mf::Sound punchSound; + HudP mHud; - Mf::PolynomialInterpolator<5> interp; - Mf::Lerp fadeIn; + Mf::SoundStream mMusic; + Mf::Sound mPunchSound; - Mf::Camera camera; - Mf::OctreeP octree; + Mf::Ray<2> mRay; + Mf::Line<2> mLine; + Mf::Sphere<2> mSphere; - HudP hud; + Mf::Timer mRayTimer; + void rayTimer(); };