converted player to new object system
[supertux.git] / src / gameloop.h
index 43f8ef1..42f3385 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;
@@ -58,7 +59,12 @@ class GameSession
 
   /** If true the end_sequence will be played, user input will be
       ignored while doing that */
-  bool end_sequenze;
+  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;
@@ -67,7 +73,7 @@ class GameSession
   std::string subset;
 
  public:
-  enum ExitStatus { NONE, LEVEL_FINISHED, GAME_OVER, LEVEL_ABORT };
+  enum ExitStatus { ES_NONE, ES_LEVEL_FINISHED, ES_GAME_OVER, ES_LEVEL_ABORT };
  private:
   ExitStatus exit_status;
  public: