1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| while(*enCours && (positionsPersos[choixPerso][0])!=SCREEN_W/10/2+SCREEN_W/10*9){
afficheBase(buffer, icone, sol, barre, perso_base, positionsPersos, pointsActions, fleche, attaques, ennemis_base, positionsEnnemis);
draw_sprite(*buffer, imagesPersos[choixPerso][0][img_compt_perso[choixPerso][0]], (int)(positionsPersos[choixPerso][0]) - (imagesPersos[choixPerso][0][img_compt_perso[choixPerso][0]])->w/2, (int)(positionsPersos[choixPerso][1]) - (imagesPersos[choixPerso][0][img_compt_perso[choixPerso][0]])->h/2 );
blit(*buffer, screen, 0, 0, 0, 0, (*buffer)->w, (*buffer)->h);
*fin = clock();
if((double)(*fin - *debut) / CLOCKS_PER_SEC > 0.05){
img_compt_perso[choixPerso][0] = (++img_compt_perso[choixPerso][0])%8;
perso_base[choixPerso] = imagesPersos[choixPerso][0][img_compt_perso[choixPerso][0]];
*debut = clock();
}
(positionsPersos[choixPerso][0])++;
rest(10);
for(i=0; i<10; i++){
if((positionsPersos[choixPerso][0]) == (SCREEN_W/10/2 + i*SCREEN_W/10)) *enCours = 0;
}
} |
Partager