diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-13 17:51:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-13 17:51:41 +0300 |
commit | e17da4740c510e3b28634b02298b661a151987f0 (patch) | |
tree | e83d868000186a249c946d80aa478b0119eda494 /src | |
parent | d8e20baa960b95c1ca1dfd7b7e6fc457c695d106 (diff) | |
download | manaverse-e17da4740c510e3b28634b02298b661a151987f0.tar.gz manaverse-e17da4740c510e3b28634b02298b661a151987f0.tar.bz2 manaverse-e17da4740c510e3b28634b02298b661a151987f0.tar.xz manaverse-e17da4740c510e3b28634b02298b661a151987f0.zip |
Fix code style.
Diffstat (limited to 'src')
-rw-r--r-- | src/render/graphics.cpp | 1 | ||||
-rw-r--r-- | src/render/mglemu.cpp | 2 | ||||
-rw-r--r-- | src/render/mglemu.h | 14 | ||||
-rw-r--r-- | src/render/mobileopengl2graphics.cpp | 5 | ||||
-rw-r--r-- | src/render/modernopenglgraphics.cpp | 3 | ||||
-rw-r--r-- | src/render/modernopenglgraphics.h | 3 | ||||
-rw-r--r-- | src/render/normalopenglgraphics.cpp | 3 | ||||
-rw-r--r-- | src/resources/resourcemanager.cpp | 32 | ||||
-rw-r--r-- | src/utils/sdlsharedhelper.cpp | 4 |
9 files changed, 39 insertions, 28 deletions
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp index ed613000b..a8dde9626 100644 --- a/src/render/graphics.cpp +++ b/src/render/graphics.cpp @@ -542,7 +542,6 @@ bool Graphics::resizeScreen(const int width, const int height) naclResizeBuffers(mActualWidth, mActualHeight); glViewport(0, 0, mActualWidth, mActualHeight); #endif // USE_OPENGL - } else #endif // __native_client__ diff --git a/src/render/mglemu.cpp b/src/render/mglemu.cpp index 4b46b341b..216d5ab8f 100644 --- a/src/render/mglemu.cpp +++ b/src/render/mglemu.cpp @@ -40,7 +40,7 @@ void APIENTRY emuglTextureSubImage2D(GLuint texture, GLenum target, format, type, pixels); } -void APIENTRY emuglActiveTexture (GLenum texture A_UNUSED) +void APIENTRY emuglActiveTexture(GLenum texture A_UNUSED) { } diff --git a/src/render/mglemu.h b/src/render/mglemu.h index 536a02011..bbe1a121e 100644 --- a/src/render/mglemu.h +++ b/src/render/mglemu.h @@ -24,14 +24,18 @@ #include "render/mgltypes.h" -void APIENTRY emuglTextureSubImage2D(GLuint texture, GLenum target, +void APIENTRY emuglTextureSubImage2D(GLuint texture, + GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, const void *pixels); -void APIENTRY emuglActiveTexture (GLenum texture); +void APIENTRY emuglActiveTexture(GLenum texture); #endif // USE_OPENGL #endif // RENDER_MGLEMU_H diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp index 533945fa1..8fdb43655 100644 --- a/src/render/mobileopengl2graphics.cpp +++ b/src/render/mobileopengl2graphics.cpp @@ -384,7 +384,8 @@ void MobileOpenGL2Graphics::drawImageCached(const Image *const image A_UNUSED, { } -void MobileOpenGL2Graphics::drawPatternCached(const Image *const image A_UNUSED, +void MobileOpenGL2Graphics::drawPatternCached(const Image *const image + A_UNUSED, const int x A_UNUSED, const int y A_UNUSED, const int w A_UNUSED, @@ -436,7 +437,7 @@ void MobileOpenGL2Graphics::drawRescaledImage(const Image *const image, void MobileOpenGL2Graphics::drawPattern(const Image *const image, const int x, const int y, const int w, const int h) -{ +{ drawPatternInline(image, x, y, w, h); } diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp index f9fb6c25f..2c7ecf120 100644 --- a/src/render/modernopenglgraphics.cpp +++ b/src/render/modernopenglgraphics.cpp @@ -1372,4 +1372,5 @@ void ModernOpenGLGraphics::debugBindTexture(const Image *const image A_UNUSED) } #endif -#endif // defined(USE_OPENGL) && !defined(ANDROID) && !defined(__native_client__) +#endif // defined(USE_OPENGL) && !defined(ANDROID) && + // !defined(__native_client__) diff --git a/src/render/modernopenglgraphics.h b/src/render/modernopenglgraphics.h index 5bdb70ea6..03a61858b 100644 --- a/src/render/modernopenglgraphics.h +++ b/src/render/modernopenglgraphics.h @@ -135,6 +135,7 @@ class ModernOpenGLGraphics final : public Graphics #endif FBOInfo mFbo; }; -#endif // defined(USE_OPENGL) && !defined(ANDROID) && !defined(__native_client__) +#endif // defined(USE_OPENGL) && !defined(ANDROID) && + // !defined(__native_client__) #endif // RENDER_MODERNOPENGLGRAPHICS_H diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp index 2c28f4a79..f58e10f92 100644 --- a/src/render/normalopenglgraphics.cpp +++ b/src/render/normalopenglgraphics.cpp @@ -1725,4 +1725,5 @@ void NormalOpenGLGraphics::debugBindTexture(const Image *const image A_UNUSED) } #endif -#endif // defined(USE_OPENGL) && !defined(ANDROID) && !defined(__native_client__) +#endif // defined(USE_OPENGL) && !defined(ANDROID) && + // !defined(__native_client__) diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index bb566d9f4..f625dd971 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -520,7 +520,7 @@ Resource *ResourceManager::get(const std::string &idPath, struct ResourceLoader final { - ResourceManager *manager; + ResourceManager *manager = nullptr; std::string path; ResourceManager::loader fun; @@ -556,7 +556,7 @@ SoundEffect *ResourceManager::getSoundEffect(const std::string &idPath) struct DyedImageLoader final { - ResourceManager *manager; + ResourceManager *manager = nullptr; std::string path; static Resource *load(const void *const v) { @@ -606,9 +606,10 @@ Image *ResourceManager::getImage(const std::string &idPath) struct ImageSetLoader final { - ResourceManager *manager; + ResourceManager *manager = nullptr; std::string path; - int w, h; + int w = 0; + int h = 0; static Resource *load(const void *const v) { if (!v) @@ -640,9 +641,10 @@ ImageSet *ResourceManager::getImageSet(const std::string &imagePath, struct SubImageSetLoader final { - ResourceManager *manager; - Image *parent; - int width, height; + ResourceManager *manager = nullptr; + Image *parent = nullptr; + int width = 0; + int height = 0; static Resource *load(const void *const v) { if (!v) @@ -675,10 +677,12 @@ ImageSet *ResourceManager::getSubImageSet(Image *const parent, struct SubImageLoader final { - ResourceManager *manager; - Image *parent; - int x, y; - int width, height; + ResourceManager *manager = nullptr; + Image *parent = nullptr; + int x = 0; + int y = 0; + int width = 0; + int height = 0; static Resource *load(const void *const v) { if (!v) @@ -714,7 +718,7 @@ Image *ResourceManager::getSubImage(Image *const parent, struct AtlasLoader final { const std::string name; - const StringVect *files; + const StringVect *files = nullptr; static Resource *load(const void *const v) { @@ -738,7 +742,7 @@ Resource *ResourceManager::getAtlas(const std::string &name, struct ShaderLoader final { const std::string name; - const unsigned int type; + const unsigned int type = 0U; static Resource *load(const void *const v) { @@ -763,7 +767,7 @@ struct ShaderProgramLoader final { const std::string vertex; const std::string fragment; - const bool isNewShader; + const bool isNewShader = true; static Resource *load(const void *const v) { diff --git a/src/utils/sdlsharedhelper.cpp b/src/utils/sdlsharedhelper.cpp index 4b69c8d24..7f37f989a 100644 --- a/src/utils/sdlsharedhelper.cpp +++ b/src/utils/sdlsharedhelper.cpp @@ -36,9 +36,9 @@ void SDL::showCursor(const bool show) #ifdef __native_client__ PP_MouseCursor_Type cursor; if (show) - cursor = PP_MOUSECURSOR_TYPE_POINTER; // show default cursor + cursor = PP_MOUSECURSOR_TYPE_POINTER; // show default cursor else - cursor = PP_MOUSECURSOR_TYPE_NONE; // hide cursor + cursor = PP_MOUSECURSOR_TYPE_NONE; // hide cursor pp::MouseCursor::SetCursor( pp::InstanceHandle(PSGetInstanceId()), |