Skip to content
Snippets Groups Projects
Commit 8116c58b authored by belkhiritaha's avatar belkhiritaha
Browse files

fix erreur div par 0

parent f4ed01dd
No related branches found
No related tags found
No related merge requests found
......@@ -185,11 +185,6 @@ void drawFire(){
rect.x = (cour->fire).x * CELLSIZE + (screenDimension.w - (MAPSIZE * CELLSIZE)) / 2;
rect.y = (cour->fire).y * CELLSIZE - rect.h/2;
srcRect.w = 15;
srcRect.h =24;
srcRect.x = step + srcRect.w * (SDL_GetTicks()/200 % loop);
srcRect.y= 0;
switch ((cour->fire).state)
{
case SPARKLE:
......@@ -215,6 +210,12 @@ void drawFire(){
default:
break;
}
srcRect.w = 15;
srcRect.h = 24;
srcRect.x = step + srcRect.w * (SDL_GetTicks()/200 % loop);
srcRect.y= 0;
SDL_RenderCopy(renderer, fireTexture, &srcRect, &rect);
cour = cour->next;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment