From fa4d310fb4d3ccdcf45b2f78e2a23126ec07f006 Mon Sep 17 00:00:00 2001 From: lolbot-iichan Date: Thu, 27 Jun 2019 10:59:35 +0300 Subject: WINTERMUTE: Do not optimize out alpha blits on rotation This fixes defect #10684: 1-pixel width sprite becomes a big rectangle if rotation is applied. Case was originally reproduced with FoxTail game for WME, then reduced to testcase https://github.com/tobiatesan/wme_testsuite/tree/master/time_test/packages --- engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp') diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp index 4e33702504..140988267f 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp @@ -452,7 +452,8 @@ bool BaseSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, Rect32 *newRect, // But no checking is in place for that yet. // Optimize by not doing alpha-blits if we lack alpha - if (_alphaType == Graphics::ALPHA_OPAQUE && !transform._alphaDisable) { + // If angle is not 0, then transparent regions are added near the corners + if (_alphaType == Graphics::ALPHA_OPAQUE && transform._angle == 0) { transform._alphaDisable = true; } -- cgit v1.2.3