diff --git a/src/render/drect_border.c b/src/render/drect_border.c index 65ac289..88adbe4 100644 --- a/src/render/drect_border.c +++ b/src/render/drect_border.c @@ -8,12 +8,7 @@ void drect_border(int x1, int y1, int x2, int y2, int fill, int width, if(x1 > x2) swap(x1, x2); if(y1 > y2) swap(y1, y2); - /* Order and bounds */ - if(x1 >= 396 || x2 < 0 || y1 >= 224 || y2 < 0) return; - if(x1 < 0) x1 = 0; - if(x2 >= 396) x2 = 395; - if(y1 < 0) y1 = 0; - if(y2 >= 224) y2 = 223; + if(x1 >= DWIDTH || x2 < 0 || y1 >= DHEIGHT || y2 < 0) return; drect(x1, y1, x2, y1 + (width-1), border); drect(x1, y2 - (width-1), x2, y2, border);