Advertisement
Weegee

Untitled

Aug 20th, 2011
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.59 KB | None | 0 0
  1.     unsigned int elapsed = (unsigned int) (clock() / (CLOCKS_PER_SEC / 1000)) - timer->begin;
  2.    
  3.     if (elapsed == timer->elapsed + 1000)
  4.     {
  5.         timer->elapsed = elapsed;
  6.        
  7.         fprintf(debuglog, "[1000] timer->elapsed: %u\n", timer->elapsed);
  8.         fflush(debuglog);
  9.        
  10.         loop_timer(list_win->win_game, timer);
  11.         loop_obstacles(list_win->win_game, list_bu, list_ob, pl);
  12.     }
  13.    
  14.     if (elapsed == timer->elapsed + 500)
  15.     {
  16.         timer->elapsed = elapsed;
  17.        
  18.         fprintf(debuglog, "[500] timer->elapsed: %u\n", timer->elapsed);
  19.         fflush(debuglog);
  20.        
  21.         loop_bullets(list_win->win_game, list_bu, list_ob, pl);
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement