]> Dogcows Code - chaz/yoink/blobdiff - src/GameLayer.hh
dispatch class not a singleton, engine is static
[chaz/yoink] / src / GameLayer.hh
index 73b6a23e6a141ec2315cb9f5f2a5f34e91e90dc8..53613617b513aa7e95ef993fe376b21ec1bf335a 100644 (file)
 
 #include <boost/shared_ptr.hpp>
 
-#include <Moof/Camera.hh>
-#include <Moof/Interpolator.hh>
 #include <Moof/Layer.hh>
 #include <Moof/Math.hh>
-#include <Moof/Script.hh>
 #include <Moof/Sound.hh>
 
 #include <Moof/Line.hh>
@@ -53,9 +50,8 @@
 #include <Moof/Sphere.hh>
 #include <Moof/Timer.hh>
 
-#include "Character.hh"
-#include "Heroine.hh"
-#include "Scene.hh"
+#include "Hud.hh"
+#include "GameState.hh"
 
 
 class GameLayer;
@@ -72,24 +68,11 @@ public:
                return GameLayerP(new GameLayer);
        }
 
-       void pushed(Mf::Engine& engine);
+       void pushedOntoEngine();
 
-       void update(Mf::Engine& engine, Mf::Scalar t, Mf::Scalar dt);
-       void draw(Mf::Engine& engine, Mf::Scalar alpha) const;
-       bool handleEvent(Mf::Engine& engine, const Mf::Event& event);
-
-       struct State
-       {
-               Mf::Script                                      script;
-               std::vector<std::string>        sceneList;
-
-               HeroineP                heroine;
-               SceneP                  scene;
-
-               Mf::PolynomialInterpolator<5> interp;
-
-               Mf::Camera              camera;
-       };
+       void update(Mf::Scalar t, Mf::Scalar dt);
+       void draw(Mf::Scalar alpha) const;
+       bool handleEvent(const Mf::Event& event);
 
 private:
 
@@ -101,9 +84,11 @@ private:
        void setProjection();
        void setProjection(Mf::Scalar width, Mf::Scalar height);
 
-       State                   mState;
+       GameState               mState;
        Mf::Timer               mThinkTimer;
 
+       HudP                    mHud;
+
        Mf::SoundStream mMusic;
        Mf::Sound               mPunchSound;
 
This page took 0.02266 seconds and 4 git commands to generate.