Ajout des fichiers makefile et main.c etc
This commit is contained in:
parent
f89041faec
commit
ae57c35317
2
images.c
2
images.c
@ -6,8 +6,6 @@
|
||||
|
||||
int main(void){
|
||||
InitialiserGraphique();
|
||||
ChoisirEcran(0);
|
||||
CreerFenetre(0,0,1024,576);
|
||||
char tirage[50], affichage[10];
|
||||
int pos_x, pos_y, clic_x, clic_y, im_y, im_x;
|
||||
int i, j, g;
|
||||
|
17
main.c
17
main.c
@ -2,17 +2,22 @@
|
||||
#include<stdlib.h>
|
||||
#include<graph.h>
|
||||
#include "images.h"
|
||||
//faire les includes des autres parties du programme
|
||||
#include "menu.h"
|
||||
#include "main.h"
|
||||
/*faire les includes des autres parties du programme*/
|
||||
|
||||
|
||||
int main(void){
|
||||
int test;
|
||||
printf("Combien d'images voulez vous?(Max 20)");
|
||||
scanf("%d",&test);
|
||||
chargement();
|
||||
int test=menu();
|
||||
printf("%d\n",test);
|
||||
/*chargement();
|
||||
while (SourisCliquee()!=1){
|
||||
if (SourisCliquee()==1){
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
printf("1");
|
||||
}
|
||||
}*/
|
||||
tirage_aleatoire();
|
||||
FermerGraphique();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
36
menu.c
36
menu.c
@ -1,10 +1,10 @@
|
||||
#include<stdlib.h>
|
||||
#include<graph.h>
|
||||
#include<stdio.h>
|
||||
#include "menu.h"
|
||||
/*nombre de paire min = 4*/
|
||||
|
||||
//nombre de paire min = 4
|
||||
|
||||
int main(void){
|
||||
int menu(void){
|
||||
int xpos;
|
||||
int ypos;
|
||||
int i=4;
|
||||
@ -25,23 +25,31 @@ int main(void){
|
||||
ChoisirCouleurDessin(c);
|
||||
RemplirRectangle(300,300,300,50);
|
||||
while(1){
|
||||
snprintf(choix,50,"%d",i);
|
||||
c=CouleurParComposante(255,255,255);
|
||||
ChoisirCouleurDessin(c);
|
||||
RemplirRectangle(300,300,300,50);
|
||||
c=CouleurParComposante(0,0,0);
|
||||
ChoisirCouleurDessin(c);
|
||||
EcrireTexte(500,350,choix,2);
|
||||
if(SourisCliquee()==1){
|
||||
xpos=_X;
|
||||
ypos=_Y;
|
||||
printf("x %d y %d\n",xpos,ypos);
|
||||
if((xpos<=291 && xpos<=320) && (ypos>=256 && ypos<=287)){
|
||||
printf("a");
|
||||
/*i++;
|
||||
if (i==21){
|
||||
if((xpos>=291 && xpos<=320) && (ypos>=256 && ypos<=287)){
|
||||
i--;
|
||||
if (i==3){
|
||||
i=20;
|
||||
}
|
||||
}
|
||||
if((xpos>=714 && xpos<=739) && (ypos>=256 && ypos<=287)){
|
||||
i++;
|
||||
if(i==21){
|
||||
i=4;
|
||||
}
|
||||
snprintf(choix,50,"%d",i);
|
||||
c=CouleurParComposante(255,255,255);
|
||||
ChoisirCouleurDessin(c);
|
||||
RemplirRectangle(300,300,300,50);
|
||||
EcrireTexte(300,300,choix,2);*/
|
||||
}
|
||||
if((xpos>=380 && xpos<=650) && (ypos>=402 && ypos<=473)){
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user