From 57eb62944edee995b6e50177f310b1b28d5a8225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9opold=20Cl=C3=A9ment?= Date: Tue, 6 Jul 2021 17:29:33 +0200 Subject: [PATCH] Correction des types pour les vitesses --- Core/Src/main.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Core/Src/main.c b/Core/Src/main.c index 2f4d16b..a9a9864 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -127,13 +127,17 @@ void f_projectile(void const * argument); /* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */ +enum Camps_missile{ + MISSILE_AMI, MISSILE_ENEMIE +}; + struct Missile { uint16_t x; uint16_t y; - uint8_t dx; - uint8_t dy; - uint8_t equipe; + int8_t dx; + int8_t dy; + enum Camps_missile equipe; uint32_t color; uint8_t damage; uint8_t valide; @@ -144,8 +148,8 @@ struct Joueur // uint32_t et pas 16 car fonction d'affichage bitmap (j'en sais pas plus) uint32_t x; uint32_t y; - uint8_t dx; - uint8_t dy; + int8_t dx; + int8_t dy; uint8_t health; struct Missile missile; }; @@ -158,7 +162,6 @@ struct Monster struct Missile missile; uint8_t type; uint8_t health; - };