Prevent "Return to Level Editor" from working, if no levelsubset is loaded. This...
[supertux.git] / src / gameloop.h
index 43a5df8..6c95140 100644 (file)
@@ -47,6 +47,7 @@ class GameSession
  private:
   Timer fps_timer;
   Timer frame_timer;
+  Timer endsequence_timer;
   World* world;
   int st_gl_mode;
   int levelnb;
@@ -55,6 +56,17 @@ class GameSession
   unsigned int update_time;
   int pause_menu_frame;
   int debug_fps;
+
+  /** If true the end_sequence will be played, user input will be
+      ignored while doing that */
+  enum EndSequenceState {
+    NO_ENDSEQUENCE,
+    ENDSEQUENCE_RUNNING, // tux is running right
+    ENDSEQUENCE_WAITING  // waiting for the end of the music
+  };
+  EndSequenceState end_sequence;
+  float last_x_pos;
+
   bool game_pause;
 
   // FIXME: Hack for restarting the level
@@ -97,6 +109,7 @@ class GameSession
 
  private:
   void on_escape_press();
+  void process_menu();
 };
 
 std::string slotinfo(int slot);