X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Flevel.h;h=555138ae1a7e8356f5e128b8d91b54d88439a2dd;hb=0614cf0d1891a5f3f191eecfd021efe49b6601ea;hp=e9bb6f0d34d5779b29034932f97fbbd8cb16095a;hpb=c79b901309bf5e0544fef1e92d264f51402f4370;p=supertux.git diff --git a/src/level.h b/src/level.h index e9bb6f0d3..555138ae1 100644 --- a/src/level.h +++ b/src/level.h @@ -21,54 +21,29 @@ #ifndef SUPERTUX_LEVEL_H #define SUPERTUX_LEVEL_H -#include +#include #include -#include "screen/surface.h" -#include "lispreader.h" -#include "musicref.h" - -class Tile; - -/** This type holds meta-information about a level-subset. - It could be extended to handle manipulation of subsets. */ -class LevelSubset -{ -public: - LevelSubset(); - ~LevelSubset(); - - static void create(const std::string& subset_name); - void load(const char* subset); - void save(); - - std::string get_level_filename(unsigned int i); - - std::string name; - std::string title; - std::string description; - Surface* image; - int levels; - -private: - void parse(lisp_object_t* cursor); -}; - class Sector; +namespace lisp { +class Lisp; +} + class Level { public: std::string name; std::string author; - int time_left; - typedef std::map Sectors; + int timelimit; + typedef std::vector Sectors; Sectors sectors; public: Level(); ~Level(); + // loads a levelfile void load(const std::string& filename); void save(const std::string& filename); @@ -82,8 +57,14 @@ public: Sector* get_sector(const std::string& name); + size_t get_sector_count(); + Sector* get_sector(size_t num); + + int get_total_badguys(); + int get_total_coins(); + private: - void load_old_format(LispReader& reader); + void load_old_format(const lisp::Lisp& reader); }; #endif /*SUPERTUX_LEVEL_H*/