- fix tux not advancing on worldmap after solving a level
[supertux.git] / src / worldmap / level.hpp
index ce59cd2..67945e3 100644 (file)
@@ -25,6 +25,7 @@
 #include "math/vector.hpp"
 #include "game_object.hpp"
 #include "statistics.hpp"
+#include "video/surface.hpp"
 
 class Sprite;
 
@@ -39,11 +40,11 @@ public:
 
   virtual void draw(DrawingContext& context);
   virtual void update(float elapsed_time);
-  
+
   Vector pos;
-  std::string name;
   std::string title;
   bool solved;
+  bool auto_play; /**< true if Tux should automatically enter this level if it's unfinished */
 
   std::auto_ptr<Sprite> sprite;
 
@@ -53,11 +54,16 @@ public:
   /** Script that is run when the level is successfully finished */
   std::string extro_script;
 
-  /** If false, disables the auto walking after finishing a level */
-  bool auto_path;
+  /** return Surface of level picture or 0 if no picture is available */
+  const Surface* get_picture();
+
+private:
+  std::string basedir;
+  bool picture_cached;
+  Surface* picture;
+
 };
 
 }
 
 #endif
-