X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fworld.hpp;h=f59e5cca80830847662d0f777945defabc51b0ce;hb=013a5ca196545a094f27c1b708facd0084d58d55;hp=12e775951a4c705d154fb1313a93050548112c45;hpb=1486ceaaf9dd7a9d2d7e3654550b9a2768df2a56;p=supertux.git diff --git a/src/world.hpp b/src/world.hpp index 12e775951..f59e5cca8 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -1,7 +1,7 @@ -// $Id: worldmap.hpp 2800 2005-10-02 22:57:31Z matzebraun $ -// +// $Id$ +// // SuperTux -// Copyright (C) 2004 Ingo Ruhnke +// Copyright (C) 2006 Matthias Braun // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -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. @@ -21,24 +21,39 @@ #include #include +#include class World { private: std::vector 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: World(); ~World(); + void set_savegame_filename(const std::string& filename); void load(const std::string& filename); - + + 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; @@ -48,4 +63,3 @@ public: }; #endif -