diff --git a/brush.c b/brush.c index b88e38c9..09e4150e 100644 --- a/brush.c +++ b/brush.c @@ -1293,7 +1293,7 @@ void Stretch_brush_preview(short x1, short y1, short x2, short y2) } /// Returns the minimum of 4 integers. -int Min4(int a,int b,int c,int d) +int Min4(unsigned long int a,unsigned long int b,unsigned long int c,unsigned long int d) { if (ab) if (c>d) @@ -1336,22 +1336,22 @@ int Max4(int a,int b,int c,int d) } // Recursive function for linear distortion. -void Draw_brush_linear_distort(long int tex_min_x, - long int tex_min_y, - long int tex_max_x, - long int tex_max_y, - long int x1, - long int y1, - long int x2, - long int y2, - long int x3, - long int y3, - long int x4, - long int y4) +void Draw_brush_linear_distort(unsigned long int tex_min_x, + unsigned long int tex_min_y, + unsigned long int tex_max_x, + unsigned long int tex_max_y, + unsigned long int x1, + unsigned long int y1, + unsigned long int x2, + unsigned long int y2, + unsigned long int x3, + unsigned long int y3, + unsigned long int x4, + unsigned long int y4) { static byte color; // bounding rectangle - static long int min_x, max_x, min_y, max_y; + static unsigned long int min_x, max_x, min_y, max_y; min_x=Min4(x1,x2,x3,x4); max_x=Max4(x1,x2,x3,x4); @@ -1430,7 +1430,7 @@ void Draw_brush_linear_distort(long int tex_min_x, } /// Draws a distorted version of the brush, mapped over the given quad (picture coordinates). -void Distort_brush_preview(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4) +void Distort_brush_preview(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2, unsigned short x3, unsigned short y3, unsigned short x4, unsigned short y4) { Pixel_for_distort=Pixel_figure_preview; Draw_brush_linear_distort(0, 0, (Brush_width<<16), (Brush_height<<16), (x1<<16), (y1<<16), (x2<<16), (y2<<16), (x3<<16), (y3<<16), (x4<<16), (y4<<16)); diff --git a/brush.h b/brush.h index e2e09a02..030cdb74 100644 --- a/brush.h +++ b/brush.h @@ -72,7 +72,7 @@ void Rotate_brush_preview(float angle); /*! Distort the brush on the screen. */ -void Distort_brush_preview(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4); +void Distort_brush_preview(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2, unsigned short x3, unsigned short y3, unsigned short x4, unsigned short y4); /*! Replace the brush by a distorted version of itself.