Améliration Graphique ( non fini ) + code plus facile a lire
This commit is contained in:
parent
114f3dbb39
commit
887caed239
8
Makefile
8
Makefile
@ -3,7 +3,7 @@ CFLAGS = -Wall -Wextra
|
|||||||
|
|
||||||
all: prog
|
all: prog
|
||||||
|
|
||||||
prog: main.o evenement.o GUI.o
|
prog: main.o evenement.o gui.o scene.o
|
||||||
$(CC) -o $@ $^ -lgraph
|
$(CC) -o $@ $^ -lgraph
|
||||||
|
|
||||||
main.o: main.c evenement.h
|
main.o: main.c evenement.h
|
||||||
@ -12,8 +12,12 @@ main.o: main.c evenement.h
|
|||||||
evenement.o: evenement.c evenement.h
|
evenement.o: evenement.c evenement.h
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
GUI.o: GUI.c GUI.h
|
gui.o: gui.c gui.h
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
scene.o: scene.c scene.h
|
||||||
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o prog
|
rm -f *.o prog
|
||||||
|
17
evenement.c
17
evenement.c
@ -3,7 +3,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "GUI.h"
|
#include "gui.h"
|
||||||
|
#include "scene.h"
|
||||||
|
|
||||||
void AfficherTimerEtScore(long unsigned int *score, int minutes,int secondes) /*Afficher le temps passé et le score*/
|
void AfficherTimerEtScore(long unsigned int *score, int minutes,int secondes) /*Afficher le temps passé et le score*/
|
||||||
{
|
{
|
||||||
@ -25,17 +26,6 @@ void AfficherTimerEtScore(long unsigned int *score, int minutes,int secondes)
|
|||||||
CopierZone(1,0,0,0,930,710,0,0);
|
CopierZone(1,0,0,0,930,710,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitialiserPastilles(PIXELS *pastilles, PIXELS *serpent, int longueur_serpent) {
|
|
||||||
int i;
|
|
||||||
|
|
||||||
srand(time(NULL));
|
|
||||||
|
|
||||||
for (i = 0; i < PASTILLES; i++) {
|
|
||||||
pastilles[i] = gen_pastille(serpent,pastilles,longueur_serpent);
|
|
||||||
ChargerImage("./images/PommePastille.png",pastilles[i].x,pastilles[i].y,0,0,T_PIXEL,T_PIXEL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int MourrirSerpent(PIXELS *serpent, int longueur_serpent)
|
int MourrirSerpent(PIXELS *serpent, int longueur_serpent)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@ -94,7 +84,6 @@ void DeplacementSerpent(int direction ,PIXELS *serpent, int longueur)
|
|||||||
tempY = tempY2;
|
tempY = tempY2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(direction == 0) /* Direction vers la gauche */
|
if(direction == 0) /* Direction vers la gauche */
|
||||||
{
|
{
|
||||||
serpent[0].x-=T_PIXEL;
|
serpent[0].x-=T_PIXEL;
|
||||||
@ -117,7 +106,7 @@ void DeplacementSerpent(int direction ,PIXELS *serpent, int longueur)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Serpent(PIXELS *serpent,PIXELS *pastilles,unsigned long *score,int *longueur_serpent,unsigned long int *vitesse,int direction)
|
int Serpent(PIXELS *serpent,PIXELS *pastilles,unsigned long *score,unsigned long *longueur_serpent,unsigned long int *vitesse,int direction)
|
||||||
{
|
{
|
||||||
if(MourrirSerpent(serpent,*longueur_serpent) == 1)
|
if(MourrirSerpent(serpent,*longueur_serpent) == 1)
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ int PastilleSurSerpent(PIXELS pastille, PIXELS *serpent, int longueur_serpent);
|
|||||||
|
|
||||||
int MourrirSerpent(PIXELS *serpent, int longueur_serpent);
|
int MourrirSerpent(PIXELS *serpent, int longueur_serpent);
|
||||||
|
|
||||||
int Serpent(PIXELS *serpent,PIXELS *pastilles,unsigned long *score,int *longueur_serpent,unsigned long int *vitesse,int direction);
|
int Serpent(PIXELS *serpent,PIXELS *pastilles,unsigned long *score,unsigned long *longueur_serpent,unsigned long int *vitesse,int direction);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
21
gui.c
Normal file
21
gui.c
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <graph.h>
|
||||||
|
|
||||||
|
void Menu()
|
||||||
|
{
|
||||||
|
ChoisirEcran(0);
|
||||||
|
ChargerImage("./images/Menu.png",0,0,0,0,930,710);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Pause()
|
||||||
|
{
|
||||||
|
ChoisirEcran(0);
|
||||||
|
ChargerImage("./images/Pause.png",0,0,0,0,930,710);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PerduGUI()
|
||||||
|
{
|
||||||
|
ChoisirEcran(0);
|
||||||
|
ChargerImage("./images/Perdu.png",0,0,0,0,930,710);
|
||||||
|
}
|
10
gui.h
Normal file
10
gui.h
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef GUI_H
|
||||||
|
#define GUI_H
|
||||||
|
|
||||||
|
void Menu();
|
||||||
|
void PerduGUI();
|
||||||
|
void Pause();
|
||||||
|
void Reinitialiser();
|
||||||
|
int AfficherGUI(unsigned char menu);
|
||||||
|
|
||||||
|
#endif
|
Before ![]() (image error) Size: 38 KiB After ![]() (image error) Size: 38 KiB ![]() ![]() |
164
main.c
164
main.c
@ -4,107 +4,12 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "evenement.h"
|
#include "evenement.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "GUI.h"
|
#include "gui.h"
|
||||||
|
#include "scene.h"
|
||||||
|
|
||||||
#define DELTA 100000L
|
#define DELTA 100000L
|
||||||
#define DELTA2 1000000L
|
#define DELTA2 1000000L
|
||||||
|
|
||||||
int ArrondirPixel(int nombre) /* Calcule un arrondi du pixel pour pouvoir respecter la norme des 40 lignes et 60 colonnes */
|
|
||||||
{
|
|
||||||
/* Calcul du reste de la division par 15 */
|
|
||||||
int reste = nombre % 15;
|
|
||||||
|
|
||||||
/* Calcul de l'arrondi au multiple de 15 le plus proche */
|
|
||||||
int arrondi = (reste <= 7) ? nombre - reste : nombre + (15 - reste);
|
|
||||||
|
|
||||||
return arrondi;
|
|
||||||
}
|
|
||||||
|
|
||||||
PIXELS gen_pastille(PIXELS *serpent,PIXELS *pastilles,int longueur_serpent)
|
|
||||||
|
|
||||||
/* nb_pastille = int nombre de pastille voulue , p_pastilles est un pointeur d'un tableau de pixels qui sont des pastilles*/
|
|
||||||
/*-Elles se génèrent à des endroits qui peuvent être les mêmes ou gêner le snake*/
|
|
||||||
{
|
|
||||||
int x_pastille,y_pastille,i;
|
|
||||||
int ok = 0;
|
|
||||||
PIXELS pastille;
|
|
||||||
do{
|
|
||||||
ok = 0;
|
|
||||||
x_pastille= ArrondirPixel(rand()%W_GAME);
|
|
||||||
y_pastille = ArrondirPixel(rand()%H_GAME);
|
|
||||||
for(i=0;i<longueur_serpent;i++)
|
|
||||||
{
|
|
||||||
if(x_pastille == serpent[i].x && y_pastille == serpent[i].y)
|
|
||||||
{
|
|
||||||
ok = 1; /* Check si la pastille se genère sur une coordonné du serpent */
|
|
||||||
}
|
|
||||||
if(x_pastille == pastilles[i].x && y_pastille == pastilles[i].y)
|
|
||||||
{
|
|
||||||
ok = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}while(ok);
|
|
||||||
|
|
||||||
if(x_pastille < DECALEMENT)
|
|
||||||
{
|
|
||||||
x_pastille =+ DECALEMENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(y_pastille < DECALEMENT)
|
|
||||||
{
|
|
||||||
y_pastille =+ DECALEMENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
pastille.x = x_pastille ;
|
|
||||||
pastille.y = y_pastille ;
|
|
||||||
|
|
||||||
return pastille;
|
|
||||||
}
|
|
||||||
|
|
||||||
void InitialisationDuSerpent(PIXELS *p_serpent) /* L'initialisation du serpent */
|
|
||||||
{
|
|
||||||
int x_millieu = 0, y_millieu = 0 , compteur = 0;
|
|
||||||
x_millieu = T_PIXEL*30; /* 30 = 60 colonnes divisé par 2*/
|
|
||||||
y_millieu = T_PIXEL*20; /* 20 = 40 colonnes divisé par 2*/
|
|
||||||
ChoisirEcran(2);
|
|
||||||
ChargerImage("./images/SnakePart.png",x_millieu,y_millieu,0,0,T_PIXEL,T_PIXEL);
|
|
||||||
|
|
||||||
p_serpent[0].x = x_millieu;
|
|
||||||
p_serpent[0].y = y_millieu;
|
|
||||||
for(compteur=0;compteur<9;compteur++) /*Commence par 1 car p_serpent index 0 initialisées pour la tête et 2 + 2x9 = 10 couples de coordonnées 2D */
|
|
||||||
{
|
|
||||||
p_serpent[compteur+1].x = p_serpent[compteur].x+T_PIXEL;
|
|
||||||
p_serpent[compteur+1].y = p_serpent[compteur].y;
|
|
||||||
|
|
||||||
ChargerImage("./images/SnakePart.png",p_serpent[compteur+1].x,p_serpent[compteur+1].y,0,0,T_PIXEL,T_PIXEL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void DessinerScene(PIXELS *pastilles, PIXELS *serpent, int longueur_serpent) /* Dessine la scène */
|
|
||||||
{
|
|
||||||
couleur bg;
|
|
||||||
couleur border;
|
|
||||||
ChoisirEcran(2);
|
|
||||||
border=CouleurParComposante(78, 93, 47);
|
|
||||||
bg=CouleurParComposante(171, 204, 104);
|
|
||||||
|
|
||||||
ChoisirCouleurDessin(border);
|
|
||||||
RemplirRectangle(0,0,930,630);
|
|
||||||
|
|
||||||
ChoisirCouleurDessin(bg);
|
|
||||||
RemplirRectangle(0,630,930,650);
|
|
||||||
|
|
||||||
ChoisirCouleurDessin(border);
|
|
||||||
RemplirRectangle(0,650,930,15);
|
|
||||||
|
|
||||||
ChoisirCouleurDessin(bg);
|
|
||||||
RemplirRectangle(T_PIXEL,T_PIXEL,W_GAME,H_GAME);
|
|
||||||
InitialiserPastilles(pastilles,serpent,longueur_serpent);
|
|
||||||
InitialisationDuSerpent(serpent);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
unsigned char pause = 0;
|
unsigned char pause = 0;
|
||||||
@ -117,6 +22,7 @@ int main()
|
|||||||
int minutes = 0;
|
int minutes = 0;
|
||||||
unsigned long int vitesse = DELTA;
|
unsigned long int vitesse = DELTA;
|
||||||
int valeur_retourne = 0;
|
int valeur_retourne = 0;
|
||||||
|
unsigned char perdu = 0;
|
||||||
|
|
||||||
size_t longueur_serpent = 10;
|
size_t longueur_serpent = 10;
|
||||||
size_t longueur_pastilles = PASTILLES;
|
size_t longueur_pastilles = PASTILLES;
|
||||||
@ -141,16 +47,43 @@ int main()
|
|||||||
DessinerScene(pastilles,serpent,longueur_serpent);
|
DessinerScene(pastilles,serpent,longueur_serpent);
|
||||||
while(window_on)
|
while(window_on)
|
||||||
{
|
{
|
||||||
ChoisirEcran(0);
|
if(perdu == 1)
|
||||||
Menu();
|
|
||||||
if (ToucheEnAttente() == 1)
|
|
||||||
{
|
{
|
||||||
switch (Touche())
|
PerduGUI();
|
||||||
|
if (ToucheEnAttente() == 1)
|
||||||
{
|
{
|
||||||
case XK_space:
|
switch (Touche())
|
||||||
game_on=1;
|
{
|
||||||
DessinerScene(pastilles,serpent,longueur_serpent);
|
case XK_Return:
|
||||||
break;
|
perdu = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Menu();
|
||||||
|
if (ToucheEnAttente() == 1)
|
||||||
|
{
|
||||||
|
switch (Touche())
|
||||||
|
{
|
||||||
|
case XK_Return :
|
||||||
|
game_on=1;
|
||||||
|
secondes = 0;
|
||||||
|
minutes = 0;
|
||||||
|
score = 0;
|
||||||
|
vitesse = DELTA;
|
||||||
|
longueur_serpent = 10;
|
||||||
|
direction = 0;
|
||||||
|
direction_davant = 0;
|
||||||
|
DessinerScene(pastilles,serpent,longueur_serpent);
|
||||||
|
break;
|
||||||
|
case XK_Escape:
|
||||||
|
free(serpent);
|
||||||
|
free(pastilles);
|
||||||
|
FermerGraphique();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,16 +128,23 @@ int main()
|
|||||||
pause=1;
|
pause=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if(pause == 1)
|
|
||||||
{
|
|
||||||
pause=0;
|
pause=0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case XK_Escape:
|
||||||
|
if(pause == 1)
|
||||||
|
{
|
||||||
|
free(serpent);
|
||||||
|
free(pastilles);
|
||||||
|
FermerGraphique();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(pause==1)
|
if(pause==1)
|
||||||
{
|
{
|
||||||
ChoisirEcran(0);
|
|
||||||
Pause();
|
Pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,6 +166,7 @@ int main()
|
|||||||
|
|
||||||
if (Microsecondes()>suivant)
|
if (Microsecondes()>suivant)
|
||||||
{
|
{
|
||||||
|
serpent = (PIXELS*) realloc(serpent,longueur_serpent * sizeof(PIXELS));
|
||||||
suivant=Microsecondes()+vitesse;
|
suivant=Microsecondes()+vitesse;
|
||||||
AfficherTimerEtScore(&score,minutes,secondes);
|
AfficherTimerEtScore(&score,minutes,secondes);
|
||||||
direction_davant = direction; /* Check si le serpent à le droit de changer de direction */
|
direction_davant = direction; /* Check si le serpent à le droit de changer de direction */
|
||||||
@ -233,10 +174,10 @@ int main()
|
|||||||
valeur_retourne = Serpent(serpent,pastilles,&score,&longueur_serpent,&vitesse,direction);
|
valeur_retourne = Serpent(serpent,pastilles,&score,&longueur_serpent,&vitesse,direction);
|
||||||
if(valeur_retourne == 1)
|
if(valeur_retourne == 1)
|
||||||
{
|
{
|
||||||
serpent = (PIXELS*) realloc(serpent,longueur_serpent * sizeof(PIXELS));
|
|
||||||
}
|
}
|
||||||
else if (valeur_retourne == 2)
|
else if (valeur_retourne == 2)
|
||||||
{
|
{
|
||||||
|
perdu=1;
|
||||||
game_on=0;
|
game_on=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -244,7 +185,8 @@ int main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free(serpent);
|
||||||
|
free(pastilles);
|
||||||
FermerGraphique();
|
FermerGraphique();
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
BIN
prog
BIN
prog
Binary file not shown.
113
scene.c
Normal file
113
scene.c
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
#include <graph.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int ArrondirPixel(int nombre) /* Calcule un arrondi du pixel pour pouvoir respecter la norme des 40 lignes et 60 colonnes */
|
||||||
|
{
|
||||||
|
/* Calcul du reste de la division par 15 */
|
||||||
|
int reste = nombre % 15;
|
||||||
|
|
||||||
|
/* Calcul de l'arrondi au multiple de 15 le plus proche */
|
||||||
|
int arrondi = (reste <= 7) ? nombre - reste : nombre + (15 - reste);
|
||||||
|
|
||||||
|
return arrondi;
|
||||||
|
}
|
||||||
|
|
||||||
|
PIXELS gen_pastille(PIXELS *serpent,PIXELS *pastilles,int longueur_serpent)
|
||||||
|
|
||||||
|
/* nb_pastille = int nombre de pastille voulue , p_pastilles est un pointeur d'un tableau de pixels qui sont des pastilles*/
|
||||||
|
/*-Elles se génèrent à des endroits qui peuvent être les mêmes ou gêner le snake*/
|
||||||
|
{
|
||||||
|
int x_pastille,y_pastille,i;
|
||||||
|
int ok = 0;
|
||||||
|
PIXELS pastille;
|
||||||
|
do{
|
||||||
|
ok = 0;
|
||||||
|
x_pastille= ArrondirPixel(rand()%W_GAME);
|
||||||
|
y_pastille = ArrondirPixel(rand()%H_GAME);
|
||||||
|
for(i=0;i<longueur_serpent;i++)
|
||||||
|
{
|
||||||
|
if(x_pastille == serpent[i].x && y_pastille == serpent[i].y)
|
||||||
|
{
|
||||||
|
ok = 1; /* Check si la pastille se genère sur une coordonné du serpent */
|
||||||
|
}
|
||||||
|
if(x_pastille == pastilles[i].x && y_pastille == pastilles[i].y)
|
||||||
|
{
|
||||||
|
ok = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}while(ok);
|
||||||
|
|
||||||
|
if(x_pastille < DECALEMENT)
|
||||||
|
{
|
||||||
|
x_pastille =+ DECALEMENT;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(y_pastille < DECALEMENT)
|
||||||
|
{
|
||||||
|
y_pastille =+ DECALEMENT;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
pastille.x = x_pastille ;
|
||||||
|
pastille.y = y_pastille ;
|
||||||
|
|
||||||
|
return pastille;
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitialisationDuSerpent(PIXELS *p_serpent) /* L'initialisation du serpent */
|
||||||
|
{
|
||||||
|
int x_millieu = 0, y_millieu = 0 , compteur = 0;
|
||||||
|
x_millieu = T_PIXEL*30; /* 30 = 60 colonnes divisé par 2*/
|
||||||
|
y_millieu = T_PIXEL*20; /* 20 = 40 colonnes divisé par 2*/
|
||||||
|
ChoisirEcran(2);
|
||||||
|
ChargerImage("./images/SnakePart.png",x_millieu,y_millieu,0,0,T_PIXEL,T_PIXEL);
|
||||||
|
|
||||||
|
p_serpent[0].x = x_millieu;
|
||||||
|
p_serpent[0].y = y_millieu;
|
||||||
|
for(compteur=0;compteur<9;compteur++) /*Commence par 1 car p_serpent index 0 initialisées pour la tête et 2 + 2x9 = 10 couples de coordonnées 2D */
|
||||||
|
{
|
||||||
|
p_serpent[compteur+1].x = p_serpent[compteur].x+T_PIXEL;
|
||||||
|
p_serpent[compteur+1].y = p_serpent[compteur].y;
|
||||||
|
|
||||||
|
ChargerImage("./images/SnakePart.png",p_serpent[compteur+1].x,p_serpent[compteur+1].y,0,0,T_PIXEL,T_PIXEL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitialiserPastilles(PIXELS *pastilles, PIXELS *serpent, int longueur_serpent) {
|
||||||
|
int i;
|
||||||
|
|
||||||
|
srand(time(NULL));
|
||||||
|
|
||||||
|
for (i = 0; i < PASTILLES; i++) {
|
||||||
|
pastilles[i] = gen_pastille(serpent,pastilles,longueur_serpent);
|
||||||
|
ChargerImage("./images/PommePastille.png",pastilles[i].x,pastilles[i].y,0,0,T_PIXEL,T_PIXEL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DessinerScene(PIXELS *pastilles, PIXELS *serpent, int longueur_serpent) /* Dessine la scène */
|
||||||
|
{
|
||||||
|
couleur bg;
|
||||||
|
couleur border;
|
||||||
|
ChoisirEcran(2);
|
||||||
|
border=CouleurParComposante(78, 93, 47);
|
||||||
|
bg=CouleurParComposante(171, 204, 104);
|
||||||
|
|
||||||
|
ChoisirCouleurDessin(border);
|
||||||
|
RemplirRectangle(0,0,930,630);
|
||||||
|
|
||||||
|
ChoisirCouleurDessin(bg);
|
||||||
|
RemplirRectangle(0,630,930,650);
|
||||||
|
|
||||||
|
ChoisirCouleurDessin(border);
|
||||||
|
RemplirRectangle(0,650,930,15);
|
||||||
|
|
||||||
|
ChoisirCouleurDessin(bg);
|
||||||
|
RemplirRectangle(T_PIXEL,T_PIXEL,W_GAME,H_GAME);
|
||||||
|
InitialiserPastilles(pastilles,serpent,longueur_serpent);
|
||||||
|
InitialisationDuSerpent(serpent);
|
||||||
|
}
|
10
scene.h
Normal file
10
scene.h
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
#ifndef SCENE_H
|
||||||
|
#define SCENE_H
|
||||||
|
|
||||||
|
void InitialiserPastilles(PIXELS *pastilles, PIXELS *serpent, int longueur_serpent);
|
||||||
|
PIXELS gen_pastille(PIXELS *serpent,PIXELS *pastilles,int longueur_serpent);
|
||||||
|
void DessinerScene(PIXELS *pastilles, PIXELS *serpent, int longueur_serpent);
|
||||||
|
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user