Implemented mirror actions correctly. Bugfix: right direction of bad guys now working.
[supertux.git] / src / gameobjs.cpp
index b440b5c..5340bfb 100644 (file)
@@ -114,7 +114,7 @@ BouncyBrick::draw(DrawingContext& context)
     draw_tile(context, shape.id, position + Vector(0, offset), LAYER_TILES+1);
 }
 
-FloatingText::FloatingText(const Vector& pos, std::string& text_)
+FloatingText::FloatingText(const Vector& pos, const std::string& text_)
   : position(pos), text(text_)
 {
   timer.start(1000);
@@ -155,7 +155,12 @@ FloatingText::draw(DrawingContext& context)
   else
     alpha = 255;
 
-  context.draw_text(gold_text, text, position, LEFT_ALLIGN, LAYER_OBJECTS, NONE_EFFECT, alpha);
+  context.push_transform();
+  context.set_alpha(alpha);
+
+  context.draw_text(gold_text, text, position, LEFT_ALLIGN, LAYER_OBJECTS+1);
+
+  context.pop_transform();
 }
 
 /* Trampoline */