changed an error message to a more friendly one
[supertux.git] / src / game_session.h
index 3357fd1..59023b3 100644 (file)
@@ -59,7 +59,6 @@ public:
 
 public:
   DrawingContext* context;
-  Timer time_left;
 
   GameSession(const std::string& levelfile, GameSessionMode mode,
               Statistics* statistics=0);
@@ -71,14 +70,14 @@ public:
   void record_demo(const std::string& filename);
   void play_demo(const std::string& filename);
   void draw();
-  void action(float frame_ratio);
+  void update(float frame_ratio);
 
   void set_current()
   { current_ = this; }
   static GameSession* current() { return current_; }
 
-  /// ends the level as finished
-  void finish();
+  /// ends the current level
+  void finish(bool win = true);
   void respawn(const std::string& sectorname,
       const std::string& spawnpointname);
   void set_reset_point(const std::string& sectorname,
@@ -90,12 +89,17 @@ public:
   void start_sequence(const std::string& sequencename);
   /// called by JoystickKeyboardController after an ascii key has been pressed
   void try_cheats();
+
+  /** returns the "working directory" usually this is the directory where the
+   * currently played level resides. This is used when locating additional
+   * resources for the current level/world
+   */
+  std::string get_working_directory();
   
 private:
   void restart_level();
 
   void check_end_conditions();
-  void start_timers();
   void process_events();
   void capture_demo_step();