X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fworldmap%2Fteleporter.cpp;h=620a500cf21ca3ca61674b6a46cb8b7f4af041c4;hb=24fc5a4c6959f07a6925dd2ab1af3da7fd982007;hp=6cce11d286dbfb6e3147d765417076df503ca0af;hpb=6141e1672ec08427b989ca245508f0c1648ce68b;p=supertux.git diff --git a/src/worldmap/teleporter.cpp b/src/worldmap/teleporter.cpp index 6cce11d28..620a500cf 100644 --- a/src/worldmap/teleporter.cpp +++ b/src/worldmap/teleporter.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Teleporter Worldmap Tile // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,32 +12,37 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . #include -#include "worldmap/teleporter.hpp" -#include "sprite/sprite_manager.hpp" #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 WorldMapNS { -Teleporter::Teleporter(const lisp::Lisp* lisp) - : interactive(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.reset(sprite_manager->create(spritefile)); + if (lisp.get("sprite", spritefile)) { + sprite = sprite_manager->create(spritefile); } - - lisp->get("worldmap", worldmap); - lisp->get("spawnpoint", spawnpoint); - lisp->get("interactive", interactive); + + lisp.get("worldmap", worldmap); + lisp.get("spawnpoint", spawnpoint); + lisp.get("automatic", automatic); + lisp.get("message", message); } void @@ -53,5 +56,6 @@ Teleporter::update(float ) { } -} +} // namespace WorldMapNS +/* EOF */