2 // C Implementation: type
7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2004
9 // Copyright: See COPYING file that comes with this distribution
13 #include <SDL/SDL_image.h>
21 double get_frame_ratio(base_type* pbase)
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 == 0 ? 1 : frame_ratio);