enlevment des extern 2
This commit is contained in:
parent
8f5e06d9c6
commit
36a53c30c2
Binary file not shown.
@ -9,7 +9,7 @@ extern char timer[6];
|
||||
extern unsigned long int suivant;
|
||||
|
||||
extern int serpent, tete_up, tete_down, tete_right, tete_left;
|
||||
extern int x, y, direction,segment;
|
||||
extern int direction,segment;
|
||||
extern int pos_x[2400], pos_y[2400], old_x[2400], old_y[2400];
|
||||
extern long int vitesse;
|
||||
|
||||
|
@ -11,9 +11,9 @@ unsigned long int suivant;
|
||||
long int vitesse=100000;
|
||||
|
||||
int serpent;
|
||||
int x=500, y=360, direction=4 /*1 : vers le haut, 2 : vers le bas, 3 vers la gauche, 4 vers la droite*/, t, segment=10, i=0;
|
||||
int direction=4 /*1 : vers le haut, 2 : vers le bas, 3 vers la gauche, 4 vers la droite*/, segment=10, i=0;
|
||||
int pos_x[2400], pos_y[2400], old_x[2400], old_y[2400];
|
||||
int tete_up, tete_down, tete_right, tete_left, queue_up, queue_down, queue_left, queue_right;
|
||||
int tete_up, tete_down, tete_right, tete_left;
|
||||
|
||||
int pomme, pommex[5], pommey[5];
|
||||
int fond, Nbr;
|
||||
@ -24,6 +24,7 @@ int go_menu=1;
|
||||
int pause=1;
|
||||
int imageMenu;
|
||||
int go_menu2=1;
|
||||
int t;
|
||||
int t2;
|
||||
int t3;
|
||||
|
||||
@ -60,7 +61,6 @@ int main(){
|
||||
while(go_on){
|
||||
Controle();
|
||||
if (pause==1){
|
||||
printf("test\n");
|
||||
Timer();
|
||||
Score();
|
||||
Collision();
|
||||
|
@ -27,9 +27,9 @@ void DessinerScene(){
|
||||
tete_right = ChargerSprite("IMG/tete_right.png");
|
||||
|
||||
for (i = 0; i < segment; i++){
|
||||
AfficherSprite(serpent, x-(i*20), y);
|
||||
pos_x[i]=x-(i*20);
|
||||
pos_y[i]=y;
|
||||
AfficherSprite(serpent, 500-(i*20), 360);
|
||||
pos_x[i]=500-(i*20);
|
||||
pos_y[i]=360;
|
||||
old_y[i]=pos_y[i];
|
||||
old_x[i]=pos_x[i];
|
||||
}
|
||||
|
@ -12,27 +12,27 @@ void Controle(){
|
||||
case XK_Left :
|
||||
if (direction != 4){
|
||||
direction=3;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case XK_Right:
|
||||
if (direction != 3){
|
||||
direction=4;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case XK_Up:
|
||||
if(direction !=2){
|
||||
direction=1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case XK_Down:
|
||||
if (direction !=1){
|
||||
direction=2;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case XK_Escape:
|
||||
go_on=0;
|
||||
go_menu=0;
|
||||
|
||||
break;
|
||||
case XK_space:
|
||||
if (pause==0){
|
||||
pause=1;
|
||||
@ -41,6 +41,7 @@ void Controle(){
|
||||
ChoisirCouleurDessin(CouleurParComposante(255,255,255));
|
||||
EcrireTexte(500,750,"Jeu en Pause",2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user