diff --git a/affichage.c b/affichage.c index 007dfba..6f5f1b4 100644 --- a/affichage.c +++ b/affichage.c @@ -245,7 +245,9 @@ int essay(int grille_x){ } if (Victoire(found,grille_x,4)){ - printf("Victoire !\n"); + ChargerImageFond("./background/ecran-victoire.png"); + while(Touche()!=XK_space){ + } break; } diff --git a/affichage.o b/affichage.o new file mode 100644 index 0000000..3514b05 Binary files /dev/null and b/affichage.o differ diff --git a/menu_v2.c b/menu_v2.c index b1b870b..6feea71 100644 --- a/menu_v2.c +++ b/menu_v2.c @@ -39,106 +39,26 @@ int menu_principal(void){ break; } - //affichage du menu theme + //affichage du menu difficultée if((x>384) && (x<1114) && (y>384) && (y<459)){ - ChargerImageFond("./background/menu-theme.png"); - - ToucheEnAttente(); + ChargerImageFond("./background/menu-difficultee.png"); + while(1){ - SourisPosition(); - x=_X; - y=_Y; - - //affichage du menu sur le boutton retour - if((x>1194) && (x<1399) && (y>45) && (y<121)){ - ChargerImageFond("./background/menu-theme-retour.png"); - } - - //affichage du menu theme - else{ - ChargerImageFond("./background/menu-theme.png"); - } - - if (SourisCliquee()){ + if(SourisCliquee()){ x=_X; y=_Y; - - //retour au menu principal - if((x>1194) && (x<1399) && (y>45) && (y<121)){ - menu_principal(); + + if((x>68) && (x<488) && (y>266) && (y<696)){ + FermerGraphique(); + essay(3); } - - //affichage du menu difficultée du theme n°1 - if((x>66) && (x<491) && (y>356) && (y<781)){ - ChargerImageFond("./background/menu-difficultee.png"); - - while(1){ - if(SourisCliquee()){ - x=_X; - y=_Y; - - if((x>68) && (x<488) && (y>266) && (y<696)){ - FermerGraphique(); - essay(3); - } - if((x>537) && (x<958) && (y>266) && (y<696)){ - FermerGraphique(); - essay(4); - } - if((x>1007) && (x<1432) && (y>266) && (y<696)) { - FermerGraphique(); - essay(5); - } - } - } + if((x>537) && (x<958) && (y>266) && (y<696)){ + FermerGraphique(); + essay(4); } - - //affichage du menu difficultée du theme n°2 - if((x>535) && (x<960) && (y>356) && (y<781)){ - ChargerImageFond("./background/menu-difficultee.png"); - - while(1){ - if(SourisCliquee()){ - x=_X; - y=_Y; - if((x>68) && (x<488) && (y>266) && (y<696)){ - FermerGraphique(); - essay(3); - } - if((x>537) && (x<958) && (y>266) && (y<696)){ - FermerGraphique(); - essay(4); - } - if((x>1007) && (x<1432) && (y>266) && (y<696)) { - FermerGraphique(); - essay(5); - } - } - } - } - - //affichage du menu difficultée du theme 3 - if((x>1005) && (x<1430) && (y>356) &&(y<781)){ - ChargerImageFond("./background/menu-difficultee.png"); - - while(1){ - if(SourisCliquee()){ - x=_X; - y=_Y; - if((x>68) && (x<488) && (y>266) && (y<696)){ - FermerGraphique(); - essay(3); - } - if((x>537) && (x<958) && (y>266) && (y<696)){ - FermerGraphique(); - essay(4); - } - if((x>1007) && (x<1432) && (y>266) && (y<696)) { - FermerGraphique(); - essay(5); - } - } - } + if((x>1007) && (x<1432) && (y>266) && (y<696)) { + FermerGraphique(); + essay(5); } } }