[SDL] How can I implement fade-in/fade-out
cocobear
cocobear.cn at gmail.com
Sun Dec 9 05:41:59 PST 2007
于 Sun, 09 Dec 2007 07:47:34 -0500
"Ryan C. Gordon" <icculus at icculus.org> 写道:
>
> > SDL_SetAlpha(surface,SDL_RLEACCEL,(Uint8)i);
> > This code does'nt work!
>
> Try this:
>
> SDL_SetAlpha(surface,SDL_RLEACCEL | SDL_SRCALPHA,(Uint8)i);
>
> Without SDL_SRCALPHA, blitting will ignore the alpha value you
> specified and just copy the pixels instead of blending them.
>
> --ryan.
>
Thanks, I should remember this.
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
More information about the SDL
mailing list