#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"
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");
add_factory<Spotlight>("spotlight");
add_factory<Thunderstorm>("thunderstorm");
add_factory<TileMap>("tilemap");
+ add_factory<Torch>("torch");
add_factory<Trampoline>("trampoline");
add_factory<RustyTrampoline>("rustytrampoline");
add_factory<UnstableTile>("unstable_tile");
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.";
}
}
-GameObject*
+GameObjectPtr
ObjectFactory::create(const std::string& name, const Vector& pos, const Direction dir)
{
std::stringstream lisptext;
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 */