- moved loadshared() to the right point
[supertux.git] / src / gameloop.h
index ee7cf35..27f6ce1 100644 (file)
@@ -36,18 +36,35 @@ class GameSession
 {
  private:
   bool quit;
-  timer_type fps_timer, frame_timer;
+  Timer fps_timer;
+  Timer frame_timer;
   World* world;
+  int st_gl_mode;
+
+  float fps_fps;
+  unsigned int last_update_time;
+  unsigned int update_time;
+  int pause_menu_frame;
+  int debug_fps;
+  bool game_pause;
+
+  // FIXME: Hack for restarting the level
+  std::string subset;
+  int levelnb;
 
  public:
+  Timer time_left;
+
   GameSession();
   GameSession(const std::string& filename);
   GameSession(const std::string& subset, int levelnb, int mode);
-  
+  ~GameSession();
+
+  /** Enter the busy loop */
   int  run();
+
   void draw();
-  int  action();
-  void process_events();
+  int  action(double frame_ratio);
 
   Level* get_level() { return world->get_level(); }
   World* get_world() { return world; }
@@ -59,14 +76,20 @@ class GameSession
  private:
   static GameSession* current_;
 
-  void levelintro();
+  void init();
+
   void start_timers();
+  void process_events();
+
+  void levelintro();
+  void drawstatus();
+  void drawendscreen();
+  void drawresultscreen(void);
 };
 
 std::string slotinfo(int slot);
 
-bool  rectcollision(base_type* one, base_type* two);
-void  drawshape(float x, float y, unsigned int c, Uint8 alpha = 255);
+bool rectcollision(base_type* one, base_type* two);
 void bumpbrick(float x, float y);
 
 #endif /*SUPERTUX_GAMELOOP_H*/