X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsupertux%2Fobject_factory.cpp;h=006060f1061ab92914ae6e95ae5300c939f3dbab;hb=0b18b4aa64ca16a646fa6aa641ecd4d13e60294f;hp=fe6cb0872e97185e06e9f5913977af9f55e9411a;hpb=729bc6717bf68314dc9fad25db3a9f728062263e;p=supertux.git diff --git a/src/supertux/object_factory.cpp b/src/supertux/object_factory.cpp index fe6cb0872..006060f10 100644 --- a/src/supertux/object_factory.cpp +++ b/src/supertux/object_factory.cpp @@ -26,6 +26,7 @@ #include "badguy/angrystone.hpp" #include "badguy/badguy.hpp" #include "badguy/bomb.hpp" +#include "badguy/skydive.hpp" #include "badguy/bouncing_snowball.hpp" #include "badguy/captainsnowball.hpp" #include "badguy/crystallo.hpp" @@ -35,24 +36,31 @@ #include "badguy/fish.hpp" #include "badguy/flame.hpp" #include "badguy/flyingsnowball.hpp" +#include "badguy/ghostflame.hpp" #include "badguy/ghosttree.hpp" +#include "badguy/goldbomb.hpp" +#include "badguy/haywire.hpp" +#include "badguy/iceflame.hpp" #include "badguy/igel.hpp" #include "badguy/jumpy.hpp" #include "badguy/kamikazesnowball.hpp" #include "badguy/kugelblitz.hpp" +#include "badguy/livefire.hpp" #include "badguy/mole.hpp" #include "badguy/mole_rock.hpp" #include "badguy/mrbomb.hpp" #include "badguy/mriceblock.hpp" -#include "badguy/mrrocket.hpp" #include "badguy/mrtree.hpp" +#include "badguy/owl.hpp" #include "badguy/plant.hpp" #include "badguy/poisonivy.hpp" #include "badguy/root.hpp" +#include "badguy/short_fuse.hpp" #include "badguy/skullyhop.hpp" #include "badguy/smartball.hpp" #include "badguy/snail.hpp" #include "badguy/snowball.hpp" +#include "badguy/snowman.hpp" #include "badguy/spidermite.hpp" #include "badguy/spiky.hpp" #include "badguy/sspiky.hpp" @@ -80,8 +88,11 @@ #include "object/bullet.hpp" #include "object/camera.hpp" #include "object/candle.hpp" +#include "object/torch.hpp" #include "object/cloud_particle_system.hpp" #include "object/coin.hpp" +#include "object/coin_explode.hpp" +#include "object/coin_rain.hpp" #include "object/comet_particle_system.hpp" #include "object/decal.hpp" #include "object/display_effect.hpp" @@ -127,6 +138,7 @@ #include "object/rain_particle_system.hpp" #include "object/rainsplash.hpp" #include "object/rock.hpp" +#include "object/rusty_trampoline.hpp" #include "object/scripted_object.hpp" #include "object/skull_tile.hpp" #include "object/smoke_cloud.hpp" @@ -181,24 +193,35 @@ ObjectFactory::init_factories() add_factory("fish"); add_factory("flame"); add_factory("flyingsnowball"); + add_factory("ghostflame"); add_factory("ghosttree"); + add_factory("goldbomb"); + add_factory("haywire"); + add_factory("iceflame"); add_factory("igel"); add_factory("jumpy"); add_factory("kamikazesnowball"); add_factory("kugelblitz"); + add_factory("livefire"); + add_factory("livefire_asleep"); + add_factory("livefire_dormant"); add_factory("mole"); add_factory("mole_rock"); add_factory("mrbomb"); add_factory("mriceblock"); - add_factory("mrrocket"); add_factory("mrtree"); + add_factory("owl"); add_factory("plant"); add_factory("poisonivy"); + add_factory("short_fuse"); add_factory("sspiky"); + add_factory("skydive"); add_factory("skullyhop"); add_factory("smartball"); + add_factory("smartblock"); add_factory("snail"); add_factory("snowball"); + add_factory("snowman"); add_factory("spidermite"); add_factory("spiky"); add_factory("stalactite"); @@ -222,6 +245,7 @@ ObjectFactory::init_factories() add_factory("explosion"); add_factory("firefly"); add_factory("gradient"); + add_factory("heavycoin"); add_factory("hurting_platform"); add_factory("icecrusher"); add_factory("infoblock"); @@ -240,7 +264,9 @@ ObjectFactory::init_factories() add_factory("spotlight"); add_factory("thunderstorm"); add_factory("tilemap"); + add_factory("torch"); add_factory("trampoline"); + add_factory("rustytrampoline"); add_factory("unstable_tile"); add_factory("weak_block"); add_factory("wind"); @@ -254,12 +280,12 @@ ObjectFactory::init_factories() add_factory("switch"); } -GameObject* +GameObjectPtr ObjectFactory::create(const std::string& name, const Reader& reader) { Factories::iterator i = factories.find(name); - if (i == factories.end()) + if (i == factories.end()) { std::stringstream msg; msg << "No factory for object '" << name << "' found."; @@ -271,7 +297,7 @@ ObjectFactory::create(const std::string& name, const Reader& reader) } } -GameObject* +GameObjectPtr ObjectFactory::create(const std::string& name, const Vector& pos, const Direction dir) { std::stringstream lisptext; @@ -282,9 +308,8 @@ ObjectFactory::create(const std::string& name, const Vector& pos, const Directio lisp::Parser parser; const lisp::Lisp* lisp = parser.parse(lisptext, "create_object"); - - GameObject* object = create(name, *(lisp->get_car())); - return object; + + return create(name, *(lisp->get_car())); } /* EOF */