[Scummvm-cvs-logs] scummvm master -> a653ae20d59efe4260d3e2febdf4533943027d00

wjp wjp at usecode.org
Fri Aug 16 00:48:06 CEST 2013


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
21314e2389 WINTERMUTE: Fix computation of _renderRect.
a653ae20d5 WINTERMUTE: Fix offset calculation with partial rects when sprites are mirrored.


Commit: 21314e2389dfe4fa7f7cacc94fa2b99421fe4a66
    https://github.com/scummvm/scummvm/commit/21314e2389dfe4fa7f7cacc94fa2b99421fe4a66
Author: Tobia Tesan (tobia.tesan at gmail.com)
Date: 2013-08-15T15:42:58-07:00

Commit Message:
WINTERMUTE: Fix computation of _renderRect.

This reverts the changes in 4cf1d671.
Fixes the "notebook bug" - i.e. the notebook being only partially
drawn - in Dirty Split.

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 0e7e5aa..6681054 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -613,8 +613,8 @@ bool BaseRenderOSystem::setViewport(int left, int top, int right, int bottom) {
 	// TODO: Hopefully this is the same logic that ScummVM uses.
 	rect.left = (int16)(left + _borderLeft);
 	rect.top = (int16)(top + _borderTop);
-	rect.right = (int16)((right - left) * _ratioX);
-	rect.bottom = (int16)((bottom - top) * _ratioY);
+	rect.setWidth((int16)((right - left) * _ratioX));
+	rect.setHeight((int16)((bottom - top) * _ratioY));
 
 	_renderRect = rect;
 	return STATUS_OK;


Commit: a653ae20d59efe4260d3e2febdf4533943027d00
    https://github.com/scummvm/scummvm/commit/a653ae20d59efe4260d3e2febdf4533943027d00
Author: Tobia Tesan (tobia.tesan at gmail.com)
Date: 2013-08-15T15:44:27-07:00

Commit Message:
WINTERMUTE: Fix offset calculation with partial rects when sprites are mirrored.

This fixes the dress bug, aka Rosemary appearing "jigsawed" when passing
over her with the cursor when she is facing east.
See bug #3592907

Changed paths:
    engines/wintermute/graphics/transparent_surface.cpp



diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp
index df6286e..e375322 100644
--- a/engines/wintermute/graphics/transparent_surface.cpp
+++ b/engines/wintermute/graphics/transparent_surface.cpp
@@ -309,7 +309,19 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
 	}
 
 	if (pPartRect) {
-		srcImage.pixels = getBasePtr(pPartRect->left, pPartRect->top);
+
+		int xOffset = pPartRect->left;
+		int yOffset = pPartRect->top;
+
+		if (flipping & FLIP_V) {
+			yOffset = srcImage.h - pPartRect->bottom;
+		}
+
+		if (flipping & FLIP_H) {
+			xOffset = srcImage.w - pPartRect->right;
+		}
+
+		srcImage.pixels = getBasePtr(xOffset, yOffset);
 		srcImage.w = pPartRect->width();
 		srcImage.h = pPartRect->height();
 






More information about the Scummvm-git-logs mailing list