diff options
author | Einar Johan Trøan Sømåen | 2012-08-11 03:15:51 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-08-11 03:15:51 +0200 |
commit | 5b3389672b6442dde3c32978afe912a07ed40c07 (patch) | |
tree | 20aa8929ea075e53d9606407569af0646d9ae871 /engines | |
parent | 5ecc1fd7f0580a60c6563bfa3fe7ef8f22e212f4 (diff) | |
download | scummvm-rg350-5b3389672b6442dde3c32978afe912a07ed40c07.tar.gz scummvm-rg350-5b3389672b6442dde3c32978afe912a07ed40c07.tar.bz2 scummvm-rg350-5b3389672b6442dde3c32978afe912a07ed40c07.zip |
WINTERMUTE: Silence a few float-cast warnings.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_render_osystem.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp index 9cc94449ff..dbcb329d64 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp @@ -573,23 +573,23 @@ Rect32 BaseRenderOSystem::getViewPort() { //////////////////////////////////////////////////////////////////////////
void BaseRenderOSystem::modTargetRect(Common::Rect *rect) {
- rect->left = MathUtil::round(rect->left * _ratioX + _borderLeft - _renderRect.left);
- rect->top = MathUtil::round(rect->top * _ratioY + _borderTop - _renderRect.top);
- rect->setWidth(MathUtil::roundUp(rect->width() * _ratioX));
- rect->setHeight(MathUtil::roundUp(rect->height() * _ratioY));
+ rect->left = (int16)MathUtil::round(rect->left * _ratioX + _borderLeft - _renderRect.left);
+ rect->top = (int16)MathUtil::round(rect->top * _ratioY + _borderTop - _renderRect.top);
+ rect->setWidth((int16)MathUtil::roundUp(rect->width() * _ratioX));
+ rect->setHeight((int16)MathUtil::roundUp(rect->height() * _ratioY));
}
//////////////////////////////////////////////////////////////////////////
void BaseRenderOSystem::pointFromScreen(Point32 *point) {
- point->x = point->x / _ratioX - _borderLeft / _ratioX + _renderRect.left;
- point->y = point->y / _ratioY - _borderTop / _ratioY + _renderRect.top;
+ point->x = (int16)(point->x / _ratioX - _borderLeft / _ratioX + _renderRect.left);
+ point->y = (int16)(point->y / _ratioY - _borderTop / _ratioY + _renderRect.top);
}
//////////////////////////////////////////////////////////////////////////
void BaseRenderOSystem::pointToScreen(Point32 *point) {
- point->x = MathUtil::roundUp(point->x * _ratioX) + _borderLeft - _renderRect.left;
- point->y = MathUtil::roundUp(point->y * _ratioY) + _borderTop - _renderRect.top;
+ point->x = (int16)MathUtil::roundUp(point->x * _ratioX) + _borderLeft - _renderRect.left;
+ point->y = (int16)MathUtil::roundUp(point->y * _ratioY) + _borderTop - _renderRect.top;
}
//////////////////////////////////////////////////////////////////////////
|