summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-26 21:08:45 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-26 21:08:45 +0300
commita8acf366d3e943fb636e24b69c8c67152770d2cc (patch)
tree99d51b8b56489fd03f32cd291e8570834954ac90 /src/render
parente2b84bddbb089f43a9c2c3741545378614481a32 (diff)
downloadplus-a8acf366d3e943fb636e24b69c8c67152770d2cc.tar.gz
plus-a8acf366d3e943fb636e24b69c8c67152770d2cc.tar.bz2
plus-a8acf366d3e943fb636e24b69c8c67152770d2cc.tar.xz
plus-a8acf366d3e943fb636e24b69c8c67152770d2cc.zip
Fix code style.
Diffstat (limited to 'src/render')
-rw-r--r--src/render/graphics.h20
-rw-r--r--src/render/graphicsdef.hpp3
-rw-r--r--src/render/imagegraphics.h3
-rw-r--r--src/render/mobileopengl2graphics.cpp21
-rw-r--r--src/render/mobileopenglgraphics.cpp18
-rw-r--r--src/render/modernopenglgraphics.cpp21
-rw-r--r--src/render/normalopenglgraphics.cpp24
-rw-r--r--src/render/nullopenglgraphics.cpp9
-rw-r--r--src/render/opengl/mgl.h6
-rw-r--r--src/render/safeopenglgraphics.cpp3
-rw-r--r--src/render/sdl2softwaregraphics.cpp12
-rw-r--r--src/render/surfacegraphics.h3
12 files changed, 94 insertions, 49 deletions
diff --git a/src/render/graphics.h b/src/render/graphics.h
index 53877361b..52ecce258 100644
--- a/src/render/graphics.h
+++ b/src/render/graphics.h
@@ -213,7 +213,8 @@ class Graphics notfinal
int x, int y) const restrict2 = 0;
virtual void calcTileSDL(ImageVertexes *restrict const vert A_UNUSED,
- int x A_UNUSED, int y A_UNUSED) const restrict2
+ int x A_UNUSED,
+ int y A_UNUSED) const restrict2
{
}
@@ -223,16 +224,20 @@ class Graphics notfinal
virtual void drawTileCollection(const ImageCollection
*restrict const vertCol) restrict2 = 0;
- virtual void calcTileCollection(ImageCollection *restrict const vertCol,
+ virtual void calcTileCollection(ImageCollection *restrict const
+ vertCol,
const Image *restrict const image,
- int x, int y) restrict2 = 0;
+ int x,
+ int y) restrict2 = 0;
virtual void calcWindow(ImageCollection *restrict const vertCol,
const int x, const int y,
const int w, const int h,
- const ImageRect &restrict imgRect) restrict2 = 0;
+ const ImageRect &restrict imgRect)
+ restrict2 = 0;
- virtual void fillRectangle(const Rect &restrict rectangle) restrict2 = 0;
+ virtual void fillRectangle(const Rect &restrict rectangle)
+ restrict2 = 0;
/**
* Updates the screen. This is done by either copying the buffer to the
@@ -240,10 +245,11 @@ class Graphics notfinal
*/
virtual void updateScreen() restrict2 = 0;
+ void setWindowSize(const int width,
#ifdef USE_SDL2
- void setWindowSize(const int width, const int height) restrict2;
+ const int height) restrict2;
#else
- void setWindowSize(const int width, const int height) restrict2 A_CONST;
+ const int height) restrict2 A_CONST;
#endif
/**
diff --git a/src/render/graphicsdef.hpp b/src/render/graphicsdef.hpp
index 3eedd871f..767cb8084 100644
--- a/src/render/graphicsdef.hpp
+++ b/src/render/graphicsdef.hpp
@@ -89,7 +89,8 @@ public:
void calcWindow(ImageCollection *restrict const vertCol,
const int x, const int y,
const int w, const int h,
- const ImageRect &restrict imgRect) restrict2 override final;
+ const ImageRect &restrict imgRect)
+ restrict2 override final;
void drawRectangle(const Rect &restrict rect) restrict2 override final;
diff --git a/src/render/imagegraphics.h b/src/render/imagegraphics.h
index 8928c9a01..21d0735e1 100644
--- a/src/render/imagegraphics.h
+++ b/src/render/imagegraphics.h
@@ -115,7 +115,8 @@ class ImegeGraphics final : public Graphics
int y A_UNUSED) const restrict2 override final
{ }
- void calcTileCollection(ImageCollection *restrict const vertCol A_UNUSED,
+ void calcTileCollection(ImageCollection *restrict const
+ vertCol A_UNUSED,
const Image *restrict const image A_UNUSED,
int x A_UNUSED,
int y A_UNUSED) restrict2 override final
diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp
index 47faa6741..a7d978d0d 100644
--- a/src/render/mobileopengl2graphics.cpp
+++ b/src/render/mobileopengl2graphics.cpp
@@ -405,7 +405,8 @@ void MobileOpenGL2Graphics::drawRescaledImage(const Image *
restrict const image,
int dstX, int dstY,
const int desiredWidth,
- const int desiredHeight) restrict2
+ const int desiredHeight)
+ restrict2
{
if (!image)
return;
@@ -700,7 +701,8 @@ void MobileOpenGL2Graphics::calcTileCollection(ImageCollection *
}
void MobileOpenGL2Graphics::drawTileCollection(const ImageCollection
- *restrict const vertCol) restrict2
+ *restrict const vertCol)
+ restrict2
{
if (!vertCol)
return;
@@ -750,7 +752,8 @@ void MobileOpenGL2Graphics::calcPattern(ImageCollection *restrict const vertCol,
void MobileOpenGL2Graphics::calcTileVertexes(ImageVertexes *
restrict const vert,
const Image *restrict const image,
- int dstX, int dstY) const restrict2
+ int dstX,
+ int dstY) const restrict2
{
calcTileVertexesInline(vert, image, dstX, dstY);
}
@@ -998,7 +1001,8 @@ void MobileOpenGL2Graphics::fillRectangle(const Rect &restrict rect) restrict2
mglDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
-void MobileOpenGL2Graphics::setTexturingAndBlending(const bool enable) restrict2
+void MobileOpenGL2Graphics::setTexturingAndBlending(const bool enable)
+ restrict2
{
if (enable)
{
@@ -1038,9 +1042,12 @@ void MobileOpenGL2Graphics::drawRectangle(const Rect &restrict rect A_UNUSED,
{
}
-void MobileOpenGL2Graphics::drawNet(const int x1, const int y1,
- const int x2, const int y2,
- const int width, const int height) restrict2
+void MobileOpenGL2Graphics::drawNet(const int x1,
+ const int y1,
+ const int x2,
+ const int y2,
+ const int width,
+ const int height) restrict2
{
unsigned int vp = 0;
const unsigned int vLimit = mMaxVertices * 4;
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index 8ce7ddea3..f77bcb843 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -465,8 +465,10 @@ void MobileOpenGLGraphics::drawPattern(const Image *restrict const image,
}
void MobileOpenGLGraphics::drawPatternInline(const Image *restrict const image,
- const int x, const int y,
- const int w, const int h) restrict2
+ const int x,
+ const int y,
+ const int w,
+ const int h) restrict2
{
FUNC_BLOCK("Graphics::drawPattern", 1)
if (!image)
@@ -535,7 +537,8 @@ void MobileOpenGLGraphics::drawRescaledPattern(const Image *
const int x, const int y,
const int w, const int h,
const int scaledWidth,
- const int scaledHeight) restrict2
+ const int scaledHeight)
+ restrict2
{
if (!image)
return;
@@ -640,8 +643,10 @@ inline void MobileOpenGLGraphics::drawVertexes(const
void MobileOpenGLGraphics::calcPattern(ImageVertexes *restrict const vert,
const Image *restrict const image,
- const int x, const int y,
- const int w, const int h) const restrict2
+ const int x,
+ const int y,
+ const int w,
+ const int h) const restrict2
{
calcPatternInline(vert, image, x, y, w, h);
}
@@ -1220,7 +1225,8 @@ inline void MobileOpenGLGraphics::drawTriangleArrayfs(const int size) restrict2
mglDrawArrays(GL_TRIANGLES, 0, size / 2);
}
-inline void MobileOpenGLGraphics::drawTriangleArrayfsCached(const int size) restrict2
+inline void MobileOpenGLGraphics::drawTriangleArrayfsCached(const int size)
+ restrict2
{
glVertexPointer(2, GL_SHORT, 0, mShortVertArrayCached);
glTexCoordPointer(2, GL_FLOAT, 0, mFloatTexArrayCached);
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp
index f8e9e51f5..5d49695fa 100644
--- a/src/render/modernopenglgraphics.cpp
+++ b/src/render/modernopenglgraphics.cpp
@@ -377,7 +377,8 @@ void ModernOpenGLGraphics::testDraw() restrict2
void ModernOpenGLGraphics::drawImageCached(const Image *restrict const image
A_UNUSED,
- int A_UNUSED x, int y A_UNUSED) restrict2
+ int A_UNUSED x,
+ int y A_UNUSED) restrict2
{
}
@@ -435,8 +436,10 @@ void ModernOpenGLGraphics::drawPattern(const Image *restrict const image,
}
void ModernOpenGLGraphics::drawPatternInline(const Image *restrict const image,
- const int x, const int y,
- const int w, const int h) restrict2
+ const int x,
+ const int y,
+ const int w,
+ const int h) restrict2
{
if (!image)
return;
@@ -499,7 +502,8 @@ void ModernOpenGLGraphics::drawRescaledPattern(const Image *
const int x, const int y,
const int w, const int h,
const int scaledWidth,
- const int scaledHeight) restrict2
+ const int scaledHeight)
+ restrict2
{
if (!image)
return;
@@ -683,7 +687,8 @@ void ModernOpenGLGraphics::calcTileCollection(ImageCollection *
}
void ModernOpenGLGraphics::drawTileCollection(const ImageCollection
- *restrict const vertCol) restrict2
+ *restrict const vertCol)
+ restrict2
{
if (!vertCol)
return;
@@ -713,8 +718,10 @@ void ModernOpenGLGraphics::drawTileCollection(const ImageCollection
void ModernOpenGLGraphics::calcPattern(ImageCollection *restrict const vertCol,
const Image *restrict const image,
- const int x, const int y,
- const int w, const int h) const restrict2
+ const int x,
+ const int y,
+ const int w,
+ const int h) const restrict2
{
if (!vertCol || !image)
return;
diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp
index 36680c1ac..c3945f388 100644
--- a/src/render/normalopenglgraphics.cpp
+++ b/src/render/normalopenglgraphics.cpp
@@ -495,8 +495,10 @@ void NormalOpenGLGraphics::drawImageCached(const Image *restrict const image,
}
void NormalOpenGLGraphics::drawPatternCached(const Image *restrict const image,
- const int x, const int y,
- const int w, const int h) restrict2
+ const int x,
+ const int y,
+ const int w,
+ const int h) restrict2
{
FUNC_BLOCK("Graphics::drawPatternCached", 1)
if (!image)
@@ -638,8 +640,10 @@ void NormalOpenGLGraphics::drawPattern(const Image *restrict const image,
}
void NormalOpenGLGraphics::drawPatternInline(const Image *restrict const image,
- const int x, const int y,
- const int w, const int h) restrict2
+ const int x,
+ const int y,
+ const int w,
+ const int h) restrict2
{
FUNC_BLOCK("Graphics::drawPattern", 1)
if (!image)
@@ -732,7 +736,8 @@ void NormalOpenGLGraphics::drawRescaledPattern(const Image *
const int x, const int y,
const int w, const int h,
const int scaledWidth,
- const int scaledHeight) restrict2
+ const int scaledHeight)
+ restrict2
{
if (!image)
return;
@@ -905,8 +910,10 @@ inline void NormalOpenGLGraphics::drawVertexes(const
void NormalOpenGLGraphics::calcPattern(ImageVertexes *restrict const vert,
const Image *restrict const image,
- const int x, const int y,
- const int w, const int h) const restrict2
+ const int x,
+ const int y,
+ const int w,
+ const int h) const restrict2
{
calcPatternInline(vert, image, x, y, w, h);
}
@@ -1029,7 +1036,8 @@ void NormalOpenGLGraphics::calcTileCollection(ImageCollection *
}
void NormalOpenGLGraphics::drawTileCollection(const ImageCollection
- *restrict const vertCol) restrict2
+ *restrict const vertCol)
+ restrict2
{
if (!vertCol)
return;
diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp
index bce9360a4..45acf78d9 100644
--- a/src/render/nullopenglgraphics.cpp
+++ b/src/render/nullopenglgraphics.cpp
@@ -923,7 +923,8 @@ void NullOpenGLGraphics::drawTileVertexes(const ImageVertexes *
void NullOpenGLGraphics::calcWindow(ImageCollection *restrict const vertCol,
const int x, const int y,
const int w, const int h,
- const ImageRect &restrict imgRect) restrict2
+ const ImageRect &restrict imgRect)
+ restrict2
{
if (!vertCol)
return;
@@ -1137,7 +1138,8 @@ inline void NullOpenGLGraphics::drawQuadArrayfi(const GLint *restrict const
#endif
}
-inline void NullOpenGLGraphics::drawQuadArrayii(const int size A_UNUSED) restrict2
+inline void NullOpenGLGraphics::drawQuadArrayii(const int size A_UNUSED)
+ restrict2
{
#ifdef DEBUG_DRAW_CALLS
mDrawCalls ++;
@@ -1148,7 +1150,8 @@ inline void NullOpenGLGraphics::drawQuadArrayii(const GLint *restrict const
intVertArray A_UNUSED,
const GLint *restrict const
intTexArray A_UNUSED,
- const int size A_UNUSED) restrict2
+ const int size A_UNUSED)
+ restrict2
{
#ifdef DEBUG_DRAW_CALLS
mDrawCalls ++;
diff --git a/src/render/opengl/mgl.h b/src/render/opengl/mgl.h
index 626e88d13..f34e644d4 100644
--- a/src/render/opengl/mgl.h
+++ b/src/render/opengl/mgl.h
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef RENDER_OPENGLMGL_H
-#define RENDER_OPENGLMGL_H
+#ifndef RENDER_OPENGL_MGL_H
+#define RENDER_OPENGL_MGL_H
#include "main.h"
@@ -35,4 +35,4 @@
#undef defName
#endif // USE_OPENGL
-#endif // RENDER_OPENGLMGL_H
+#endif // RENDER_OPENGL_MGL_H
diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp
index 83ce736ea..a805d31b7 100644
--- a/src/render/safeopenglgraphics.cpp
+++ b/src/render/safeopenglgraphics.cpp
@@ -452,7 +452,8 @@ void SafeOpenGLGraphics::calcPatternInline(ImageVertexes *restrict const vert
const int x A_UNUSED,
const int y A_UNUSED,
const int w A_UNUSED,
- const int h A_UNUSED) const restrict2
+ const int h A_UNUSED)
+ const restrict2
{
}
diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp
index 5e7434e80..0670b6f23 100644
--- a/src/render/sdl2softwaregraphics.cpp
+++ b/src/render/sdl2softwaregraphics.cpp
@@ -298,8 +298,10 @@ void SDL2SoftwareGraphics::drawImageCached(const Image *restrict const image,
}
void SDL2SoftwareGraphics::drawPatternCached(const Image *restrict const image,
- const int x, const int y,
- const int w, const int h) restrict2
+ const int x,
+ const int y,
+ const int w,
+ const int h) restrict2
{
FUNC_BLOCK("Graphics::drawPatternCached", 1)
// Check that preconditions for blitting are met.
@@ -419,8 +421,10 @@ void SDL2SoftwareGraphics::drawPattern(const Image *restrict const image,
}
void SDL2SoftwareGraphics::drawPatternInline(const Image *restrict const image,
- const int x, const int y,
- const int w, const int h) restrict2
+ const int x,
+ const int y,
+ const int w,
+ const int h) restrict2
{
FUNC_BLOCK("Graphics::drawPattern", 1)
// Check that preconditions for blitting are met.
diff --git a/src/render/surfacegraphics.h b/src/render/surfacegraphics.h
index a2071941a..eb41a4b9f 100644
--- a/src/render/surfacegraphics.h
+++ b/src/render/surfacegraphics.h
@@ -117,7 +117,8 @@ class SurfaceGraphics final : public Graphics
int y A_UNUSED) const restrict2 override final
{ }
- void calcTileCollection(ImageCollection *restrict const vertCol A_UNUSED,
+ void calcTileCollection(ImageCollection *restrict const
+ vertCol A_UNUSED,
const Image *restrict const image A_UNUSED,
int x A_UNUSED,
int y A_UNUSED) restrict2 override final