X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fworldmap%2Fteleporter.cpp;h=620a500cf21ca3ca61674b6a46cb8b7f4af041c4;hb=24fc5a4c6959f07a6925dd2ab1af3da7fd982007;hp=832fd6b42a23a76310c22a6bde39e0c85e11a47f;hpb=12a28b64dcce9c7ff706451b4f3aecd201cc8a5f;p=supertux.git diff --git a/src/worldmap/teleporter.cpp b/src/worldmap/teleporter.cpp index 832fd6b42..620a500cf 100644 --- a/src/worldmap/teleporter.cpp +++ b/src/worldmap/teleporter.cpp @@ -17,12 +17,13 @@ #include "sprite/sprite.hpp" #include "sprite/sprite_manager.hpp" +#include "util/reader.hpp" #include "video/drawing_context.hpp" #include "worldmap/teleporter.hpp" namespace WorldMapNS { -Teleporter::Teleporter(const lisp::Lisp* lisp) : +Teleporter::Teleporter(const Reader& lisp) : pos(), sprite(), worldmap(), @@ -30,18 +31,18 @@ Teleporter::Teleporter(const lisp::Lisp* lisp) : 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)) { + if (lisp.get("sprite", spritefile)) { sprite = sprite_manager->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