Messaging subsystem rewrite, step I
[supertux.git] / src / sprite / sprite.cpp
index 1c8d0bf..189f60e 100644 (file)
@@ -56,7 +56,7 @@ Sprite::set_action(const std::string& name, int loops)
 
   SpriteData::Action* newaction = data.get_action(name);
   if(!newaction) {
-    msg_debug("Action '" << name << "' not found.");
+    msg_debug << "Action '" << name << "' not found." << std::endl;
     return;
   }
 
@@ -99,9 +99,7 @@ Sprite::draw(DrawingContext& context, const Vector& pos, int layer)
   update();
 
   if((int)frame >= get_frames() || (int)frame < 0)
-    msg_warning("frame out of range: " << (int)frame
-              << "/" << get_frames() << " at " << get_name()
-              << "/" << get_action_name());
+    msg_warning << "frame out of range: " << (int)frame << "/" << get_frames() << " at " << get_name() << "/" << get_action_name() << std::endl;
   else
     context.draw_surface(action->surfaces[(int)frame],
             pos - Vector(action->x_offset, action->y_offset),
@@ -116,9 +114,7 @@ Sprite::draw_part(DrawingContext& context, const Vector& source,
   update();
 
   if((int)frame >= get_frames() || (int)frame < 0)
-    msg_warning("frame out of range: " << (int)frame
-              << "/" << get_frames() << " at sprite: " << get_name()
-              << "/" << get_action_name());
+    msg_warning << "frame out of range: " << (int)frame << "/" << get_frames() << " at sprite: " << get_name() << "/" << get_action_name() << std::endl;
   else
     context.draw_surface_part(action->surfaces[(int)frame], source, size,
             pos - Vector(action->x_offset, action->y_offset),