POur l'instant le progmme pert seulement d'ouvrir une fenêtre d'affichage

This commit is contained in:
2025-11-29 20:25:05 +01:00
parent 92ed426a31
commit 78c24a6541
4 changed files with 74 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
### VARIABLES ###
CC = gcc
CFLAGS = -Wall \
-ansi \
-pedantic
LIBS = -lgraph
EXE = taquin
OFILES = main.o \
affichage.o
### BUT PAR DEFAUT ###
but : ${EXE}
### REGLES ESSENTIELLES ###
affichage.o : affichage.h
main.o : affichage.h
${EXE} : ${OFILES}
$(CC) $(CFLAGS) -o ${EXE} ${OFILES} ${LIBS}
### REGLES OPTIONNELLES ###
run : but
./${EXE}
clean :
-rm -f ${OFILES} ${EXE}
mrproper : clean but
### BUTS FACTICES ###
.PHONY : but clean mrproper run
### FIN ###
+13
View File
@@ -0,0 +1,13 @@
#include "affichage.h"
#include <graph.h>
void init_affichage(void){
InitialiserGraphique();
CreerFenetre(100, 100, 800, 600);
}
void fermer_affichage(void){
FermerGraphique();
}
+8
View File
@@ -0,0 +1,8 @@
#ifndef AFFICHAGE_H
#define AFFICHAGE_H
void init_affichage(void);
void fermer_affichage(void);
#endif
+19
View File
@@ -0,0 +1,19 @@
#include "affichage.h"
#include<stdio.h>
#include <graph.h>
int main(void){
int k;
init_affichage();
while(1){
if (ToucheEnAttente()){
k = Touche();
if (k == XK_q)break;
}
}
fermer_affichage();
return 0;
}