+ if(alpha != 255)
+ {
+ /* Copy the SDL surface, then make it using alpha and use it to blit into the screen */
+ SDL_Surface* sdl_surface_copy = SDL_CreateRGBSurface (sdl_surface->flags,
+ sdl_surface->w, sdl_surface->h, sdl_surface->format->BitsPerPixel,
+ sdl_surface->format->Rmask, sdl_surface->format->Gmask, sdl_surface->format->Bmask,
+ sdl_surface->format->Amask);
+
+ SDL_BlitSurface(sdl_surface, NULL, sdl_surface_copy, NULL);
+
+ SDL_SetAlpha(sdl_surface_copy ,SDL_SRCALPHA,alpha);
+
+ int ret = SDL_BlitSurface(sdl_surface_copy, NULL, screen, &dest);