X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fworldmap%2Fsprite_change.cpp;h=69525590ef6f1f36e20dc306491d2f15c028a3f3;hb=8c2c897b61746b63d0c31815fa33cd016dc0e7ba;hp=18c10cf4122aa82ea2b6b1e0fc93103fc59701d0;hpb=12a28b64dcce9c7ff706451b4f3aecd201cc8a5f;p=supertux.git diff --git a/src/worldmap/sprite_change.cpp b/src/worldmap/sprite_change.cpp index 18c10cf41..69525590e 100644 --- a/src/worldmap/sprite_change.cpp +++ b/src/worldmap/sprite_change.cpp @@ -17,31 +17,32 @@ #include "sprite/sprite.hpp" #include "sprite/sprite_manager.hpp" +#include "util/reader.hpp" #include "video/drawing_context.hpp" #include "worldmap/sprite_change.hpp" -namespace WorldMapNS { +namespace worldmap { -SpriteChange::SpriteChange(const lisp::Lisp* lisp) : +SpriteChange::SpriteChange(const Reader& lisp) : pos(), - change_on_touch(false), + change_on_touch(false), sprite(), stay_action(), stay_group(), in_stay_action(false) { - lisp->get("x", pos.x); - lisp->get("y", pos.y); - lisp->get("change-on-touch", change_on_touch); + lisp.get("x", pos.x); + lisp.get("y", pos.y); + lisp.get("change-on-touch", change_on_touch); std::string spritefile = ""; - lisp->get("sprite", spritefile); - sprite = sprite_manager->create(spritefile); + lisp.get("sprite", spritefile); + sprite = SpriteManager::current()->create(spritefile); - lisp->get("stay-action", stay_action); - lisp->get("initial-stay-action", in_stay_action); + lisp.get("stay-action", stay_action); + lisp.get("initial-stay-action", in_stay_action); - lisp->get("stay-group", stay_group); + lisp.get("stay-group", stay_group); all_sprite_changes.push_back(this); }