Fixed some splint warnings. Basically, ensure vars are positive when you use >> and << for divide and multiply by 2 :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@773 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									e5fc3a9ef3
								
							
						
					
					
						commit
						3035788398
					
				
							
								
								
									
										32
									
								
								brush.c
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								brush.c
									
									
									
									
									
								
							@ -1293,7 +1293,7 @@ void Stretch_brush_preview(short x1, short y1, short x2, short y2)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Returns the minimum of 4 integers.
 | 
					/// 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 (a<b)
 | 
					  if (a<b)
 | 
				
			||||||
    if (c<d)
 | 
					    if (c<d)
 | 
				
			||||||
@ -1321,7 +1321,7 @@ void Pixel_in_distort_buffer(word x_pos,word y_pos,byte color)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Returns the maximum of 4 integers.
 | 
					/// Returns the maximum of 4 integers.
 | 
				
			||||||
int Max4(int a,int b,int c,int d)
 | 
					int Max4(unsigned long int a,unsigned long int b,unsigned long int c,unsigned long int d)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  if (a>b)
 | 
					  if (a>b)
 | 
				
			||||||
    if (c>d)
 | 
					    if (c>d)
 | 
				
			||||||
@ -1336,22 +1336,22 @@ int Max4(int a,int b,int c,int d)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Recursive function for linear distortion.
 | 
					// Recursive function for linear distortion.
 | 
				
			||||||
void Draw_brush_linear_distort(long int tex_min_x,
 | 
					void Draw_brush_linear_distort(unsigned long int tex_min_x,
 | 
				
			||||||
                               long int tex_min_y,
 | 
					                               unsigned long int tex_min_y,
 | 
				
			||||||
                               long int tex_max_x,
 | 
					                               unsigned long int tex_max_x,
 | 
				
			||||||
                               long int tex_max_y,
 | 
					                               unsigned long int tex_max_y,
 | 
				
			||||||
                               long int x1,
 | 
					                               unsigned long int x1,
 | 
				
			||||||
                               long int y1,
 | 
					                               unsigned long int y1,
 | 
				
			||||||
                               long int x2,
 | 
					                               unsigned long int x2,
 | 
				
			||||||
                               long int y2,
 | 
					                               unsigned long int y2,
 | 
				
			||||||
                               long int x3,
 | 
					                               unsigned long int x3,
 | 
				
			||||||
                               long int y3,
 | 
					                               unsigned long int y3,
 | 
				
			||||||
                               long int x4,
 | 
					                               unsigned long int x4,
 | 
				
			||||||
                               long int y4)
 | 
					                               unsigned long int y4)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  static byte color;
 | 
					  static byte color;
 | 
				
			||||||
  // bounding rectangle
 | 
					  // 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);
 | 
					  min_x=Min4(x1,x2,x3,x4);
 | 
				
			||||||
  max_x=Max4(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).
 | 
					/// 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;
 | 
					  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));
 | 
					  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));
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								brush.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								brush.h
									
									
									
									
									
								
							@ -72,7 +72,7 @@ void Rotate_brush_preview(float angle);
 | 
				
			|||||||
/*!
 | 
					/*!
 | 
				
			||||||
    Distort the brush on the screen.
 | 
					    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.
 | 
					    Replace the brush by a distorted version of itself.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user