+ getGraphicSource(graphic, &bitmap_nr, &src_x, &src_y);
+ src_bitmap = pix_masked[bitmap_nr];
+
+ /* create surface for masked tile graphic */
+ if ((sdl_image_tmp = SDL_CreateRGBSurface(SDL_SWSURFACE, TILEX, TILEY,
+ WIN_SDL_DEPTH, 0, 0, 0, 0))
+ == NULL)
+ Error(ERR_EXIT, "SDL_CreateRGBSurface() failed: %s", SDL_GetError());
+
+ /* create native transparent surface for current image */
+ SDL_SetColorKey(sdl_image_tmp, SDL_SRCCOLORKEY,
+ SDL_MapRGB(sdl_image_tmp->format, 0x00, 0x00, 0x00));
+ if ((tile_masked[tile] = SDL_DisplayFormat(sdl_image_tmp)) == NULL)
+ Error(ERR_EXIT, "SDL_DisplayFormat() failed: %s", SDL_GetError());
+
+ SDL_FreeSurface(sdl_image_tmp);
+
+ BlitBitmap(src_bitmap, tile_masked[tile], src_x,src_y, TILEX,TILEY, 0,0);
+ }
+ }
+
+#else /* !USE_SDL_LIBRARY */
+
+ /* create graphic context structures needed for clipping */