From fcf1da7a161c3e18d393a9b998effc6aa1c366b9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 13 Sep 2013 19:10:50 +0300 Subject: fix code style. --- src/render/graphics.h | 6 +++--- src/render/mobileopenglgraphics.h | 6 +++--- src/render/normalopenglgraphics.h | 6 +++--- src/render/nullopenglgraphics.h | 6 +++--- src/render/renderers.h | 2 +- src/render/rendererslistsdl.h | 6 ++++-- src/render/rendererslistsdl2.h | 6 ++++-- src/render/safeopenglgraphics.h | 6 +++--- src/render/sdl2graphics.h | 6 +++--- src/render/sdl2softwaregraphics.cpp | 12 ++++++------ src/render/sdl2softwaregraphics.h | 6 +++--- src/render/sdlgraphics.h | 6 +++--- src/render/surfacegraphics.h | 6 +++--- 13 files changed, 42 insertions(+), 38 deletions(-) (limited to 'src/render') diff --git a/src/render/graphics.h b/src/render/graphics.h index 3d6a9fa62..16cce7ae6 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef GRAPHICS_H -#define GRAPHICS_H +#ifndef RENDER_GRAPHICS_H +#define RENDER_GRAPHICS_H #include "SDL.h" @@ -431,4 +431,4 @@ class Graphics : public gcn::Graphics extern Graphics *mainGraphics; -#endif // GRAPHICS_H +#endif // RENDER_GRAPHICS_H diff --git a/src/render/mobileopenglgraphics.h b/src/render/mobileopenglgraphics.h index 1597d3bd9..75b1b3371 100644 --- a/src/render/mobileopenglgraphics.h +++ b/src/render/mobileopenglgraphics.h @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef MOBILEOPENGLGRAPHICS_H -#define MOBILEOPENGLGRAPHICS_H +#ifndef RENDER_MOBILEOPENGLGRAPHICS_H +#define RENDER_MOBILEOPENGLGRAPHICS_H #include "main.h" #ifdef USE_OPENGL @@ -229,4 +229,4 @@ class MobileOpenGLGraphics final : public Graphics }; #endif -#endif // MOBILEOPENGLGRAPHICS_H +#endif // RENDER_MOBILEOPENGLGRAPHICS_H diff --git a/src/render/normalopenglgraphics.h b/src/render/normalopenglgraphics.h index 2b489c985..737cb9718 100644 --- a/src/render/normalopenglgraphics.h +++ b/src/render/normalopenglgraphics.h @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef NORMALOPENGLGRAPHICS_H -#define NORMALOPENGLGRAPHICS_H +#ifndef RENDER_NORMALOPENGLGRAPHICS_H +#define RENDER_NORMALOPENGLGRAPHICS_H #include "main.h" #if defined USE_OPENGL && !defined ANDROID @@ -241,4 +241,4 @@ class NormalOpenGLGraphics final : public Graphics }; #endif -#endif // NORMALOPENGLGRAPHICS_H +#endif // RENDER_NORMALOPENGLGRAPHICS_H diff --git a/src/render/nullopenglgraphics.h b/src/render/nullopenglgraphics.h index 856b646bc..0f27590be 100644 --- a/src/render/nullopenglgraphics.h +++ b/src/render/nullopenglgraphics.h @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef NULLOPENGLGRAPHICS_H -#define NULLOPENGLGRAPHICS_H +#ifndef RENDER_NULLOPENGLGRAPHICS_H +#define RENDER_NULLOPENGLGRAPHICS_H #include "main.h" #if defined USE_OPENGL @@ -236,4 +236,4 @@ class NullOpenGLGraphics final : public Graphics }; #endif -#endif // NULLOPENGLGRAPHICS_H +#endif // RENDER_NULLOPENGLGRAPHICS_H diff --git a/src/render/renderers.h b/src/render/renderers.h index c49ca81c4..2a6af27d2 100644 --- a/src/render/renderers.h +++ b/src/render/renderers.h @@ -31,7 +31,7 @@ enum RenderType RENDER_GLES_OPENGL = 3, RENDER_SDL2_DEFAULT = 4, RENDER_NULL = 5, - RENDER_LAST, + RENDER_LAST }; RenderType intToRenderType(const int mode); diff --git a/src/render/rendererslistsdl.h b/src/render/rendererslistsdl.h index aa68eeb6b..ed808485b 100644 --- a/src/render/rendererslistsdl.h +++ b/src/render/rendererslistsdl.h @@ -18,8 +18,6 @@ * along with this program. If not, see . */ -#include "utils/gettext.h" - #ifndef RENDER_RENDERERSLISTSDL_H #define RENDER_RENDERERSLISTSDL_H @@ -28,6 +26,10 @@ #else // USE_SDL2 +#include "utils/gettext.h" + +#include "render/renderers.h" + #ifdef USE_OPENGL #ifdef ANDROID // defined OPENGL ANDROID diff --git a/src/render/rendererslistsdl2.h b/src/render/rendererslistsdl2.h index 966b53726..10c5d80f3 100644 --- a/src/render/rendererslistsdl2.h +++ b/src/render/rendererslistsdl2.h @@ -18,11 +18,13 @@ * along with this program. If not, see . */ -#include "utils/gettext.h" - #ifndef RENDER_RENDERERSLISTSDL2_H #define RENDER_RENDERERSLISTSDL2_H +#include "utils/gettext.h" + +#include "render/renderers.h" + #ifdef USE_SDL2 #ifdef USE_OPENGL diff --git a/src/render/safeopenglgraphics.h b/src/render/safeopenglgraphics.h index 2c31bb696..93f67d75e 100644 --- a/src/render/safeopenglgraphics.h +++ b/src/render/safeopenglgraphics.h @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef SAFEOPENGLGRAPHICS_H -#define SAFEOPENGLGRAPHICS_H +#ifndef RENDER_SAFEOPENGLGRAPHICS_H +#define RENDER_SAFEOPENGLGRAPHICS_H #include "main.h" #if defined USE_OPENGL && !defined ANDROID @@ -180,4 +180,4 @@ class SafeOpenGLGraphics final : public Graphics }; #endif -#endif // SAFEOPENGLGRAPHICS_H +#endif // RENDER_SAFEOPENGLGRAPHICS_H diff --git a/src/render/sdl2graphics.h b/src/render/sdl2graphics.h index 383e93540..e53719049 100644 --- a/src/render/sdl2graphics.h +++ b/src/render/sdl2graphics.h @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef SDL2GRAPHICS_H -#define SDL2GRAPHICS_H +#ifndef RENDER_SDL2GRAPHICS_H +#define RENDER_SDL2GRAPHICS_H #ifdef USE_SDL2 @@ -144,4 +144,4 @@ class SDLGraphics : public Graphics }; #endif // USE_SDL2 -#endif // SDL2GRAPHICS_H +#endif // RENDER_SDL2GRAPHICS_H diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp index ac9f962ac..c1df5b3d0 100644 --- a/src/render/sdl2softwaregraphics.cpp +++ b/src/render/sdl2softwaregraphics.cpp @@ -745,8 +745,8 @@ void SDL2SoftwareGraphics::fillRectangle(const gcn::Rectangle &rectangle) case 2: for (y = y1; y < y2; y++) { - uint8_t *const p0 = static_cast(mSurface->pixels) - + y * mSurface->pitch; + uint8_t *const p0 = static_cast( + mSurface->pixels) + y * mSurface->pitch; for (x = x1; x < x2; x++) { uint8_t *const p = p0 + x * 2; @@ -766,8 +766,8 @@ void SDL2SoftwareGraphics::fillRectangle(const gcn::Rectangle &rectangle) for (y = y1; y < y2; y++) { - uint8_t *const p0 = static_cast(mSurface->pixels) - + y * mSurface->pitch; + uint8_t *const p0 = static_cast( + mSurface->pixels) + y * mSurface->pitch; for (x = x1; x < x2; x++) { uint8_t *const p = p0 + x * 3; @@ -794,8 +794,8 @@ void SDL2SoftwareGraphics::fillRectangle(const gcn::Rectangle &rectangle) for (y = y1; y < y2; y++) { - uint8_t *const p0 = static_cast(mSurface->pixels) - + y * mSurface->pitch; + uint8_t *const p0 = static_cast( + mSurface->pixels) + y * mSurface->pitch; for (x = x1; x < x2; x++) { uint8_t *p = p0 + x * 4; diff --git a/src/render/sdl2softwaregraphics.h b/src/render/sdl2softwaregraphics.h index 9fd53909d..19bf49373 100644 --- a/src/render/sdl2softwaregraphics.h +++ b/src/render/sdl2softwaregraphics.h @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef SDL2SOFTWAREGRAPHICS_H -#define SDL2SOFTWAREGRAPHICS_H +#ifndef RENDER_SDL2SOFTWAREGRAPHICS_H +#define RENDER_SDL2SOFTWAREGRAPHICS_H #ifdef USE_SDL2 @@ -156,4 +156,4 @@ class SDL2SoftwareGraphics : public Graphics }; #endif // USE_SDL2 -#endif // SDL2SOFTWAREGRAPHICS_H +#endif // RENDER_SDL2SOFTWAREGRAPHICS_H diff --git a/src/render/sdlgraphics.h b/src/render/sdlgraphics.h index a7e4be85b..28393d251 100644 --- a/src/render/sdlgraphics.h +++ b/src/render/sdlgraphics.h @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef SDLGRAPHICS_H -#define SDLGRAPHICS_H +#ifndef RENDER_SDLGRAPHICS_H +#define RENDER_SDLGRAPHICS_H #ifdef USE_SDL2 #include "render/sdl2graphics.h" @@ -152,4 +152,4 @@ class SDLGraphics : public Graphics }; #endif // USE_SDL2 -#endif // SDLGRAPHICS_H +#endif // RENDER_SDLGRAPHICS_H diff --git a/src/render/surfacegraphics.h b/src/render/surfacegraphics.h index f5194946a..06dffd4ed 100644 --- a/src/render/surfacegraphics.h +++ b/src/render/surfacegraphics.h @@ -20,8 +20,8 @@ * along with this program. If not, see . */ -#ifndef SURFACEGRAPHICS_H -#define SURFACEGRAPHICS_H +#ifndef RENDER_SURFACEGRAPHICS_H +#define RENDER_SURFACEGRAPHICS_H #include "render/graphics.h" @@ -182,4 +182,4 @@ class SurfaceGraphics : public Graphics SDL_Surface *mTarget; }; -#endif // SURFACEGRAPHICS_H +#endif // RENDER_SURFACEGRAPHICS_H -- cgit v1.2.3-70-g09d2