From a14231f4e716f6ffb110884c802962376a4b56b2 Mon Sep 17 00:00:00 2001 From: Wolfgang Becker Date: Sun, 27 May 2007 10:37:17 +0000 Subject: [PATCH] Let treewillowisp glow. Not perfect for blue ones. SVN-Revision: 5059 --- src/badguy/treewillowisp.cpp | 13 +++++++++++++ src/badguy/treewillowisp.hpp | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/badguy/treewillowisp.cpp b/src/badguy/treewillowisp.cpp index db417a6af..e1eb02721 100644 --- a/src/badguy/treewillowisp.cpp +++ b/src/badguy/treewillowisp.cpp @@ -92,6 +92,19 @@ TreeWillOWisp::collides(GameObject& other, const CollisionHit& ) { } void +TreeWillOWisp::draw(DrawingContext& context) +{ + sprite->draw(context, get_pos(), layer); + + context.push_target(); + context.set_target(DrawingContext::LIGHTMAP); + + sprite->draw(context, get_pos(), layer); + + context.pop_target(); +} + +void TreeWillOWisp::active_update(float elapsed_time) { // remove TreeWillOWisp if it has completely vanished diff --git a/src/badguy/treewillowisp.hpp b/src/badguy/treewillowisp.hpp index 9cea6714c..c95cbc864 100644 --- a/src/badguy/treewillowisp.hpp +++ b/src/badguy/treewillowisp.hpp @@ -48,6 +48,8 @@ public: virtual bool is_freezable() const { return false; } virtual void kill_fall() { vanish(); } + virtual void draw(DrawingContext& context); + protected: virtual bool collides(GameObject& other, const CollisionHit& hit); HitResponse collision_player(Player& player, const CollisionHit& hit); -- 2.11.0