X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEngine.hh;fp=src%2Fengine.hh;h=112b87ea8dba3ea07f8d1cbefe5407003e045b4e;hp=98141cb384e079a4180a98d173f6dd4753e6d58b;hb=c2321281bf12a7efaedde930422c7ddbc92080d4;hpb=87bc17e55b0c1dc73ecc66df856d3f08fd7a7724 diff --git a/src/engine.hh b/src/Moof/Engine.hh similarity index 71% rename from src/engine.hh rename to src/Moof/Engine.hh index 98141cb..112b87e 100644 --- a/src/engine.hh +++ b/src/Moof/Engine.hh @@ -26,53 +26,55 @@ *******************************************************************************/ -#ifndef _ENGINE_HH_ -#define _ENGINE_HH_ +#ifndef _MOOF_ENGINE_HH_ +#define _MOOF_ENGINE_HH_ #include -#include "singleton.hh" -#include "event.hh" -#include "dispatcher.hh" +#include +#include +#include +#include -namespace dc { +namespace Mf { -class video; +// forward declaration +class Video; -class engine : public singleton +class Engine : public Singleton { 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 impl; + class EngineImpl; + boost::shared_ptr impl_; }; -} // namespace dc +} // namespace Mf -#endif // _ENGINE_HH_ +#endif // _MOOF_ENGINE_HH_ /** vim: set ts=4 sw=4 tw=80: *************************************************/