From 5b3389672b6442dde3c32978afe912a07ed40c07 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Sat, 11 Aug 2012 03:15:51 +0200 Subject: WINTERMUTE: Silence a few float-cast warnings. --- .../wintermute/base/gfx/osystem/base_render_osystem.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'engines/wintermute/base/gfx/osystem') 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; } ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3