diff options
Diffstat (limited to 'src/guichan')
-rw-r--r-- | src/guichan/color.cpp | 6 | ||||
-rw-r--r-- | src/guichan/sdl/sdlgraphics.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/guichan/color.cpp b/src/guichan/color.cpp index 7cc3b887a..87d110b63 100644 --- a/src/guichan/color.cpp +++ b/src/guichan/color.cpp @@ -106,9 +106,9 @@ namespace gcn Color Color::operator*(const float value) const { - Color result(static_cast<int>(r * value), - static_cast<int>(g * value), - static_cast<int>(b * value), + Color result(static_cast<int>(static_cast<float>(r) * value), + static_cast<int>(static_cast<float>(g) * value), + static_cast<int>(static_cast<float>(b) * value), a); result.r = (result.r > 255 ? 255 : (result.r < 0 ? 0 : result.r)); diff --git a/src/guichan/sdl/sdlgraphics.cpp b/src/guichan/sdl/sdlgraphics.cpp index 952be9093..482642e30 100644 --- a/src/guichan/sdl/sdlgraphics.cpp +++ b/src/guichan/sdl/sdlgraphics.cpp @@ -596,8 +596,8 @@ namespace gcn const ClipRectangle& top = mClipStack.top(); - destination.x += top.xOffset; - destination.y += top.yOffset; + destination.x += static_cast<int16_t>(top.xOffset); + destination.y += static_cast<int16_t>(top.yOffset); SDL_BlitSurface(surface, &source, mTarget, &destination); } |