1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
int j=0;
int t=0;
if ( (pos.x )- position.x !=1 && (pos.y )- position.y !=1)
{
if ( (pos.x)- position.x >0 && (pos.y )- position.y >0) // erreur ici
{
posrr.x = position.x+j;
posrr.y = position.y+j;
SDL_BlitSurface(ajout, NULL,ecran,&posrr);
SDL_Flip(ecran);
if ( (pos.x)- posrr.x =1)
{
posrr.x = position.x+j;
posrr.y = position.y+j+t;
SDL_BlitSurface(ajout, NULL,ecran,&posrr);
SDL_Flip(ecran);
t++;
}
if ( (pos.y)- posrr.y =1)
{
posrr.x = position.x+j+t;
posrr.y = position.y+j;
SDL_BlitSurface(ajout, NULL,ecran,&posrr);
SDL_Flip(ecran);
t++;
}
j++
}
} |
Partager