*******************************************************************************/
-#ifndef _ENGINE_HH_
-#define _ENGINE_HH_
+#ifndef _MOOF_ENGINE_HH_
+#define _MOOF_ENGINE_HH_
#include <boost/shared_ptr.hpp>
-#include "singleton.hh"
-#include "event.hh"
-#include "dispatcher.hh"
+#include <Moof/Dispatcher.hh>
+#include <Moof/Event.hh>
+#include <Moof/Math.hh>
+#include <Moof/Singleton.hh>
-namespace dc {
+namespace Mf {
-class video;
+// forward declaration
+class Video;
-class engine : public singleton<engine>
+class Engine : public Singleton<Engine>
{
public:
- engine(const std::string& name, int argc, char* argv[],
+ Engine(const std::string& name, int argc, char* argv[],
const std::string& configFile);
- virtual ~engine();
+ virtual ~Engine();
int run();
void stop();
- void setTimestep(scalar ts);
- scalar getTimestep();
- void setMaxFPS(long maxfps);
- long getMaxFPS();
+ void setTimestep(Scalar ts);
+ Scalar getTimestep();
+ void setMaxFrameRate(long maxFps);
+ long getMaxFrameRate();
- video& getVideo();
- long getFPS();
+ Video& getVideo();
+ long getFrameRate();
// Override these if you want.
- virtual void update(scalar t, scalar dt);
- virtual void draw(scalar alpha);
- virtual void handleEvent(const event& e);
+ virtual void update(Scalar t, Scalar dt);
+ virtual void draw(Scalar alpha);
+ virtual void handleEvent(const Event& event);
private:
- class engine_impl;
- boost::shared_ptr<engine_impl> impl;
+ class EngineImpl;
+ boost::shared_ptr<EngineImpl> impl_;
};
-} // namespace dc
+} // namespace Mf
-#endif // _ENGINE_HH_
+#endif // _MOOF_ENGINE_HH_
/** vim: set ts=4 sw=4 tw=80: *************************************************/