X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FGameLayer.hh;h=53613617b513aa7e95ef993fe376b21ec1bf335a;hp=4e26e689b495a12a39289041ac7fe992b5e085a7;hb=a295f8def17036c8071b56e181364f99a377cae7;hpb=8a1acac01b444dccf8b57cedf08392ada2e473c1 diff --git a/src/GameLayer.hh b/src/GameLayer.hh index 4e26e68..5361361 100644 --- a/src/GameLayer.hh +++ b/src/GameLayer.hh @@ -40,18 +40,18 @@ #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; @@ -60,6 +60,7 @@ typedef boost::shared_ptr GameLayerP; class GameLayer : public Mf::Layer { public: + GameLayer(); static GameLayerP alloc() @@ -67,7 +68,7 @@ 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; @@ -78,28 +79,25 @@ private: void loadSceneLoader(); void advanceScene(); - Mf::Scalar getZCoord(const Mf::Vector2& position) const; + void thinkTimer(); void setProjection(); void setProjection(Mf::Scalar width, Mf::Scalar height); + GameState mState; + Mf::Timer mThinkTimer; - // the script object must be mutable because some script functions must be - // called during draw - mutable Mf::Script mScript; - std::vector mSceneList; + HudP mHud; - Mf::Sound mMusic; + Mf::SoundStream mMusic; Mf::Sound mPunchSound; - HeroineP mHeroine; - SceneP mScene; + Mf::Ray<2> mRay; + Mf::Line<2> mLine; + Mf::Sphere<2> mSphere; - Mf::PolynomialInterpolator<5> mInterp; - - Mf::Camera mCamera; - - HudP mHud; + Mf::Timer mRayTimer; + void rayTimer(); };