Removed pointless check for screen mode change, as we are creating the window for...
[supertux.git] / src / supertux / world.hpp
index cffc0a4..596ec2c 100644 (file)
 #include <string>
 #include <vector>
 
+class PlayerStatus;
+
 class World
 {
+public:
+  static World* current()
+  {
+    return current_;
+  }
+
 private:
-  std::vector<std::string> levels;
-  std::string basedir;
-  std::string savegame_filename;
-  /// squirrel table that saves persistent state (about the world)
-  HSQOBJECT state_table;
-  HSQOBJECT world_thread;
   static World* current_;
 
 public:
@@ -42,20 +44,29 @@ 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();
 
+private:
+  std::vector<std::string> levels;
+  std::string basedir;
+  std::string savegame_filename;
+  /// squirrel table that saves persistent state (about the world)
+  HSQOBJECT state_table;
+  HSQOBJECT world_thread;
   std::string title;
   std::string description;
+  std::auto_ptr<PlayerStatus> player_status;
+
+public:
   bool hide_from_contribs;
   bool is_levelset;
 };