* Finish work on Path through the Clouds
[supertux.git] / src / worldmap / level.cpp
index 3f32496..59984ff 100644 (file)
@@ -32,10 +32,13 @@ namespace WorldMapNS
 {
 
 LevelTile::LevelTile(const std::string& basedir, const lisp::Lisp* lisp)
-  : GameObject(*lisp), solved(false), auto_path(true), basedir(basedir), picture_cached(false), picture(0)
+  : solved(false), auto_play(false), basedir(basedir), picture_cached(false),
+    picture(0)
 {
+  lisp->get("name", name);
   lisp->get("x", pos.x);
   lisp->get("y", pos.y);
+  lisp->get("auto-play", auto_play);
 
   std::string spritefile = "images/worldmap/common/leveldot.sprite";
   lisp->get("sprite", spritefile);
@@ -74,7 +77,7 @@ LevelTile::get_picture()
   picture_cached = true;
   std::string fname = FileSystem::strip_extension(basedir + name)+".jpg";
   if (!PHYSFS_exists(fname.c_str())) {
-       return 0;
+    return 0;
   }
   picture = new Surface(fname);
   return picture;