PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/GFX/Framerate.xs

http://github.com/PerlGameDev/SDL
Unknown | 59 lines | 44 code | 15 blank | 0 comment | 0 complexity | 36c89f726e67153fbf8114612b7288d5 MD5 | raw file
 1#include "EXTERN.h"
 2#include "perl.h"
 3#include "XSUB.h"
 4#include "ppport.h"
 5
 6#ifndef aTHX_
 7#define aTHX_
 8#endif
 9
10#include <SDL.h>
11
12#ifdef HAVE_SDL_GFX_FRAMERATE
13#include <SDL_framerate.h>
14#endif
15
16MODULE = SDL::GFX::Framerate 	PACKAGE = SDL::GFX::Framerate    PREFIX = gfx_frame_
17
18=for documentation
19
20The Following are XS bindings to the SDL_gfx Library
21
22Described here:
23
24See: L<http:/*www.ferzkopp.net/joomla/content/view/19/14/> */
25
26=cut
27
28#ifdef HAVE_SDL_GFX_FRAMERATE
29
30void
31gfx_frame_init(manager)
32	FPSmanager * manager
33	CODE:
34		SDL_initFramerate(manager);
35
36int
37gfx_frame_set(manager, rate)
38	FPSmanager * manager
39	int rate
40	CODE:
41		RETVAL = SDL_setFramerate(manager, rate);
42	OUTPUT:
43		RETVAL
44
45int
46gfx_frame_get(manager)
47	FPSmanager * manager
48	CODE:
49		RETVAL = SDL_getFramerate(manager);
50	OUTPUT:
51		RETVAL
52
53void
54gfx_frame_delay(manager)
55	FPSmanager * manager
56	CODE:
57		SDL_framerateDelay(manager);
58
59#endif