void Screen::fade_in(void)
{
int i;
SDL_Surface *surface;
surface = load_image("black.bmp");
if(surface == NULL) {
fprintf(stderr, "Load image error: %s\n",
SDL_GetError()); exit(-1);
}
for (i=2;i<=256;i<<=1) {
SDL_SetAlpha(surface,SDL_RLEACCEL,(Uint8)i);
SDL_BlitSurface(surface,NULL,screen,NULL);
update();
}
}
This code does'nt work!