ajout menu mais non fonctionnel

This commit is contained in:
2023-12-21 12:29:12 +01:00
parent 8f26f7027d
commit 6b14cf17e8
11 changed files with 55 additions and 32 deletions

View File

@@ -57,7 +57,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) {
void Controle(int *direction, int last_direction, int *go_on, int *pause) {
int t;
while(ToucheEnAttente()) {
t = Touche();
@@ -86,8 +86,13 @@ void Controle(int *direction, int last_direction, int *go_on) {
*direction = 0;
*go_on = 0;
return;
case XK_p:
*direction = 0;
case XK_space:
if (*pause == 0 ){
*pause == 1;
}else{
*pause = 0;
ChargerImage("../img/PAUSE.png", 400,200,0,0,350,300);
}
}
}
}