]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Engine.hh
big batch of changes
[chaz/yoink] / src / Moof / Engine.hh
index 112b87ea8dba3ea07f8d1cbefe5407003e045b4e..84b1f588f57e41c55d5a185bec8e0d40abcca198 100644 (file)
 
 #include <boost/shared_ptr.hpp>
 
-#include <Moof/Dispatcher.hh>
-#include <Moof/Event.hh>
+#include <Moof/Layer.hh>
 #include <Moof/Math.hh>
-#include <Moof/Singleton.hh>
 
 
 namespace Mf {
 
 
-// forward declaration
+// forward declarations
 class Video;
 
-class Engine : public Singleton<Engine>
+class Engine
 {
 public:
-       Engine(const std::string& name, int argc, char* argv[],
-                       const std::string& configFile);
-       virtual ~Engine();
 
-       int run();
-       void stop();
+       Engine(int argc, char* argv[], const std::string& name, 
+                       const std::string& iconFile, const std::string& configFile);
+       ~Engine() {}
+
+       // get global instance
+       static Engine& getInstance();
+
+       void run();
 
        void setTimestep(Scalar ts);
-       Scalar getTimestep();
+       Scalar getTimestep() const;
        void setMaxFrameRate(long maxFps);
-       long getMaxFrameRate();
+       long getMaxFrameRate() const;
 
-       Video& getVideo();
-       long getFrameRate();
+       Video& getVideo() const;
+       long getFrameRate() const;
 
-       // Override these if you want.
-       virtual void update(Scalar t, Scalar dt);
-       virtual void draw(Scalar alpha);
-       virtual void handleEvent(const Event& event);
+       void push(LayerP layer);
+       LayerP pop();
+       // pops a specific layer and all layers above it
+       LayerP pop(Layer* layer);
+       void clear();
 
 private:
-       class EngineImpl;
-       boost::shared_ptr<EngineImpl> impl_;
+
+       class Impl;
+       boost::shared_ptr<Impl> mImpl;
 };
 
 
This page took 0.018719 seconds and 4 git commands to generate.