rnd-20131202-1-src
[rocksndiamonds.git] / src / libgame / sdl.c
index 4c484243934102774e2670d626f967495d87ef53..b9309408a4d1966ea687f6fa0db5b7d04fb64aa4 100644 (file)
@@ -85,7 +85,7 @@ static void SDLSetWindowIcon(char *basename)
   }
 
   /* set transparent color */
-  SDL_SetColorKey(surface, SDL_SRCCOLORKEY,
+  SDL_SetColorKey(surface, SET_TRANSPARENT_PIXEL,
                  SDL_MapRGB(surface->format, 0x00, 0x00, 0x00));
 
   SDL_WM_SetIcon(surface, NULL);
@@ -1334,12 +1334,17 @@ int zoomSurfaceRGBA_scaleDownBy2(SDL_Surface *src, SDL_Surface *dst)
 {
   int x, y;
   tColorRGBA *sp, *csp, *dp;
-  int sgap, dgap;
+#if 0
+  int sgap;
+#endif
+  int dgap;
 
   /* pointer setup */
   sp = csp = (tColorRGBA *) src->pixels;
   dp = (tColorRGBA *) dst->pixels;
+#if 0
   sgap = src->pitch - src->w * 4;
+#endif
   dgap = dst->pitch - dst->w * 4;
 
   for (y = 0; y < dst->h; y++)
@@ -1386,7 +1391,10 @@ int zoomSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst)
 {
   int x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy;
   tColorRGBA *sp, *csp, *dp;
-  int sgap, dgap;
+#if 0
+  int sgap;
+#endif
+  int dgap;
 
   /* use specialized zoom function when scaling down to exactly half size */
   if (src->w == 2 * dst->w &&
@@ -1425,7 +1433,9 @@ int zoomSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst)
   /* pointer setup */
   sp = csp = (tColorRGBA *) src->pixels;
   dp = (tColorRGBA *) dst->pixels;
+#if 0
   sgap = src->pitch - src->w * 4;
+#endif
   dgap = dst->pitch - dst->w * 4;
 
   csay = say;
@@ -1696,7 +1706,7 @@ Bitmap *SDLLoadImage(char *filename)
   UPDATE_BUSY_STATE();
 
   /* create native transparent surface for current image */
-  SDL_SetColorKey(sdl_image_tmp, SDL_SRCCOLORKEY,
+  SDL_SetColorKey(sdl_image_tmp, SET_TRANSPARENT_PIXEL,
                  SDL_MapRGB(sdl_image_tmp->format, 0x00, 0x00, 0x00));
   if ((new_bitmap->surface_masked = SDL_DisplayFormat(sdl_image_tmp)) == NULL)
   {