arsa  2.7
framerate.h
Go to the documentation of this file.
1 
2 /*
3 
4  SDL_framerate: framerate manager
5 
6  LGPL (c) A. Schiffler
7 
8  */
9 
10 #ifndef _SDL_framerate_h
11 #define _SDL_framerate_h
12 
13 #include "arsa_begin_code.h"
14 #include "irrlicht.h"
15 //#include "cdx.h"
16 
17 /* --------- Definitions */
18 
19 /* Some rates in Hz */
20 
21 #define FPS_UPPER_LIMIT 200
22 #define FPS_LOWER_LIMIT 1
23 #define FPS_DEFAULT 30
24 
27  struct FPSmanager {
29  {
30  framecount =0;
31  rateticks = 0;
32  lastticks = 0;
33  rate = 0;
34  }
36  float rateticks;
39  } ;
40 
41 
42 
45  extern ARSA_API void ARSACALLCONV SDL_initFramerate(FPSmanager * manager);
46  extern ARSA_API int ARSACALLCONV SDL_setFramerate(FPSmanager * manager, int fps = FPS_DEFAULT );
47  extern ARSA_API int ARSACALLCONV SDL_getFramerate(FPSmanager * manager);
48  extern ARSA_API void ARSACALLCONV SDL_framerateDelay(FPSmanager * manager);
49 
50 /* --- */
51 
52 /* Ends C function definitions when using C++ */
53 
54 
55 #endif /* _SDL_framerate_h */
FPSmanager()
Definition: framerate.h:28
#define FPS_DEFAULT
Definition: framerate.h:23
Main header file of the irrlicht, the only file needed to include.
ARSA_API int ARSACALLCONV SDL_getFramerate(FPSmanager *manager)
irr::u32 lastticks
Definition: framerate.h:37
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:62
ARSA_API void ARSACALLCONV SDL_initFramerate(FPSmanager *manager)
ARSA_API void ARSACALLCONV SDL_framerateDelay(FPSmanager *manager)
ARSA_API int ARSACALLCONV SDL_setFramerate(FPSmanager *manager, int fps=FPS_DEFAULT)
#define ARSA_API
irr::u32 rate
Definition: framerate.h:38
irr::u32 framecount
Definition: framerate.h:35
float rateticks
Definition: framerate.h:36
#define ARSACALLCONV