arrays are dynamic now, fixed bugs, more code cleanups
[supertux.git] / src / type.c
1 //
2 // C Implementation: type
3 //
4 // Description:
5 //
6 //
7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2004
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12
13 #include <SDL/SDL_image.h>
14 #include "setup.h"
15 #include "globals.h"
16 #include "screen.h"
17 #include "defines.h"
18 #include "type.h"
19 #include "scene.h"
20
21 double get_frame_ratio(base_type* pbase)
22 {
23   unsigned int cur_time = SDL_GetTicks();
24   double frame_ratio = (float)(cur_time-pbase->updated)/(float)(FRAME_RATE);
25   pbase->updated = cur_time;
26   return frame_ratio;
27 }