X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FGameLayer.hh;h=4e26e689b495a12a39289041ac7fe992b5e085a7;hp=b2df7ef11f3aa3433612fc17ed0fec8b86400152;hb=c9e20ac06383b20ceb5404c9237e319c2e90d157;hpb=892da43bf5796e7c5f593a6d0f53bd797a36bd3e diff --git a/src/GameLayer.hh b/src/GameLayer.hh index b2df7ef..4e26e68 100644 --- a/src/GameLayer.hh +++ b/src/GameLayer.hh @@ -36,6 +36,7 @@ #include #include +#include #include @@ -44,11 +45,13 @@ #include #include #include -#include +#include #include #include "Character.hh" +#include "Heroine.hh" #include "Hud.hh" +#include "Scene.hh" class GameLayer; @@ -65,24 +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: - Mf::Sound music; + void loadSceneLoader(); + void advanceScene(); + + Mf::Scalar getZCoord(const Mf::Vector2& position) const; + + void setProjection(); + void setProjection(Mf::Scalar width, Mf::Scalar height); + + + // 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; - CharacterP heroine; - Mf::Sound punchSound; + HeroineP mHeroine; + SceneP mScene; - Mf::PolynomialInterpolator<5> interp; - Mf::Lerp fadeIn; + Mf::PolynomialInterpolator<5> mInterp; - Mf::Camera camera; - Mf::OctreeP octree; + Mf::Camera mCamera; - HudP hud; + HudP mHud; };