From 1a347114d502f1cc483e162e603cf1a6aafedb29 Mon Sep 17 00:00:00 2001
From: antoinemeyer5 <antoine.meyer54@gmail.com>
Date: Thu, 30 Jun 2022 09:47:34 +0200
Subject: [PATCH] clean gest_event.c et gest_event.h

---
 .../jeu_appren_par_renfo/src/gest_event.c          | 14 ++++++++++----
 .../jeu_appren_par_renfo/src/gest_event.h          |  3 +--
 2 files changed, 11 insertions(+), 6 deletions(-)

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 e6c940d..e5299af 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 9256d7d..3546dba 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
-- 
GitLab