17 #ifndef HEADER_SUPERTUX_SUPERTUX_LEVEL_HPP 18 #define HEADER_SUPERTUX_SUPERTUX_LEVEL_HPP 20 #include "supertux/statistics.hpp" 34 static Level* current() {
return s_current; }
37 static Level* s_current;
40 Level(
bool m_is_worldmap);
44 void save(
const std::string& filename,
bool retry =
false);
45 void save(std::ostream& stream);
47 void add_sector(std::unique_ptr<Sector> sector);
48 const std::string& get_name()
const {
return m_name; }
49 const std::string& get_author()
const {
return m_author; }
51 Sector* get_sector(
const std::string& name)
const;
53 size_t get_sector_count()
const;
54 Sector* get_sector(
size_t num)
const;
56 std::string get_tileset()
const {
return m_tileset; }
58 int get_total_coins()
const;
59 int get_total_badguys()
const;
60 int get_total_secrets()
const;
64 bool is_worldmap()
const {
return m_is_worldmap; }
74 std::string m_contact;
75 std::string m_license;
76 std::string m_filename;
77 std::vector<std::unique_ptr<Sector> > m_sectors;
80 std::string m_tileset;
Definition: level_parser.hpp:27
Definition: writer.hpp:27
This class is a layer between level and worldmap to keep track of stuff like scores, and minor, but funny things, like number of jumps and stuff.
Definition: statistics.hpp:32
Represents one of (potentially) multiple, separate parts of a Level.
Definition: sector.hpp:49
Represents a collection of Sectors running in a single GameSession.
Definition: level.hpp:29
Definition: reader_mapping.hpp:31