Replaced std::auto_ptr<> with std::unique_ptr<>
[supertux.git] / src / supertux / world.hpp
index 9ea04c4..d0dbc59 100644 (file)
 #include <string>
 #include <vector>
 
+class PlayerStatus;
+
 class World
 {
 public:
+  static World* current()
+  {
+    return current_;
+  }
+
+private:
+  static World* current_;
+
+public:
   World();
   ~World();
 
@@ -33,15 +44,14 @@ public:
   void save_state();
   void load_state();
 
-  const std::string& get_level_filename(unsigned int i) const;
   unsigned int get_num_levels() const;
 
+  const std::string& get_level_filename(unsigned int i) const;
   const std::string& get_basedir() const;
+  const std::string& get_title() const;
+  /** returns player status */
+  PlayerStatus* get_player_status() const { return player_status.get(); }
 
-  static World* current()
-  {
-    return current_;
-  }
 
   void run();
 
@@ -52,11 +62,9 @@ private:
   /// squirrel table that saves persistent state (about the world)
   HSQOBJECT state_table;
   HSQOBJECT world_thread;
-  static World* current_;
-
-public:
   std::string title;
   std::string description;
+  std::unique_ptr<PlayerStatus> player_status;
 
 public:
   bool hide_from_contribs;