#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 "Character.hh"
#include "Heroine.hh"
-#include "Hud.hh"
#include "Scene.hh"
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
+ {
+ // the script object must be mutable because some script functions must be
+ // called during draw
+ mutable Mf::Script script;
+ std::vector<std::string> sceneList;
+
+ HeroineP heroine;
+ SceneP scene;
+
+ Mf::PolynomialInterpolator<5> interp;
+
+ Mf::Camera camera;
+ };
private:
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<std::string> mSceneList;
-
- Mf::Sound mMusic;
- Mf::Sound mPunchSound;
-
- HeroineP mHeroine;
- SceneP mScene;
-
- Mf::PolynomialInterpolator<5> mInterp;
-
- Mf::Camera mCamera;
-
- HudP mHud;
+ State mState;
+ Mf::Sound mMusic;
+ Mf::Sound mPunchSound;
};