summaryrefslogtreecommitdiff
path: root/src/sdl2gfx/SDL2_framerate.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-07 19:11:20 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-07 19:11:20 +0300
commit6996022cc1ba75263f20a02ab0bedb10fc3ef5a5 (patch)
tree2c60440fc20e3e5d2aa32090678658575dcb9087 /src/sdl2gfx/SDL2_framerate.h
parent36fae1134ffed13651c09f2f26c937482b96977f (diff)
downloadManaVerse-6996022cc1ba75263f20a02ab0bedb10fc3ef5a5.tar.gz
ManaVerse-6996022cc1ba75263f20a02ab0bedb10fc3ef5a5.tar.bz2
ManaVerse-6996022cc1ba75263f20a02ab0bedb10fc3ef5a5.tar.xz
ManaVerse-6996022cc1ba75263f20a02ab0bedb10fc3ef5a5.zip
Fix some style issues in sdl2gfx.
Diffstat (limited to 'src/sdl2gfx/SDL2_framerate.h')
-rw-r--r--src/sdl2gfx/SDL2_framerate.h83
1 files changed, 43 insertions, 40 deletions
diff --git a/src/sdl2gfx/SDL2_framerate.h b/src/sdl2gfx/SDL2_framerate.h
index f08321140..add1b28c9 100644
--- a/src/sdl2gfx/SDL2_framerate.h
+++ b/src/sdl2gfx/SDL2_framerate.h
@@ -34,10 +34,11 @@ Changed for ManaPlus (C) 2013-2017 ManaPlus developers
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
- /* --- */
+ /* --- */
#include "localconsts.h"
@@ -46,35 +47,36 @@ PRAGMA48(GCC diagnostic ignored "-Wshadow")
#include <SDL.h>
PRAGMA48(GCC diagnostic pop)
- /* --------- Definitions */
-
- /*!
- \brief Highest possible rate supported by framerate controller in Hz (1/s).
- */
-#define FPS_UPPER_LIMIT 200
-
- /*!
- \brief Lowest possible rate supported by framerate controller in Hz (1/s).
- */
-#define FPS_LOWER_LIMIT 1
-
- /*!
- \brief Default rate of framerate controller in Hz (1/s).
- */
-#define FPS_DEFAULT 30
-
- /*!
- \brief Structure holding the state and timing information of the framerate controller.
- */
- typedef struct {
- Uint32 framecount;
- float rateticks;
- Uint32 baseticks;
- Uint32 lastticks;
- Uint32 rate;
- } FPSmanager;
-
- /* ---- Function Prototypes */
+ /* --------- Definitions */
+
+ /*!
+ \brief Highest possible rate supported by framerate controller in Hz (1/s).
+ */
+#define FPS_UPPER_LIMIT 200
+
+ /*!
+ \brief Lowest possible rate supported by framerate controller in Hz (1/s).
+ */
+#define FPS_LOWER_LIMIT 1
+
+ /*!
+ \brief Default rate of framerate controller in Hz (1/s).
+ */
+#define FPS_DEFAULT 30
+
+ /*!
+ \brief Structure holding the state and timing information of the framerate controller.
+ */
+ typedef struct
+ {
+ Uint32 framecount;
+ float rateticks;
+ Uint32 baseticks;
+ Uint32 lastticks;
+ Uint32 rate;
+ } FPSmanager;
+
+ /* ---- Function Prototypes */
#ifdef _MSC_VER
# if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT)
@@ -89,19 +91,20 @@ PRAGMA48(GCC diagnostic pop)
# define SDL2_FRAMERATE_SCOPE extern
#endif
- /* Functions return 0 or value for sucess and -1 for error */
+ /* Functions return 0 or value for sucess and -1 for error */
- SDL2_FRAMERATE_SCOPE void SDL_initFramerate(FPSmanager * manager);
- SDL2_FRAMERATE_SCOPE int SDL_setFramerate(FPSmanager * manager, Uint32 rate);
- SDL2_FRAMERATE_SCOPE int SDL_getFramerate(FPSmanager * manager);
- SDL2_FRAMERATE_SCOPE int SDL_getFramecount(FPSmanager * manager);
- SDL2_FRAMERATE_SCOPE Uint32 SDL_framerateDelay(FPSmanager * manager);
+ SDL2_FRAMERATE_SCOPE void SDL_initFramerate(FPSmanager * manager);
+ SDL2_FRAMERATE_SCOPE int SDL_setFramerate(FPSmanager * manager,
+ Uint32 rate);
+ SDL2_FRAMERATE_SCOPE int SDL_getFramerate(FPSmanager * manager);
+ SDL2_FRAMERATE_SCOPE int SDL_getFramecount(FPSmanager * manager);
+ SDL2_FRAMERATE_SCOPE Uint32 SDL_framerateDelay(FPSmanager * manager);
- /* --- */
+ /* --- */
- /* Ends C function definitions when using C++ */
+ /* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
-#endif /* _SDL2_framerate_h */
+#endif /* _SDL2_framerate_h */