src/video/SDL_rect.c
changeset 4456 0a5dbe96c3be
parent 3697 f7b03b6838cb
child 5154 fb424691cfc7
equal deleted inserted replaced
4455:6cf71111cf68 4456:0a5dbe96c3be
   120 
   120 
   121 SDL_bool
   121 SDL_bool
   122 SDL_EnclosePoints(const SDL_Point * points, int count, const SDL_Rect * clip,
   122 SDL_EnclosePoints(const SDL_Point * points, int count, const SDL_Rect * clip,
   123                   SDL_Rect * result)
   123                   SDL_Rect * result)
   124 {
   124 {
   125     int minx, miny;
   125     int minx = 0;
   126     int maxx, maxy;
   126     int miny = 0;
       
   127     int maxx = 0;
       
   128     int maxy = 0;
   127     int x, y, i;
   129     int x, y, i;
   128 
   130 
   129     if (count < 1) {
   131     if (count < 1) {
   130         return SDL_FALSE;
   132         return SDL_FALSE;
   131     }
   133     }
   220 
   222 
   221 SDL_bool
   223 SDL_bool
   222 SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2,
   224 SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2,
   223                          int *Y2)
   225                          int *Y2)
   224 {
   226 {
   225     int x, y;
   227     int x = 0;
       
   228     int y = 0;
   226     int x1, y1;
   229     int x1, y1;
   227     int x2, y2;
   230     int x2, y2;
   228     int rectx1;
   231     int rectx1;
   229     int recty1;
   232     int recty1;
   230     int rectx2;
   233     int rectx2;