correction dautre warning
This commit is contained in:
parent
f88d0680f6
commit
7afb378891
2
main.h
2
main.h
@ -20,6 +20,6 @@ struct PIXELS {
|
||||
|
||||
typedef struct PIXELS PIXELS;
|
||||
|
||||
PIXELS gen_pastille(PIXELS *serpent,PIXELS *pastilles,PIXELS *obstacle,int longueur_serpent,int longueur_obstacle);
|
||||
PIXELS gen_pastille(PIXELS *serpent,PIXELS *pastilles,PIXELS *obstacle,unsigned long longueur_serpent,unsigned long longueur_obstacle);
|
||||
|
||||
#endif
|
||||
|
16
scene.c
16
scene.c
@ -16,12 +16,13 @@ int ArrondirPixel(int nombre) /* Calcule un arrondi du pixel pour pouvoir respec
|
||||
return arrondi;
|
||||
}
|
||||
|
||||
PIXELS gen_pastille(PIXELS *serpent,PIXELS *pastilles,PIXELS *obstacle,int longueur_serpent,int longueur_obstacle)
|
||||
PIXELS gen_pastille(PIXELS *serpent,PIXELS *pastilles,PIXELS *obstacle,unsigned long longueur_serpent,unsigned long longueur_obstacle)
|
||||
|
||||
/* 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 x_pastille,y_pastille;
|
||||
unsigned long i;
|
||||
int ok = 0;
|
||||
PIXELS pastille;
|
||||
do{
|
||||
@ -71,12 +72,13 @@ PIXELS gen_pastille(PIXELS *serpent,PIXELS *pastilles,PIXELS *obstacle,int longu
|
||||
return pastille;
|
||||
}
|
||||
|
||||
PIXELS gen_obstacle(PIXELS *serpent,PIXELS *pastilles,PIXELS *obstacle,int longueur_serpent,int longueur_pastilles)
|
||||
PIXELS gen_obstacle(PIXELS *serpent,PIXELS *pastilles,PIXELS *obstacle,unsigned long longueur_serpent,unsigned long longueur_pastilles)
|
||||
|
||||
/* 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_obstacles,y_obstacles,i;
|
||||
int x_obstacles,y_obstacles;
|
||||
unsigned long i;
|
||||
int ok = 0;
|
||||
PIXELS obstacles;
|
||||
do{
|
||||
@ -145,7 +147,7 @@ void InitialisationDuSerpent(PIXELS *p_serpent) /* L'initialisation du serpent *
|
||||
}
|
||||
}
|
||||
|
||||
void InitialiserPastilles(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, int longueur_serpent,int longueur_obstacle) {
|
||||
void InitialiserPastilles(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, unsigned long longueur_serpent,unsigned long longueur_obstacle) {
|
||||
int i;
|
||||
|
||||
srand(time(NULL));
|
||||
@ -156,7 +158,7 @@ void InitialiserPastilles(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, i
|
||||
}
|
||||
}
|
||||
|
||||
void InitialiserObstacle(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, int longueur_serpent,int longueur_pastilles) {
|
||||
void InitialiserObstacle(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, unsigned long longueur_serpent,unsigned long longueur_pastilles) {
|
||||
int i;
|
||||
|
||||
srand(time(NULL));
|
||||
@ -167,7 +169,7 @@ void InitialiserObstacle(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, in
|
||||
}
|
||||
}
|
||||
|
||||
void DessinerScene(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, int longueur_serpent,int longueur_pastilles,int longueur_obstacle) /* Dessine la scène */
|
||||
void DessinerScene(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, unsigned long longueur_serpent,unsigned long longueur_pastilles,unsigned long longueur_obstacle) /* Dessine la scène */
|
||||
{
|
||||
couleur bg;
|
||||
couleur border;
|
||||
|
10
scene.h
10
scene.h
@ -3,11 +3,11 @@
|
||||
#ifndef SCENE_H
|
||||
#define SCENE_H
|
||||
|
||||
PIXELS gen_pastille(PIXELS *serpent,PIXELS *pastilles,PIXELS *obstacle,int longueur_serpent,int longueur_obstacle);
|
||||
PIXELS gen_obstacle(PIXELS *serpent,PIXELS *pastilles,PIXELS *obstacle,int longueur_serpent,int longueur_pastilles);
|
||||
PIXELS gen_pastille(PIXELS *serpent,PIXELS *pastilles,PIXELS *obstacle,unsigned long longueur_serpent,unsigned long longueur_obstacle);
|
||||
PIXELS gen_obstacle(PIXELS *serpent,PIXELS *pastilles,PIXELS *obstacle,unsigned long longueur_serpent,unsigned long longueur_pastilles);
|
||||
|
||||
void InitialiserPastilles(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, int longueur_serpent,int longueur_obstacle);
|
||||
void InitialiserPastilles(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, int longueur_serpent,int longueur_obstacle);
|
||||
void DessinerScene(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, int longueur_serpent,int longueur_pastilles,int longueur_obstacle);
|
||||
void InitialiserPastilles(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, unsigned long longueur_serpent,unsigned long longueur_obstacle);
|
||||
void InitialiserPastilles(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, unsigned long longueur_serpent,unsigned long longueur_obstacle);
|
||||
void DessinerScene(PIXELS *pastilles, PIXELS *serpent,PIXELS *obstacle, unsigned long longueur_serpent,unsigned long longueur_pastilles,unsigned long longueur_obstacle);
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user