diff --git a/images.c b/images.c index 5793435..bec8d4b 100644 --- a/images.c +++ b/images.c @@ -1,8 +1,10 @@ #include #include #include +#include "images.h" -int main(void){ + +void chargement(void){ InitialiserGraphique(); ChoisirEcran(0); CreerFenetre(0,0,1024,576); @@ -40,9 +42,5 @@ int main(void){ ChargerImage("Images/image00.png",260,160,0,0,40,40); ChargerImage("Images/image00.png",310,160,0,0,40,40); ChargerImage("Images/image00.png",360,160,0,0,40,40); - Touche(); - - FermerGraphique(); - return EXIT_SUCCESS; } \ No newline at end of file diff --git a/images.h b/images.h new file mode 100644 index 0000000..b6f98da --- /dev/null +++ b/images.h @@ -0,0 +1,6 @@ +#ifndef IMAGES_H +#define IMAGES_H + +void chargement(void); + +#endif \ No newline at end of file diff --git a/main.c b/main.c index cc29971..ab2f79a 100644 --- a/main.c +++ b/main.c @@ -7,11 +7,12 @@ int main(void){ int test; - InitialiserGraphique(); printf("Combien d'images voulez vous?(Max 20)"); scanf("%d",&test); chargement(); - if (SourisCliquee()==1){ + while (SourisCliquee()!=1){ printf("1"); } + FermerGraphique(); + return EXIT_SUCCESS; } \ No newline at end of file