JEU Finis manque la notice
This commit is contained in:
@@ -56,22 +56,22 @@ void Collision_Serpent(int pos_x[], int pos_y[], int segment, int murx[], int mu
|
||||
int i;
|
||||
/*Serpent contre coté*/
|
||||
if (pos_x[0] >1160 || pos_x[0]<=0){
|
||||
*go_on=0;
|
||||
*go_on = 0;
|
||||
}
|
||||
/*Serpent contre coté*/
|
||||
if (pos_y[0]<20 || pos_y[0] >=720){
|
||||
*go_on=0;
|
||||
*go_on = 0;
|
||||
}
|
||||
/*Serpent contre Serpent*/
|
||||
for (i = 1; i < segment; i++) {
|
||||
if (pos_x[0] == pos_x[i] && pos_y[0] == pos_y[i]){
|
||||
*go_on = 0;
|
||||
*go_on = 0;
|
||||
}
|
||||
}
|
||||
/*Serpent contre mur*/
|
||||
for(i=0; i<30;i++){
|
||||
if(pos_x[0] == murx[i] && pos_y[0] == mury[i]){
|
||||
*go_on=0;
|
||||
*go_on = 0;
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -79,6 +79,7 @@ void Collision_Serpent(int pos_x[], int pos_y[], int segment, int murx[], int mu
|
||||
|
||||
void Controle(int *direction, int last_direction, int *go_on, int *pause) {
|
||||
int t;
|
||||
int Pause = ChargerSprite("img/PAUSE.png");
|
||||
while(ToucheEnAttente()) {
|
||||
t = Touche();
|
||||
switch(t) {
|
||||
@@ -106,13 +107,17 @@ void Controle(int *direction, int last_direction, int *go_on, int *pause) {
|
||||
*direction = 0;
|
||||
*go_on = 0;
|
||||
return;
|
||||
case XK_space:
|
||||
if (*pause == 0 ){
|
||||
*pause == 1;
|
||||
}else{
|
||||
*pause = 0;
|
||||
ChargerImage("img/PAUSE.png", 400,200,0,0,350,300);
|
||||
}
|
||||
case XK_space :
|
||||
*pause = 1;
|
||||
AfficherSprite(Pause, 400, 720);
|
||||
while(*pause){
|
||||
t = Touche();
|
||||
if (t == XK_space){
|
||||
*pause = 0;
|
||||
ChoisirCouleurDessin(CouleurParNom("black"));
|
||||
RemplirRectangle(200,720,800,200);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user