Changed DrawingContext::draw_surface_part() to handle srcrect/dstrect, instead of...
[supertux.git] / src / sprite / sprite.cpp
index 11c819f..41c732f 100644 (file)
@@ -152,8 +152,10 @@ Sprite::draw_part(DrawingContext& context, const Vector& source,
   assert(action != 0);
   update();
 
-  context.draw_surface_part(action->surfaces[frameidx], source, size,
-                            pos - Vector(action->x_offset, action->y_offset),
+  context.draw_surface_part(action->surfaces[frameidx],
+                            Rectf(source, Sizef(size)),
+                            Rectf(pos - Vector(action->x_offset, action->y_offset),
+                                  action->surfaces[frameidx]->get_size()),
                             layer + action->z_order);
 }