ajout de images.h modif images.c main.c

This commit is contained in:
morinl 2022-11-22 16:03:31 +01:00
parent a68eefabff
commit eee1659de2
3 changed files with 12 additions and 7 deletions

View File

@ -1,8 +1,10 @@
#include<stdio.h> #include<stdio.h>
#include<stdlib.h> #include<stdlib.h>
#include<graph.h> #include<graph.h>
#include "images.h"
int main(void){
void chargement(void){
InitialiserGraphique(); InitialiserGraphique();
ChoisirEcran(0); ChoisirEcran(0);
CreerFenetre(0,0,1024,576); 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",260,160,0,0,40,40);
ChargerImage("Images/image00.png",310,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); ChargerImage("Images/image00.png",360,160,0,0,40,40);
Touche();
FermerGraphique();
return EXIT_SUCCESS;
} }

6
images.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef IMAGES_H
#define IMAGES_H
void chargement(void);
#endif

5
main.c
View File

@ -7,11 +7,12 @@
int main(void){ int main(void){
int test; int test;
InitialiserGraphique();
printf("Combien d'images voulez vous?(Max 20)"); printf("Combien d'images voulez vous?(Max 20)");
scanf("%d",&test); scanf("%d",&test);
chargement(); chargement();
if (SourisCliquee()==1){ while (SourisCliquee()!=1){
printf("1"); printf("1");
} }
FermerGraphique();
return EXIT_SUCCESS;
} }