diff --git a/travail_de_groupe/chef_oeuvre/src/fire.h b/travail_de_groupe/chef_oeuvre/src/fire.h index 10ea4c300866e0e8df588e7fefbb8660c5ba6dcc..3b9f9910519243d118443b7c7e65caf3beb9351e 100644 --- a/travail_de_groupe/chef_oeuvre/src/fire.h +++ b/travail_de_groupe/chef_oeuvre/src/fire.h @@ -13,7 +13,7 @@ #define STRONG 3 #define SPREAD 4 -#define UPDATETIME 5 +#define UPDATETIME 10 typedef struct fire{ diff --git a/travail_de_groupe/chef_oeuvre/src/render.c b/travail_de_groupe/chef_oeuvre/src/render.c index 2c3a2adc2620d4ba26d8aae9975a31f138be9d82..b633e43b7b8aa4b64aa6db6fcc7ce424accbeae7 100644 --- a/travail_de_groupe/chef_oeuvre/src/render.c +++ b/travail_de_groupe/chef_oeuvre/src/render.c @@ -285,8 +285,8 @@ void drawTime(){ SDL_RenderCopy(renderer, scoreTexture, NULL, &rect); rect.y += rect.h; char str[10]; - printf("%d\n", (UPDATETIME * 2000 - (int)timer % (UPDATETIME * 2000))/1000); - sprintf(str, "%d", (UPDATETIME * 2000 - (int)timer % (UPDATETIME * 2000))/1000); + printf("%d\n", (UPDATETIME * 1000 - (int)timer % (UPDATETIME * 1000))/1000); + sprintf(str, "%d", (UPDATETIME * 1000 - (int)timer % (UPDATETIME * 1000))/1000); SDL_Color textColor = {237,222,17}; SDL_Surface * surface = TTF_RenderText_Solid(robotoFont, str, textColor); SDL_Texture * texture = SDL_CreateTextureFromSurface(renderer, surface); @@ -393,7 +393,7 @@ void mainLoop(){ drawMenu(); break; case GAME: - if ((int)timer % (UPDATETIME * 2000) < 10){ + if ((int)timer % (UPDATETIME * 1000) < 10){ nextFire(fireList); fireList=spreadFire(fireList); }