]> Dogcows Code - chaz/yoink/blobdiff - src/GameLayer.hh
simplified win32 installer build script
[chaz/yoink] / src / GameLayer.hh
index c4c5420888b63e5f7b7e7067fd5a9df9172f11da..73b6a23e6a141ec2315cb9f5f2a5f34e91e90dc8 100644 (file)
 
 #include <iostream>
 #include <string>
+#include <vector>
 
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/Camera.hh>
-#include <Moof/Dispatcher.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>
+#include <Moof/Plane.hh>
+#include <Moof/Ray.hh>
+#include <Moof/Sphere.hh>
+#include <Moof/Timer.hh>
+
 #include "Character.hh"
 #include "Heroine.hh"
-#include "Hud.hh"
 #include "Scene.hh"
 
 
@@ -58,6 +64,7 @@ typedef boost::shared_ptr<GameLayer> GameLayerP;
 class GameLayer : public Mf::Layer
 {
 public:
+
        GameLayer();
 
        static GameLayerP alloc()
@@ -66,26 +73,46 @@ 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);
+
+       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;
+       };
 
 private:
 
+       void loadSceneLoader();
+       void advanceScene();
+
+       void thinkTimer();
+
        void setProjection();
        void setProjection(Mf::Scalar width, Mf::Scalar height);
 
-       Mf::Sound music;
-
-       HeroineP        heroine;
-       SceneP          scene;
-       Mf::Sound punchSound;
+       State                   mState;
+       Mf::Timer               mThinkTimer;
 
-       Mf::PolynomialInterpolator<5> interp;
+       Mf::SoundStream mMusic;
+       Mf::Sound               mPunchSound;
 
-       Mf::Camera camera;
+       Mf::Ray<2>              mRay;
+       Mf::Line<2>             mLine;
+       Mf::Sphere<2>   mSphere;
 
-       HudP hud;
+       Mf::Timer               mRayTimer;
+       void rayTimer();
 };
 
 
This page took 0.022144 seconds and 4 git commands to generate.