Switched from tinygettext/tags/tinygetext-supertux/ to tinygettext/trunk/
[supertux.git] / src / supertux / world.cpp
index d6519be..a8fda6b 100644 (file)
 
 #include "lisp/parser.hpp"
 #include "lisp/writer.hpp"
-#include "physfs/physfs_stream.hpp"
+#include "physfs/ifile_stream.hpp"
 #include "scripting/serialize.hpp"
 #include "scripting/squirrel_util.hpp"
 #include "supertux/mainloop.hpp"
 #include "supertux/player_status.hpp"
 #include "supertux/world.hpp"
 #include "util/file_system.hpp"
+#include "util/reader.hpp"
 #include "worldmap/worldmap.hpp"
 
 static bool has_suffix(const std::string& data, const std::string& suffix)
@@ -35,7 +36,16 @@ static bool has_suffix(const std::string& data, const std::string& suffix)
 
 World* World::current_ = NULL;
 
-World::World()
+World::World() :
+  levels(),
+  basedir(),
+  savegame_filename(),
+  state_table(),
+  world_thread(),
+  title(),
+  description(),
+  hide_from_contribs(),
+  is_levelset()
 {
   is_levelset = true;
   hide_from_contribs = false;
@@ -216,7 +226,7 @@ World::load_state()
 
     sq_pushstring(global_vm, "state", -1);
     sq_newtable(global_vm);
-    load_squirrel_table(global_vm, -1, state);
+    load_squirrel_table(global_vm, -1, *state);
     if(SQ_FAILED(sq_createslot(global_vm, -3)))
       throw std::runtime_error("Couldn't create state table");
     sq_pop(global_vm, 1);