[SDL] How differently?

Alan Wolfe Atrix2 at cox.net
Thu Apr 3 22:50:24 PDT 2008


Hi!

Are the balls too fast?

Or does it flicker and flash?

-----Original Message-----
From: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of krzysztof posluszny
Sent: Wednesday, April 02, 2008 10:49 AM
To: sdl at lists.libsdl.org
Subject: [SDL] How differently?

HI! I ask to write me how it it was been possible to write following 
functions so in order to she made the same differently but without use 
SDL_Flip(80). I'm sorry behind my English.


int kolysanie_statkami()
{
       ball[0]=IMG_Load("czaszka.bmp");
       ball[1]=IMG_Load("czaszka.bmp");


        while(pl==false)
        {
       for(int i=0;i<=50;++i)

        {
            apply_surface(++i, 40, ball[0], screen );
            apply_surface(++i+80, 40, ball[1], screen );
            //Szybkosc kołysania
            SDL_Delay(80);
            SDL_Flip(screen);
        }
         for(int j=50;j>=0;--j)

        {
           apply_surface(--j, 40, ball[0], screen );
           apply_surface(--j+80,40, ball[1], screen );
           //Szybkosc kołysania
            SDL_Delay(80);
           SDL_Flip(screen);
        }

     }
}



_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



More information about the SDL mailing list