fade out console
[supertux.git] / src / badguy / willowisp.cpp
index 00f0c74..d444961 100644 (file)
@@ -20,7 +20,7 @@
 #include <config.h>
 
 #include "willowisp.hpp"
-#include "msg.hpp"
+#include "log.hpp"
 #include "game_session.hpp"
 
 static const float FLYSPEED = 64; /**< speed in px per second */
@@ -59,6 +59,19 @@ WillOWisp::write(lisp::Writer& writer)
 }
 
 void
+WillOWisp::draw(DrawingContext& context)
+{
+  sprite->draw(context, get_pos(), LAYER_OBJECTS);
+  
+  context.push_target();
+  context.set_target(DrawingContext::LIGHTMAP);
+
+  sprite->draw(context, get_pos(), LAYER_OBJECTS);
+  
+  context.pop_target();
+}
+
+void
 WillOWisp::active_update(float elapsed_time)
 {
   Player* player = get_nearest_player();
@@ -104,9 +117,9 @@ WillOWisp::activate()
   sprite->set_action("idle");
 
   delete soundSource;
-  soundSource = sound_manager->create_sound_source("sounds/rain.wav");
+  soundSource = sound_manager->create_sound_source("sounds/willowisp.wav");
   if(!soundSource) {
-    msg_warning("Couldn't start WillOWisp sound");
+    log_warning << "Couldn't start WillOWisp sound" << std::endl;
     return;
   }
   soundSource->set_position(get_pos());