diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-27 00:13:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-27 00:13:42 +0300 |
commit | f09ab3acb547b786289cd78b51577df6ef669fc6 (patch) | |
tree | e610bd6251e6105f117db9ed80481ce223e050ce /src/mobileopenglgraphics.cpp | |
parent | 75a80fdfdce4be53ce7d7b1d02400d3f79a144c0 (diff) | |
download | ManaVerse-f09ab3acb547b786289cd78b51577df6ef669fc6.tar.gz ManaVerse-f09ab3acb547b786289cd78b51577df6ef669fc6.tar.bz2 ManaVerse-f09ab3acb547b786289cd78b51577df6ef669fc6.tar.xz ManaVerse-f09ab3acb547b786289cd78b51577df6ef669fc6.zip |
Fix code style.
Diffstat (limited to 'src/mobileopenglgraphics.cpp')
-rw-r--r-- | src/mobileopenglgraphics.cpp | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/src/mobileopenglgraphics.cpp b/src/mobileopenglgraphics.cpp index 1cc1fae8a..564f9be82 100644 --- a/src/mobileopenglgraphics.cpp +++ b/src/mobileopenglgraphics.cpp @@ -312,7 +312,7 @@ void MobileOpenGLGraphics::drawImagePattern(const Image *const image, const unsigned int vLimit = mMaxVertices * 4; // Draw a set of textured rectangles // if (OpenGLImageHelper::mTextureType == GL_TEXTURE_2D) - { +// { float texX1 = static_cast<float>(srcX) / tw; float texY1 = static_cast<float>(srcY) / th; @@ -346,23 +346,23 @@ void MobileOpenGLGraphics::drawImagePattern(const Image *const image, mFloatTexArray[vp + 10] = texX2; //3 mFloatTexArray[vp + 11] = texY2; - mShortVertArray[vp + 0] = dstX; - mShortVertArray[vp + 1] = dstY; + mShortVertArray[vp + 0] = static_cast<GLshort>(dstX); + mShortVertArray[vp + 1] = static_cast<GLshort>(dstY); - mShortVertArray[vp + 2] = dstX + width; - mShortVertArray[vp + 3] = dstY; + mShortVertArray[vp + 2] = static_cast<GLshort>(dstX + width); + mShortVertArray[vp + 3] = static_cast<GLshort>(dstY); - mShortVertArray[vp + 4] = dstX + width; - mShortVertArray[vp + 5] = dstY + height; + mShortVertArray[vp + 4] = static_cast<GLshort>(dstX + width); + mShortVertArray[vp + 5] = static_cast<GLshort>(dstY + height); - mShortVertArray[vp + 6] = dstX; - mShortVertArray[vp + 7] = dstY; + mShortVertArray[vp + 6] = static_cast<GLshort>(dstX); + mShortVertArray[vp + 7] = static_cast<GLshort>(dstY); - mShortVertArray[vp + 8] = dstX; - mShortVertArray[vp + 9] = dstY + height; + mShortVertArray[vp + 8] = static_cast<GLshort>(dstX); + mShortVertArray[vp + 9] = static_cast<GLshort>(dstY + height); - mShortVertArray[vp + 10] = dstX + width; - mShortVertArray[vp + 11] = dstY + height; + mShortVertArray[vp + 10] = static_cast<GLshort>(dstX + width); + mShortVertArray[vp + 11] = static_cast<GLshort>(dstY + height); vp += 12; if (vp >= vLimit) @@ -374,7 +374,7 @@ void MobileOpenGLGraphics::drawImagePattern(const Image *const image, } if (vp > 0) drawTriangleArrayfs(vp); - } +// } } void MobileOpenGLGraphics::drawRescaledImagePattern(const Image *const image, @@ -411,7 +411,7 @@ void MobileOpenGLGraphics::drawRescaledImagePattern(const Image *const image, // Draw a set of textured rectangles // if (OpenGLImageHelper::mTextureType == GL_TEXTURE_2D) - { +// { const float tw = static_cast<float>(image->mTexWidth); const float th = static_cast<float>(image->mTexHeight); @@ -456,24 +456,23 @@ void MobileOpenGLGraphics::drawRescaledImagePattern(const Image *const image, mFloatTexArray[vp + 10] = texX2; mFloatTexArray[vp + 11] = texY2; + mShortVertArray[vp + 0] = static_cast<GLshort>(dstX); + mShortVertArray[vp + 1] = static_cast<GLshort>(dstY); - mShortVertArray[vp + 0] = dstX; - mShortVertArray[vp + 1] = dstY; + mShortVertArray[vp + 2] = static_cast<GLshort>(dstX + width); + mShortVertArray[vp + 3] = static_cast<GLshort>(dstY); - mShortVertArray[vp + 2] = dstX + width; - mShortVertArray[vp + 3] = dstY; + mShortVertArray[vp + 4] = static_cast<GLshort>(dstX + width); + mShortVertArray[vp + 5] = static_cast<GLshort>(dstY + height); - mShortVertArray[vp + 4] = dstX + width; - mShortVertArray[vp + 5] = dstY + height; + mShortVertArray[vp + 6] = static_cast<GLshort>(dstX); + mShortVertArray[vp + 7] = static_cast<GLshort>(dstY); - mShortVertArray[vp + 6] = dstX; - mShortVertArray[vp + 7] = dstY; + mShortVertArray[vp + 8] = static_cast<GLshort>(dstX); + mShortVertArray[vp + 9] = static_cast<GLshort>(dstY + height); - mShortVertArray[vp + 8] = dstX; - mShortVertArray[vp + 9] = dstY + height; - - mShortVertArray[vp + 10] = dstX + width; - mShortVertArray[vp + 11] = dstY + height; + mShortVertArray[vp + 10] = static_cast<GLshort>(dstX + width); + mShortVertArray[vp + 11] = static_cast<GLshort>(dstY + height); vp += 12; if (vp >= vLimit) @@ -485,7 +484,7 @@ void MobileOpenGLGraphics::drawRescaledImagePattern(const Image *const image, } if (vp > 0) drawTriangleArrayfs(vp); - } +// } } void MobileOpenGLGraphics::drawImagePattern2(GraphicsVertexes *const vert, |