make gradient parsing a bit more robust
[supertux.git] / src / level.h
index 17272ba..555138a 100644 (file)
 #ifndef SUPERTUX_LEVEL_H
 #define SUPERTUX_LEVEL_H
 
-#include <map>
+#include <vector>
 #include <string>
-#include "screen/texture.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<std::string, Sector*> Sectors;
+  int timelimit;
+  typedef std::vector<Sector*> Sectors;
   Sectors sectors;
 
 public:
   Level();
   ~Level();
 
+  // loads a levelfile
   void load(const std::string& filename);
   void save(const std::string& filename);
 
@@ -81,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*/