diff options
Diffstat (limited to 'fps.c')
-rw-r--r-- | fps.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -3,19 +3,18 @@ #include "SDL.h" #include "SDL_opengl.h" -#include "text.h" #include "fps.h" static clock_t start; static GLfloat fps; void -GLPong_FPSInit() { +GLPong_FPSInit(void) { start = SDL_GetTicks(); } INLINE GLfloat -GLPong_FPSCount() { +GLPong_FPSCount(void) { /* 10.0f is the number of frames we let draw before calculating FPS */ fps = 10.0f / (SDL_GetTicks() - start) * 1000; /* 1 sec / 1 millisec == 1000 */ start = SDL_GetTicks(); |