From 03cdfc71722afd1d8631e3ed432af6d031cd9b7e Mon Sep 17 00:00:00 2001 From: stiti Date: Wed, 29 Nov 2023 13:32:01 +0100 Subject: [PATCH] =?UTF-8?q?D=C3=A9placement=20de=20grille.c=20dans=20le=20?= =?UTF-8?q?dossier=20src?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/grille.c | 35 +++++++++++++++++++++++++++++++++++ src/menu.c | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 src/grille.c diff --git a/src/grille.c b/src/grille.c new file mode 100644 index 0000000..802d072 --- /dev/null +++ b/src/grille.c @@ -0,0 +1,35 @@ +#include +#include +#include + +int* creer_grille(void){ + int* Grille=NULL; + Grille=(int*) malloc(40*60*sizeof(int)); + return Grille; +} + +void creer_grille_graph(){ + int x=200,y=200; + ChoisirCouleurDessin(CouleurParComposante(0,0,0)); + DessinerRectangle(x,y,1200,1000); + DessinerRectangle(x,y,900,600); + for(x=200;x<1100;x=x+15){ + DessinerSegment(x,y,x,800); + } + x=200; + y=200; + for(y=200;y<800;y=y+15){ + DessinerSegment(x,y,1100,y); + } + +} + +int main(void){ + char x; + InitialiserGraphique(); + CreerFenetre(0,0,1300,1300); + creer_grille_graph(); + while(x != 'q'){ + scanf("%c",&x); + } +} \ No newline at end of file diff --git a/src/menu.c b/src/menu.c index ead59d7..ea80e1a 100644 --- a/src/menu.c +++ b/src/menu.c @@ -52,7 +52,7 @@ void afficherMenuModesDeJeu(){ } void afficherMenuCheatCode(){ - ChargerImageFond("menu_cheat_code.png") + ChargerImageFond("menu_cheat_code.png"); } int attendreChoixModesDeJeu(){