From 4402153a095e152132655c13a94e1098375fe0d3 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 21 Feb 2011 20:22:22 -0500 Subject: SCI: Fix disabled Mac icon pseudo-shading --- engines/sci/graphics/maciconbar.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/sci/graphics/maciconbar.cpp b/engines/sci/graphics/maciconbar.cpp index ea44db654b..f0931e0121 100644 --- a/engines/sci/graphics/maciconbar.cpp +++ b/engines/sci/graphics/maciconbar.cpp @@ -110,10 +110,12 @@ void GfxMacIconBar::drawDisabledImage(Graphics::Surface *surface, const Common:: newSurf.copyFrom(*surface); for (int i = 0; i < newSurf.h; i++) { - int startX = rect.left & 3; + // Start at the next four byte boundary + int startX = 3 - ((rect.left + 3) & 3); + // Start odd rows at two bytes past that (also properly aligned) if ((i + rect.top) & 1) - startX += 2; + startX = (startX + 2) & 3; for (int j = startX; j < newSurf.w; j += 4) *((byte *)newSurf.getBasePtr(j, i)) = 0; -- cgit v1.2.3