#include <config.h>
#include "lantern.hpp"
+
#include "sprite/sprite_manager.hpp"
#include "object_factory.hpp"
#include "badguy/willowisp.hpp"
#include "badguy/treewillowisp.hpp"
+#include "audio/sound_manager.hpp"
+#include "sprite/sprite.hpp"
+#include "video/drawing_context.hpp"
Lantern::Lantern(const lisp::Lisp& reader)
: Rock(reader, "images/objects/lantern/lantern.sprite"),
{
//get color from lisp
std::vector<float> vColor;
- reader.get_vector("color", vColor);
+ reader.get("color", vColor);
lightcolor = Color(vColor);
lightsprite = sprite_manager->create("images/objects/lightmap_light/lightmap_light.sprite");
lightsprite->set_blend(Blend(GL_SRC_ALPHA, GL_ONE));
sound_manager->preload("sounds/willocatch.wav");
}
+Lantern::Lantern(const Vector& pos)
+ : Rock(pos, "images/objects/lantern/lantern.sprite"),
+ lightcolor(0.0f, 0.0f, 0.0f)
+{
+ lightsprite = sprite_manager->create("images/objects/lightmap_light/lightmap_light.sprite");
+ lightsprite->set_blend(Blend(GL_SRC_ALPHA, GL_ONE));
+ updateColor();
+ sound_manager->preload("sounds/willocatch.wav");
+}
+
Lantern::~Lantern()
{
delete lightsprite;