Removed a few things from svn:ignore that are no longer needed to to switch to Cmake
[supertux.git] / src / video / drawing_context.cpp
index 7ca3e26..62c6ee3 100644 (file)
@@ -219,6 +219,7 @@ DrawingContext::draw_filled_rect(const Vector& topleft, const Vector& size,
   fillrectrequest->size = size;
   fillrectrequest->color = color;
   fillrectrequest->color.alpha = color.alpha * transform.alpha;
+  fillrectrequest->radius = 0.0f;
   request->request_data = fillrectrequest;
 
   requests->push_back(request);
@@ -228,12 +229,18 @@ void
 DrawingContext::draw_filled_rect(const Rect& rect, const Color& color,
                                  int layer)
 {
+  draw_filled_rect(rect, color, 0.0f, layer);
+}
+
+void
+DrawingContext::draw_filled_rect(const Rect& rect, const Color& color, float radius, int layer)
+{
   DrawingRequest* request = new(obst) DrawingRequest();
 
   request->target = target;
-  request->type = FILLRECT;
-  request->pos = transform.apply(rect.p1);
-  request->layer = layer;
+  request->type   = FILLRECT;
+  request->pos    = transform.apply(rect.p1);
+  request->layer  = layer;
 
   request->drawing_effect = transform.drawing_effect;
   request->alpha = transform.alpha;
@@ -242,9 +249,10 @@ DrawingContext::draw_filled_rect(const Rect& rect, const Color& color,
   fillrectrequest->size = Vector(rect.get_width(), rect.get_height());
   fillrectrequest->color = color;
   fillrectrequest->color.alpha = color.alpha * transform.alpha;
+  fillrectrequest->radius = radius;
   request->request_data = fillrectrequest;
 
-  requests->push_back(request);
+  requests->push_back(request); 
 }
 
 void
@@ -295,8 +303,10 @@ DrawingContext::do_drawing()
     handle_drawing_requests(lightmap_requests);
     lightmap->end_draw();
   }
+  lightmap_requests.clear();
 
   handle_drawing_requests(drawing_requests);
+  drawing_requests.clear();
   if(use_lightmap) {
     lightmap->do_draw();
   }
@@ -388,7 +398,6 @@ DrawingContext::handle_drawing_requests(DrawingRequests& requests)
         break;
     }
   }
-  requests.clear();
 }
 
 void