Updated addon repository URL and improved debug output on download
[supertux.git] / src / worldmap / teleporter.cpp
index b4425ed..41be7b0 100644 (file)
 
 #include "sprite/sprite.hpp"
 #include "sprite/sprite_manager.hpp"
+#include "util/reader.hpp"
 #include "video/drawing_context.hpp"
 #include "worldmap/teleporter.hpp"
 
-namespace WorldMapNS {
+namespace worldmap {
 
-Teleporter::Teleporter(const lisp::Lisp* lisp)
-  : automatic(false)
+Teleporter::Teleporter(const Reader& lisp) :
+  pos(),
+  sprite(),
+  worldmap(),
+  spawnpoint(),
+  automatic(false),
+  message()
 {
-  lisp->get("x", pos.x);
-  lisp->get("y", pos.y);
+  lisp.get("x", pos.x);
+  lisp.get("y", pos.y);
 
   std::string spritefile = "";
-  if (lisp->get("sprite", spritefile)) {
-    sprite = sprite_manager->create(spritefile);
+  if (lisp.get("sprite", spritefile)) {
+    sprite = SpriteManager::current()->create(spritefile);
   }
 
-  lisp->get("worldmap", worldmap);
-  lisp->get("spawnpoint", spawnpoint);
-  lisp->get("automatic", automatic);
-  lisp->get("message", message);
+  lisp.get("worldmap", worldmap);
+  lisp.get("spawnpoint", spawnpoint);
+  lisp.get("automatic", automatic);
+  lisp.get("message", message);
 }
 
 void
@@ -50,6 +56,6 @@ Teleporter::update(float )
 {
 }
 
-}
+} // namespace worldmap
 
 /* EOF */