[Scummvm-cvs-logs] scummvm master -> 0aa669cc479e87cf66c7edcf5aed5299f2895bed
wjp
wjp at usecode.org
Fri Aug 16 00:41:50 CEST 2013
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0aa669cc47 WINTERMUTE: Fix (still disabled) modTargetRect logic
Commit: 0aa669cc479e87cf66c7edcf5aed5299f2895bed
https://github.com/scummvm/scummvm/commit/0aa669cc479e87cf66c7edcf5aed5299f2895bed
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-08-15T15:40:28-07:00
Commit Message:
WINTERMUTE: Fix (still disabled) modTargetRect logic
Width and height were computed incorrectly.
Also, the shift by _renderRect is not necessary since that was to compensate
for the coordinate translation done by the original SDL_RenderSetViewport,
which we don't perform.
Changed paths:
engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index b16cf60..0e7e5aa 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -631,15 +631,13 @@ Rect32 BaseRenderOSystem::getViewPort() {
//////////////////////////////////////////////////////////////////////////
void BaseRenderOSystem::modTargetRect(Common::Rect *rect) {
- // FIXME: This is wrong in quite a few ways right now, and ends up
- // breaking the notebook in Dirty Split, so we disable the correction
- // for now, this will need fixing when a game with odd aspect-ratios
- // show up.
return;
- 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));
+ int newWidth = (int16)MathUtil::roundUp(rect->width() * _ratioX);
+ int newHeight = (int16)MathUtil::roundUp(rect->height() * _ratioY);
+ rect->left = (int16)MathUtil::round(rect->left * _ratioX + _borderLeft);
+ rect->top = (int16)MathUtil::round(rect->top * _ratioY + _borderTop);
+ rect->setWidth(newWidth);
+ rect->setHeight(newHeight);
}
//////////////////////////////////////////////////////////////////////////
More information about the Scummvm-git-logs
mailing list