18 #ifndef HEADER_SUPERTUX_SUPERTUX_SAVEGAME_HPP 19 #define HEADER_SUPERTUX_SUPERTUX_SAVEGAME_HPP 25 #include <simplesquirrel/table.hpp> 51 std::string directory;
52 std::vector<LevelState> level_states;
54 LevelState get_level_state(
const std::string& filename)
const;
55 void store_level_state(
const LevelState& state);
66 std::vector<LevelState> level_states;
72 static std::unique_ptr<Savegame> from_profile(
int profile,
const std::string& world_name,
bool base_data =
false);
73 static std::unique_ptr<Savegame> from_current_profile(
const std::string& world_name,
bool base_data =
false);
78 Profile& get_profile()
const {
return m_profile; }
79 std::string get_filename()
const;
84 std::string get_title()
const;
86 std::vector<std::string> get_levelsets();
88 void set_levelset_state(
const std::string& basedir,
89 const std::string& level_filename,
92 std::vector<std::string> get_worldmaps();
97 bool is_title_screen()
const;
100 void load(
bool base_data =
false);
101 void clear_state_table();
105 std::string m_world_name;
106 std::unique_ptr<PlayerStatus> m_player_status;
107 ssq::Table m_state_table;
This class keeps player status between different game sessions (for example when switching maps in th...
Definition: player_status.hpp:39
PlayerStatus & get_player_status() const
Returns content of (tux ...) entry.
Definition: savegame.hpp:82
Definition: savegame.hpp:30
Definition: savegame.hpp:44
Definition: savegame.hpp:69
Definition: savegame.hpp:58
Contains general data about a profile, which preserves savegames.
Definition: profile.hpp:26