diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-24 18:51:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-24 18:51:45 +0300 |
commit | 641b843fd85d096afdd9b171975df91676179f3b (patch) | |
tree | 760c38447030adbdb12361978fa614ccfc9cf9fd /src/render | |
parent | 5a5de75f298bea6f2b861dc1fb9aaf1f3d35d07c (diff) | |
download | manaplus-641b843fd85d096afdd9b171975df91676179f3b.tar.gz manaplus-641b843fd85d096afdd9b171975df91676179f3b.tar.bz2 manaplus-641b843fd85d096afdd9b171975df91676179f3b.tar.xz manaplus-641b843fd85d096afdd9b171975df91676179f3b.zip |
fix code style.
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/graphics.cpp | 10 | ||||
-rw-r--r-- | src/render/graphics.h | 11 | ||||
-rw-r--r-- | src/render/graphicsdef.hpp | 4 | ||||
-rw-r--r-- | src/render/mobileopenglgraphics.cpp | 4 | ||||
-rw-r--r-- | src/render/normalopenglgraphics.cpp | 4 | ||||
-rw-r--r-- | src/render/nullopenglgraphics.cpp | 4 | ||||
-rw-r--r-- | src/render/safeopenglgraphics.cpp | 4 | ||||
-rw-r--r-- | src/render/sdl2graphics.cpp | 4 | ||||
-rw-r--r-- | src/render/sdl2softwaregraphics.cpp | 4 | ||||
-rw-r--r-- | src/render/sdlgraphics.cpp | 4 | ||||
-rw-r--r-- | src/render/surfacegraphics.h | 4 |
11 files changed, 29 insertions, 28 deletions
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp index 17f444eb8..3a423aac2 100644 --- a/src/render/graphics.cpp +++ b/src/render/graphics.cpp @@ -129,7 +129,7 @@ Graphics::Graphics() : Graphics::~Graphics() { - _endDraw(); + endDraw(); #ifdef USE_SDL2 if (mRenderer) { @@ -470,7 +470,7 @@ bool Graphics::setFullscreen(const bool fs) bool Graphics::resizeScreen(const int width, const int height) { #ifdef USE_SDL2 - _endDraw(); + endDraw(); mRect.w = width / mScale; mRect.h = height / mScale; @@ -488,14 +488,14 @@ bool Graphics::resizeScreen(const int width, const int height) // +++ need impliment resize in soft mode #endif // USE_OPENGL - _beginDraw(); + beginDraw(); return true; #else const int prevWidth = mWidth; const int prevHeight = mHeight; - _endDraw(); + endDraw(); const bool success = setVideoMode(width, height, mScale, mBpp, mFullscreen, mHWAccel, mEnableResize, mNoFrame); @@ -511,7 +511,7 @@ bool Graphics::resizeScreen(const int width, const int height) } } - _beginDraw(); + beginDraw(); return success; #endif // USE_SDL2 diff --git a/src/render/graphics.h b/src/render/graphics.h index 75b26a241..49080f4de 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -81,6 +81,7 @@ #endif #include <stack> +#include <string> #include "localconsts.h" @@ -461,21 +462,21 @@ class Graphics * NOTE: You will never need to call this function yourself, unless * you use a Graphics object outside of Guichan. * - * @see _endDraw, Gui::draw + * @see endDraw, Gui::draw */ - virtual void _beginDraw() + virtual void beginDraw() { } /** * Deinitializes drawing. Called by the Gui when a Gui::draw() is done. - * done. It should reset any state changes made by _beginDraw(). + * done. It should reset any state changes made by beginDraw(). * * NOTE: You will never need to call this function yourself, unless * you use a Graphics object outside of Guichan. * - * @see _beginDraw, Gui::draw + * @see beginDraw, Gui::draw */ - virtual void _endDraw() + virtual void endDraw() { } int mWidth; diff --git a/src/render/graphicsdef.hpp b/src/render/graphicsdef.hpp index 80d3c7cf8..b11f88249 100644 --- a/src/render/graphicsdef.hpp +++ b/src/render/graphicsdef.hpp @@ -33,9 +33,9 @@ public: const int x2, const int y2, const int width, const int height) override final; - void _beginDraw(); + void beginDraw(); - void _endDraw(); + void endDraw(); bool pushClipArea(Rect area) override final; diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp index c815d096d..0ad5bfeb7 100644 --- a/src/render/mobileopenglgraphics.cpp +++ b/src/render/mobileopenglgraphics.cpp @@ -839,7 +839,7 @@ void MobileOpenGLGraphics::updateScreen() BLOCK_END("Graphics::updateScreen") } -void MobileOpenGLGraphics::_beginDraw() +void MobileOpenGLGraphics::beginDraw() { glMatrixMode(GL_TEXTURE); glLoadIdentity(); @@ -891,7 +891,7 @@ void MobileOpenGLGraphics::_beginDraw() pushClipArea(Rect(0, 0, mRect.w, mRect.h)); } -void MobileOpenGLGraphics::_endDraw() +void MobileOpenGLGraphics::endDraw() { popClipArea(); } diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp index ebac68e1b..72fbd8a99 100644 --- a/src/render/normalopenglgraphics.cpp +++ b/src/render/normalopenglgraphics.cpp @@ -1100,7 +1100,7 @@ void NormalOpenGLGraphics::updateScreen() BLOCK_END("Graphics::updateScreen") } -void NormalOpenGLGraphics::_beginDraw() +void NormalOpenGLGraphics::beginDraw() { glMatrixMode(GL_TEXTURE); glLoadIdentity(); @@ -1154,7 +1154,7 @@ void NormalOpenGLGraphics::_beginDraw() pushClipArea(Rect(0, 0, w, h)); } -void NormalOpenGLGraphics::_endDraw() +void NormalOpenGLGraphics::endDraw() { popClipArea(); } diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp index 8782c9573..919b43c10 100644 --- a/src/render/nullopenglgraphics.cpp +++ b/src/render/nullopenglgraphics.cpp @@ -919,12 +919,12 @@ void NullOpenGLGraphics::updateScreen() BLOCK_END("Graphics::updateScreen") } -void NullOpenGLGraphics::_beginDraw() +void NullOpenGLGraphics::beginDraw() { pushClipArea(Rect(0, 0, 640, 480)); } -void NullOpenGLGraphics::_endDraw() +void NullOpenGLGraphics::endDraw() { popClipArea(); } diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp index faf2de76e..a191142b5 100644 --- a/src/render/safeopenglgraphics.cpp +++ b/src/render/safeopenglgraphics.cpp @@ -431,7 +431,7 @@ void SafeOpenGLGraphics::calcWindow(ImageCollection *const vertCol A_UNUSED, { } -void SafeOpenGLGraphics::_beginDraw() +void SafeOpenGLGraphics::beginDraw() { glMatrixMode(GL_TEXTURE); glLoadIdentity(); @@ -462,7 +462,7 @@ void SafeOpenGLGraphics::_beginDraw() pushClipArea(Rect(0, 0, mRect.w, mRect.h)); } -void SafeOpenGLGraphics::_endDraw() +void SafeOpenGLGraphics::endDraw() { popClipArea(); } diff --git a/src/render/sdl2graphics.cpp b/src/render/sdl2graphics.cpp index 8c78c8cdd..c93622920 100644 --- a/src/render/sdl2graphics.cpp +++ b/src/render/sdl2graphics.cpp @@ -653,12 +653,12 @@ void SDLGraphics::fillRectangle(const Rect &rectangle) SDL_RenderFillRects(mRenderer, &rect, 1); } -void SDLGraphics::_beginDraw() +void SDLGraphics::beginDraw() { pushClipArea(Rect(0, 0, mRect.w, mRect.h)); } -void SDLGraphics::_endDraw() +void SDLGraphics::endDraw() { popClipArea(); } diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp index 0844cd52e..54cd010a8 100644 --- a/src/render/sdl2softwaregraphics.cpp +++ b/src/render/sdl2softwaregraphics.cpp @@ -1115,12 +1115,12 @@ void SDL2SoftwareGraphics::fillRectangle(const Rect &rectangle) } } -void SDL2SoftwareGraphics::_beginDraw() +void SDL2SoftwareGraphics::beginDraw() { pushClipArea(Rect(0, 0, mRect.w, mRect.h)); } -void SDL2SoftwareGraphics::_endDraw() +void SDL2SoftwareGraphics::endDraw() { popClipArea(); } diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp index 44dcc426d..cbd3f0689 100644 --- a/src/render/sdlgraphics.cpp +++ b/src/render/sdlgraphics.cpp @@ -1112,12 +1112,12 @@ void SDLGraphics::fillRectangle(const Rect& rectangle) } } -void SDLGraphics::_beginDraw() +void SDLGraphics::beginDraw() { pushClipArea(Rect(0, 0, mRect.w, mRect.h)); } -void SDLGraphics::_endDraw() +void SDLGraphics::endDraw() { popClipArea(); } diff --git a/src/render/surfacegraphics.h b/src/render/surfacegraphics.h index 8e85356da..44c2691ae 100644 --- a/src/render/surfacegraphics.h +++ b/src/render/surfacegraphics.h @@ -57,10 +57,10 @@ class SurfaceGraphics final : public Graphics SDL_Surface *getTarget() const { return mTarget; } - void _beginDraw() override final + void beginDraw() override final { } - void _endDraw() override final + void endDraw() override final { } bool pushClipArea(Rect rect A_UNUSED) override final |