X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsupertux%2Fworld.cpp;h=a8fda6ba7c4adf50f4503cddc084cea10ad4c7c8;hb=78ac7aef674f518549f96160c6354b589553f952;hp=d6519beba2762a86aaf1df40d5713983dd2da6cb;hpb=08813a74da6ac1fd045a105e4e8105f1d7f716f0;p=supertux.git diff --git a/src/supertux/world.cpp b/src/supertux/world.cpp index d6519beba..a8fda6ba7 100644 --- a/src/supertux/world.cpp +++ b/src/supertux/world.cpp @@ -16,13 +16,14 @@ #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);