X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Flevel.hpp;h=208b64a247f7e2a4be696a86f5cd155cfcbdad6d;hb=17384c690dbb1a212fd92c5f2237558ab973fd29;hp=7e0aba78359cba29053be7c34bd42784ccb6ad34;hpb=244488950ba1c0daf20795213619c27e6963937c;p=supertux.git diff --git a/src/level.hpp b/src/level.hpp index 7e0aba783..208b64a24 100644 --- a/src/level.hpp +++ b/src/level.hpp @@ -23,21 +23,36 @@ #include #include + #include "statistics.hpp" -#include "sector.hpp" namespace lisp { class Lisp; } +class TileSet; +class Sector; + +/** + * Represents a collection of Sectors running in a single GameSession. + * + * Each Sector in turn contains GameObjects, e.g. Badguys and Players. + */ class Level { public: + typedef std::vector Sectors; + std::string name; std::string author; - typedef std::vector Sectors; - Sectors sectors; - Statistics stats; + std::string contact; + std::string license; + std::string filename; + std::string on_menukey_script; + Sectors sectors; + Statistics stats; + TileSet *tileset; + bool free_tileset; public: Level(); @@ -60,18 +75,12 @@ public: size_t get_sector_count(); Sector* get_sector(size_t num); + const TileSet *get_tileset() const + { return tileset; } + int get_total_coins(); int get_total_badguys(); - - /** Get total number of GameObjects of given type */ - template int get_total_count() - { - int total = 0; - for(Sectors::iterator i = sectors.begin(); i != sectors.end(); ++i) { - total += (*i)->get_total_count(); - } - return total; - } + int get_total_secrets(); private: void load_old_format(const lisp::Lisp& reader);