rem: TFB_DrawCanvas_SetTransparentIndex (newsurf, TFB_DrawCanvas_GetTransparentIndex (src));
add: if (old && type != last_type) { TFB_DrawCanvas_Delete (old); old = NULL; } if (!old) { newsurf = SDL_CreateRGBSurface (SDL_SWSURFACE, src->w, src->h, src->format->BitsPerPixel, src->format->Rmask, src->format->Gmask, src->format->Bmask, src->format->Amask); if (src->format->palette) TFB_DrawCanvas_SetTransparentIndex (newsurf, TFB_DrawCanvas_GetTransparentIndex (src)); }
context: TFB_DrawCanvas_New_ScaleTarget (TFB_Canvas canvas){	SDL_Surface *src = (SDL_Surface *)canvas;	SDL_Surface *newsurf = SDL_CreateRGBSurface (SDL_SWSURFACE, src->w,				src->h,				src->format->BitsPerPixel,				src->format->Rmask,				src->format->Gmask,				src->format->Bmask,				src->format->Amask);	if (src->format->palette)	{		TFB_DrawCanvas_SetTransparentIndex (newsurf, TFB_DrawCanvas_GetTransparentIndex (src));	}	return newsurf;}