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 35 36 37 38
|
#define AFFICHER_JEU() j = 0 ;\
for( position.x = 20 ; j < HAUTEUR ; position.x += 51)\
{\
i = 0 ;\
for( position.y = 10; i < LONGUEUR ; position.y += 51)\
{\
if( grille[i][j] != 0)\
{\
sprintf(chiffre,"%d", grille[i][j]);\
SDL_FreeSurface(chiffre_sur);\
chiffre_sur = TTF_RenderText_Blended(police, chiffre, couleur);\
SDL_BlitSurface(chiffre_sur,NULL,grille_sur,&position);\
}\
i++;\
}\
j++;\
}\
position.x = 10;\
position.y = 10;\
SDL_BlitSurface(grille_sur, NULL, ecran, &position);\
position.x = 495;\
position.y = 10;\
bouton_s = IMG_Load("image/creer_s.JPG");\
SDL_BlitSurface(bouton_s,NULL,ecran,&position);\
position.y = 95;\
bouton_s = IMG_Load("image/remplir_s.JPG");\
SDL_BlitSurface(bouton_s, NULL,ecran,&position);\
position.y = 180;\
bouton_s = IMG_Load("image/solve_s.JPG");\
SDL_BlitSurface(bouton_s, NULL,ecran,&position);\
position.y = 265;\
bouton_s = IMG_Load("image/stop_s.JPG");\
SDL_BlitSurface(bouton_s, NULL,ecran,&position);\
position.y = 350;\
SDL_BlitSurface(info,NULL,ecran,&position);\
SDL_Flip(grille_sur);\
SDL_Flip(ecran); |
Partager