summaryrefslogtreecommitdiff
path: root/src/render/mobileopenglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-04-30 19:52:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-04-30 19:52:52 +0300
commit2c13c60e916768fe09bcfff1d0b568a4c5397a99 (patch)
tree9c1fc71c68c2c7f1b2cb55dd53452f9fee120875 /src/render/mobileopenglgraphics.cpp
parentdc569bbcb4c12a5a400f9e5701e5c1027badadae (diff)
downloadplus-2c13c60e916768fe09bcfff1d0b568a4c5397a99.tar.gz
plus-2c13c60e916768fe09bcfff1d0b568a4c5397a99.tar.bz2
plus-2c13c60e916768fe09bcfff1d0b568a4c5397a99.tar.xz
plus-2c13c60e916768fe09bcfff1d0b568a4c5397a99.zip
Fix code style in render.
Diffstat (limited to 'src/render/mobileopenglgraphics.cpp')
-rw-r--r--src/render/mobileopenglgraphics.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index ede89f115..3db76a616 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -53,18 +53,18 @@
tVar[vp + 9] = y2; \
tVar[vp + 10] = x2; \
tVar[vp + 11] = y2; \
- vVar[vp + 0] = dstX; \
- vVar[vp + 1] = dstY; \
- vVar[vp + 2] = dstX + w; \
- vVar[vp + 3] = dstY; \
- vVar[vp + 4] = dstX + w; \
- vVar[vp + 5] = dstY + h; \
- vVar[vp + 6] = dstX; \
- vVar[vp + 7] = dstY; \
- vVar[vp + 8] = dstX; \
- vVar[vp + 9] = dstY + h; \
- vVar[vp + 10] = dstX + w; \
- vVar[vp + 11] = dstY + h;
+ vVar[vp + 0] = static_cast<GLshort>(dstX); \
+ vVar[vp + 1] = static_cast<GLshort>(dstY); \
+ vVar[vp + 2] = static_cast<GLshort>(dstX + w); \
+ vVar[vp + 3] = static_cast<GLshort>(dstY); \
+ vVar[vp + 4] = static_cast<GLshort>(dstX + w); \
+ vVar[vp + 5] = static_cast<GLshort>(dstY + h); \
+ vVar[vp + 6] = static_cast<GLshort>(dstX); \
+ vVar[vp + 7] = static_cast<GLshort>(dstY); \
+ vVar[vp + 8] = static_cast<GLshort>(dstX); \
+ vVar[vp + 9] = static_cast<GLshort>(dstY + h); \
+ vVar[vp + 10] = static_cast<GLshort>(dstX + w); \
+ vVar[vp + 11] = static_cast<GLshort>(dstY + h);
GLuint MobileOpenGLGraphics::mLastImage = 0;
#ifdef DEBUG_DRAW_CALLS
@@ -1163,8 +1163,10 @@ bool MobileOpenGLGraphics::drawNet(const int x1, const int y1,
const GLshort xs2 = static_cast<GLshort>(x2);
const GLshort ys1 = static_cast<GLshort>(y1);
const GLshort ys2 = static_cast<GLshort>(y2);
+ const int16_t width1 = static_cast<int16_t>(width);
+ const int16_t height1 = static_cast<int16_t>(height);
- for (int16_t y = y1; y < y2; y += height)
+ for (int16_t y = static_cast<int16_t>(y1); y < y2; y += height1)
{
mShortVertArray[vp + 0] = xs1;
mShortVertArray[vp + 1] = y;
@@ -1180,7 +1182,7 @@ bool MobileOpenGLGraphics::drawNet(const int x1, const int y1,
}
}
- for (int16_t x = x1; x < x2; x += width)
+ for (int16_t x = static_cast<int16_t>(x1); x < x2; x += width1)
{
mShortVertArray[vp + 0] = x;
mShortVertArray[vp + 1] = ys1;