diff options
author | Matthew Hoops | 2011-02-21 20:22:22 -0500 |
---|---|---|
committer | Matthew Hoops | 2011-02-21 20:32:24 -0500 |
commit | 4402153a095e152132655c13a94e1098375fe0d3 (patch) | |
tree | 6cd1c346dacc47d858a04b8fdaad2ff459aec43d | |
parent | ff597ec048fe4383b5f3f5ac3d235bbac9f0c8e2 (diff) | |
download | scummvm-rg350-4402153a095e152132655c13a94e1098375fe0d3.tar.gz scummvm-rg350-4402153a095e152132655c13a94e1098375fe0d3.tar.bz2 scummvm-rg350-4402153a095e152132655c13a94e1098375fe0d3.zip |
SCI: Fix disabled Mac icon pseudo-shading
-rw-r--r-- | engines/sci/graphics/maciconbar.cpp | 6 |
1 files 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; |