Skip to content
Snippets Groups Projects
Commit 09bd7cbf authored by belkhiritaha's avatar belkhiritaha
Browse files

changement UPDATETIME

parent 6d64db04
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@
#define STRONG 3
#define SPREAD 4
#define UPDATETIME 5
#define UPDATETIME 10
typedef struct fire{
......
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment