New grow and skid sounds from remaxim
[supertux.git] / src / mainloop.hpp
index cb5bbed..46e119a 100644 (file)
@@ -28,16 +28,26 @@ class Console;
 class ScreenFade;
 class DrawingContext;
 
+/**
+ * Manages, updates and draws all Screens, Controllers, Menus and the Console.
+ */
 class MainLoop
 {
 public:
   MainLoop();
   ~MainLoop();
 
-  void run();
+  void run(DrawingContext &context);
   void exit_screen(ScreenFade* fade = NULL);
   void quit(ScreenFade* fade = NULL);
   void set_speed(float speed);
+  float get_speed() const;
+  bool has_no_pending_fadeout() const;
+
+  /**
+   * requests that a screenshot be taken after the next frame has been rendered
+   */
+  void take_screenshot();
 
   // push new screen on screen_stack
   void push_screen(Screen* screen, ScreenFade* fade = NULL);
@@ -64,6 +74,7 @@ private:
   std::auto_ptr<Console> console;
   std::auto_ptr<ScreenFade> screen_fade;
   std::vector<Screen*> screen_stack;
+  bool screenshot_requested; /**< true if a screenshot should be taken after the next frame has been rendered */
 };
 
 extern MainLoop* main_loop;