diff --git a/travail_de_groupe/jeu_appren_par_renfo/src/gest_event.c b/travail_de_groupe/jeu_appren_par_renfo/src/gest_event.c index e6c940ddc4cfe9723cb68b8ea7128ba289f4856c..e5299afa87faae35dcc1eb97927c6f1d1d686861 100644 --- a/travail_de_groupe/jeu_appren_par_renfo/src/gest_event.c +++ b/travail_de_groupe/jeu_appren_par_renfo/src/gest_event.c @@ -53,6 +53,7 @@ void gestGame() break; case SDL_MOUSEMOTION: + // mouvement de caméra if (event.motion.xrel > 0) { player.angle += 0.01; @@ -105,9 +106,12 @@ void gestGame() continue; case SDLK_h: - if(showHub == 0){ + if (showHub == 0) + { showHub = 1; - }else{ + } + else + { showHub = 0; } @@ -141,10 +145,12 @@ void gestGame() case SDL_MOUSEBUTTONDOWN: if (event.button.button == SDL_BUTTON_LEFT) { - if (player.isHitting){ + if (player.isHitting) + { player.isHitting = 0; } - else { + else + { player.isHitting = 1; } } diff --git a/travail_de_groupe/jeu_appren_par_renfo/src/gest_event.h b/travail_de_groupe/jeu_appren_par_renfo/src/gest_event.h index 9256d7dd965c715db4fa68367bbcd0e589793475..3546dba53048f3d5fc2e00ee3e7de16814ab680f 100644 --- a/travail_de_groupe/jeu_appren_par_renfo/src/gest_event.h +++ b/travail_de_groupe/jeu_appren_par_renfo/src/gest_event.h @@ -1,7 +1,6 @@ #ifndef _GEST_EVENT_H_ #define _GEST_EVENT_H_ - #include "main.h" #include "render.h" @@ -12,4 +11,4 @@ extern int Keys[NB_KEYS]; void *EventLoop(void *arg); void initKeys(); -#endif \ No newline at end of file +#endif \ No newline at end of file