* Add Airship (regular above-ground theme) and Battle (castle/boss theme) music court...
[supertux.git] / src / object / lantern.cpp
index 531ad95..b041fb8 100644 (file)
 #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"),
@@ -31,7 +35,7 @@ Lantern::Lantern(const lisp::Lisp& reader)
 {
   //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));
@@ -39,6 +43,16 @@ Lantern::Lantern(const lisp::Lisp& reader)
   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;