Added Kirby badguy
[supertux.git] / src / supertux / object_factory.cpp
index 99c37e1..2250822 100644 (file)
@@ -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"
 #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/kirby.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/mrtree.hpp"
+#include "badguy/owl.hpp"
 #include "badguy/plant.hpp"
 #include "badguy/poisonivy.hpp"
 #include "badguy/root.hpp"
@@ -84,6 +91,8 @@
 #include "object/candle.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"
 #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"
@@ -183,23 +193,33 @@ ObjectFactory::init_factories()
   add_factory<Fish>("fish");
   add_factory<Flame>("flame");
   add_factory<FlyingSnowBall>("flyingsnowball");
+  add_factory<Ghostflame>("ghostflame");
   add_factory<GhostTree>("ghosttree");
+  add_factory<GoldBomb>("goldbomb");
   add_factory<Haywire>("haywire");
+  add_factory<Iceflame>("iceflame");
   add_factory<Igel>("igel");
   add_factory<Jumpy>("jumpy");
   add_factory<KamikazeSnowball>("kamikazesnowball");
+  add_factory<Kirby>("kirby");
   add_factory<Kugelblitz>("kugelblitz");
+  add_factory<LiveFire>("livefire");
+  add_factory<LiveFireAsleep>("livefire_asleep");
+  add_factory<LiveFireDormant>("livefire_dormant");
   add_factory<Mole>("mole");
   add_factory<MoleRock>("mole_rock");
   add_factory<MrBomb>("mrbomb");
   add_factory<MrIceBlock>("mriceblock");
   add_factory<MrTree>("mrtree");
+  add_factory<Owl>("owl");
   add_factory<Plant>("plant");
   add_factory<PoisonIvy>("poisonivy");
   add_factory<ShortFuse>("short_fuse");
   add_factory<SSpiky>("sspiky");
+  add_factory<SkyDive>("skydive");
   add_factory<SkullyHop>("skullyhop");
   add_factory<SmartBall>("smartball");
+  add_factory<SmartBlock>("smartblock");
   add_factory<Snail>("snail");
   add_factory<SnowBall>("snowball");
   add_factory<Snowman>("snowman");
@@ -226,6 +246,7 @@ ObjectFactory::init_factories()
   add_factory<Explosion>("explosion");
   add_factory<Firefly>("firefly");
   add_factory<Gradient>("gradient");
+  add_factory<HeavyCoin>("heavycoin");
   add_factory<HurtingPlatform>("hurting_platform");
   add_factory<IceCrusher>("icecrusher");
   add_factory<InfoBlock>("infoblock");
@@ -245,6 +266,7 @@ ObjectFactory::init_factories()
   add_factory<Thunderstorm>("thunderstorm");
   add_factory<TileMap>("tilemap");
   add_factory<Trampoline>("trampoline");
+  add_factory<RustyTrampoline>("rustytrampoline");
   add_factory<UnstableTile>("unstable_tile");
   add_factory<WeakBlock>("weak_block");
   add_factory<Wind>("wind");
@@ -258,12 +280,12 @@ ObjectFactory::init_factories()
   add_factory<Switch>("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.";
@@ -275,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;
@@ -286,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 */