From 90aa771b30f6ec501a9506d4ccf330ef9de39e65 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 27 Mar 2020 23:20:55 +0100 Subject: Cleanup: compiler warnings --- source/blender/editors/gpencil/annotate_paint.c | 3 +-- source/blender/editors/gpencil/drawgpencil.c | 31 ------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) (limited to 'source/blender/editors/gpencil') diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 8d3770d3971..53ada341cc9 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -816,7 +816,6 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, bGPDframe *gpf, bGPDstroke *gps, const float mval[2], - const float mvalo[2], const int radius, const rcti *rect) { @@ -938,7 +937,7 @@ static void gp_stroke_doeraser(tGPsdata *p) * (e.g. 2D space strokes in the 3D view, if the same datablock is shared) */ if (ED_gpencil_stroke_can_use_direct(p->sa, gps)) { - gp_stroke_eraser_dostroke(p, gpf, gps, p->mval, p->mvalo, p->radius, &rect); + gp_stroke_eraser_dostroke(p, gpf, gps, p->mval, p->radius, &rect); } } } diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 7b1e985fb7d..6d41e9bddbe 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -114,13 +114,6 @@ typedef enum eDrawStrokeFlags { /* ----- Tool Buffer Drawing ------ */ /* helper functions to set color of buffer point */ -static void gp_set_point_uniform_color(const bGPDspoint *pt, const float ink[4]) -{ - float alpha = ink[3] * pt->strength; - CLAMP(alpha, GPENCIL_STRENGTH_MIN, 1.0f); - immUniformColor3fvAlpha(ink, alpha); -} - static void gp_set_point_varying_color(const bGPDspoint *pt, const float ink[4], uint attr_id, @@ -134,30 +127,6 @@ static void gp_set_point_varying_color(const bGPDspoint *pt, immAttr4ub(attr_id, F2UB(ink[0]), F2UB(ink[1]), F2UB(ink[2]), F2UB(alpha)); } -/* --------- 2D Stroke Drawing Helpers --------- */ -/* change in parameter list */ -static void gp_calc_2d_stroke_fxy( - const float pt[3], short sflag, int offsx, int offsy, int winx, int winy, float r_co[2]) -{ - if (sflag & GP_STROKE_2DSPACE) { - r_co[0] = pt[0]; - r_co[1] = pt[1]; - } - else if (sflag & GP_STROKE_2DIMAGE) { - const float x = (float)((pt[0] * winx) + offsx); - const float y = (float)((pt[1] * winy) + offsy); - - r_co[0] = x; - r_co[1] = y; - } - else { - const float x = (float)(pt[0] / 100 * winx) + offsx; - const float y = (float)(pt[1] / 100 * winy) + offsy; - - r_co[0] = x; - r_co[1] = y; - } -} /* ----------- Volumetric Strokes --------------- */ /* draw a 3D stroke in "volumetric" style */ -- cgit v1.2.3