fix cr/lfs and remove trailing whitespaces...
[supertux.git] / src / world.hpp
index 60ec26b..f59e5cc 100644 (file)
@@ -1,5 +1,5 @@
 //  $Id$
-// 
+//
 //  SuperTux
 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
@@ -12,7 +12,7 @@
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -31,6 +31,8 @@ private:
   std::string savegame_filename;
   /// squirrel table that saves persistent state (about the world)
   HSQOBJECT state_table;
+  HSQOBJECT world_thread;
+  static World* current_;
 
 public:
   World();
@@ -39,14 +41,19 @@ public:
   void set_savegame_filename(const std::string& filename);
   void load(const std::string& filename);
 
-  void save();
-  void load();
-  
+  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_basedir() const;
 
+  static World* current()
+  {
+    return current_;
+  }
+
   void run();
 
   std::string title;
@@ -56,4 +63,3 @@ public:
 };
 
 #endif
-