rem: *dst_p = (p == srckey) ? dstkey : p;
add: *dst_p = (p == srckey) ? dstkey : fillcolor;
context: TFB_DrawCanvas_Fill (TFB_Canvas source, int width, int height,					Uint32 fillcolor, TFB_Canvas target){	SDL_Surface *src = (SDL_Surface *)source;	SDL_Surface *dst = (SDL_Surface *)target;	const SDL_PixelFormat *srcfmt = src->format;	SDL_PixelFormat *dstfmt = dst->format;	const int bpp = dstfmt->BytesPerPixel;	const int sp = src->pitch, dp = dst->pitch;	const int slen = sp / bpp, dlen = dp / bpp;	const int dsrc = slen - width, ddst = dlen - width;	Uint32 *src_p = (Uint32 *)src->pixels;	Uint32 *dst_p = (Uint32 *)dst->pixels;	int x, y;	if (srcfmt->BytesPerPixel != 4 || dstfmt->BytesPerPixel != 4)	{		fprintf (stderr, "TFB_DrawCanvas_Fill: Unsupported surface formats: "				"%d bytes/pixel source, %d bytes/pixel destination\n",				(int)srcfmt->BytesPerPixel, (int)dstfmt->BytesPerPixel);		return;	}	if ((src->flags & SDL_SRCALPHA) && srcfmt->Amask)	{	// alpha-based fill		Uint32 amask = srcfmt->Amask;				for (y = 0; y < height; ++y)		{			for (x = 0; x < width; ++x, ++src_p, ++dst_p)			{				*dst_p = (*src_p & amask) | fillcolor;			}			dst_p += ddst;			src_p += dsrc;		}	}	else if (src->flags & SDL_SRCCOLORKEY)	{	// colorkey-based fill		Uint32 srckey = srcfmt->colorkey;		Uint32 dstkey = srckey;		Uint32 notmask = ~srcfmt->Amask;		if (src->flags & SDL_RLEACCEL)		{			fprintf (stderr, "TFB_DrawCanvas_Fill: Unsupported source "					"surface format: SDL_RLEACCEL\n");			return;		}		if (dstkey == fillcolor)		{	// color collision, must switch colorkey			if (dstkey != 0)				// new colorkey is black (0,0,0)				dstkey = 0;			else				// new colorkey is grey (1/2,1/2,1/2)				dstkey = SDL_MapRGB (dstfmt, 127, 127, 127);		}		SDL_SetColorKey (dst, SDL_SRCCOLORKEY, dstkey);		for (y = 0; y < height; ++y)		{			for (x = 0; x < width; ++x, ++src_p, ++dst_p)			{				Uint32 p = *src_p & notmask;				*dst_p = (p == srckey) ? dstkey : p;			}			dst_p += ddst;			src_p += dsrc;		}	}}