X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flevel.hpp;h=208b64a247f7e2a4be696a86f5cd155cfcbdad6d;hb=b029182b66e1f36e8eb7a1d8d23d26d475dec45f;hp=eb3ba5ce3db30a73d3ee25e7a9bd5e2b78dd472b;hpb=8b67b0dc71efddc4b668bde525ba94d701f622ac;p=supertux.git diff --git a/src/level.hpp b/src/level.hpp index eb3ba5ce3..208b64a24 100644 --- a/src/level.hpp +++ b/src/level.hpp @@ -23,13 +23,16 @@ #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. * @@ -38,14 +41,18 @@ class Lisp; class Level { public: + typedef std::vector Sectors; + std::string name; std::string author; std::string contact; std::string license; + std::string filename; std::string on_menukey_script; - typedef std::vector Sectors; - Sectors sectors; - Statistics stats; + Sectors sectors; + Statistics stats; + TileSet *tileset; + bool free_tileset; public: Level(); @@ -68,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);