X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FGameLayer.hh;h=4e26e689b495a12a39289041ac7fe992b5e085a7;hp=c4c5420888b63e5f7b7e7067fd5a9df9172f11da;hb=2fdb5f5824826a6c54f5afde8c62eafd24c1a152;hpb=a4debfe4a5f5d339410788971b698ba00cb7f09c diff --git a/src/GameLayer.hh b/src/GameLayer.hh index c4c5420..4e26e68 100644 --- a/src/GameLayer.hh +++ b/src/GameLayer.hh @@ -36,6 +36,7 @@ #include #include +#include #include @@ -44,6 +45,7 @@ #include #include #include +#include #include #include "Character.hh" @@ -66,26 +68,38 @@ public: } void pushed(Mf::Engine& engine); + 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(); + + Mf::Scalar getZCoord(const Mf::Vector2& position) const; + void setProjection(); void setProjection(Mf::Scalar width, Mf::Scalar height); - Mf::Sound music; - HeroineP heroine; - SceneP scene; - Mf::Sound punchSound; + // the script object must be mutable because some script functions must be + // called during draw + mutable Mf::Script mScript; + std::vector mSceneList; + + Mf::Sound mMusic; + Mf::Sound mPunchSound; + + HeroineP mHeroine; + SceneP mScene; - Mf::PolynomialInterpolator<5> interp; + Mf::PolynomialInterpolator<5> mInterp; - Mf::Camera camera; + Mf::Camera mCamera; - HudP hud; + HudP mHud; };