diff --git a/images/fondaccueil.jpg b/images/fondaccueil.jpg new file mode 100644 index 0000000..81f313c Binary files /dev/null and b/images/fondaccueil.jpg differ diff --git a/images/fondaccueil.jpg_original b/images/fondaccueil.jpg_original new file mode 100644 index 0000000..9a3cab7 Binary files /dev/null and b/images/fondaccueil.jpg_original differ diff --git a/images/fondaccueil.png b/images/fondaccueil.png new file mode 100644 index 0000000..7de2a54 Binary files /dev/null and b/images/fondaccueil.png differ diff --git a/images/fondaccueil.png_original b/images/fondaccueil.png_original new file mode 100644 index 0000000..3a8cad7 Binary files /dev/null and b/images/fondaccueil.png_original differ diff --git a/saeMain.c b/saeMain.c new file mode 100644 index 0000000..0211d5d --- /dev/null +++ b/saeMain.c @@ -0,0 +1,32 @@ +#include +#include +#include + +int main() +{ + char quit; + couleur c; + InitialiserGraphique(); + CreerFenetre(10,10,1300,760); + c=CouleurParComposante(31, 31, 96); + EffacerEcran(c); + c=CouleurParNom("white"); + ChoisirCouleurDessin(c); + ChargerImage("./images/fondaccueil.jpg",300,240,1300,760,0,0); + EcrireTexte(587,60,"Match Pairs",2); + DessinerRectangle(460,135,400,110); + EcrireTexte(588,200,"Easy : 4x4",2); + DessinerRectangle(460,315,400,110); + EcrireTexte(583,380,"Medium : 6x5",2); + DessinerRectangle(460,505,400,110); + EcrireTexte(588,570,"Hard : 8x6",2); + EcrireTexte(12,748,"Press Q to quit the game",1); + while(quit!='q' | quit!='Q') { + quit=Touche(); + if (quit=='q' | quit=='Q') { + FermerGraphique(); + return EXIT_SUCCESS; + } + } + return EXIT_SUCCESS; +} diff --git a/saeTest.c b/saeTest.c new file mode 100644 index 0000000..ded3fef --- /dev/null +++ b/saeTest.c @@ -0,0 +1,39 @@ +#include +#include + +#define tx 300 +#define ty 300 + +int main(void) +{ + char t[50]; + int x,y; + couleur c; + + InitialiserGraphique(); + CreerFenetre(100,100,tx,ty); + c=CouleurParNom("red"); + ChoisirCouleurDessin(c); + SourisPosition(); + x=_X; + y=_Y; + sprintf(t,"x=%3d:y=%3d",_X,_Y); + EffacerEcran(CouleurParNom("white")); + EcrireTexte((tx-TailleChaineEcran(t,0))/2, + ty/2,t,0); + + while(!SourisCliquee()) + { + SourisPosition(); + if (_X!=x||_Y!=y) + { + sprintf(t,"x=%3d:y=%3d",_X,_Y); + EffacerEcran(CouleurParNom("white")); + EcrireTexte((tx-TailleChaineEcran(t,0))/2, + ty/2,t,0); + x=_X; + y=_Y; + } + } + FermerGraphique(); +} \ No newline at end of file