Premiers travaux
This commit is contained in:
parent
7f0bcd5467
commit
95c655d10e
BIN
images/fondaccueil.jpg
Normal file
BIN
images/fondaccueil.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 355 KiB |
BIN
images/fondaccueil.jpg_original
Normal file
BIN
images/fondaccueil.jpg_original
Normal file
Binary file not shown.
After Width: | Height: | Size: 352 KiB |
BIN
images/fondaccueil.png
Normal file
BIN
images/fondaccueil.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 311 KiB |
BIN
images/fondaccueil.png_original
Normal file
BIN
images/fondaccueil.png_original
Normal file
Binary file not shown.
After Width: | Height: | Size: 310 KiB |
32
saeMain.c
Normal file
32
saeMain.c
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <graph.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
39
saeTest.c
Normal file
39
saeTest.c
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#include<graph.h>
|
||||||
|
#include<stdio.h>
|
||||||
|
|
||||||
|
#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();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user