diff options
author | Sven Hesse | 2008-12-28 11:27:09 +0000 |
---|---|---|
committer | Sven Hesse | 2008-12-28 11:27:09 +0000 |
commit | c1f6dcbb5259bcad599351678919a08ccf1211be (patch) | |
tree | fdc5b6422839b719311e81b1cd0768e3f0582bb4 | |
parent | b07ac4d1f7f8d7abcf4d59c6a74dafdcd948a055 (diff) | |
download | scummvm-rg350-c1f6dcbb5259bcad599351678919a08ccf1211be.tar.gz scummvm-rg350-c1f6dcbb5259bcad599351678919a08ccf1211be.tar.bz2 scummvm-rg350-c1f6dcbb5259bcad599351678919a08ccf1211be.zip |
Fixing the semi-transparency
svn-id: r35588
-rw-r--r-- | engines/gob/video_v6.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/gob/video_v6.cpp b/engines/gob/video_v6.cpp index aae5d3ac12..b3db7702aa 100644 --- a/engines/gob/video_v6.cpp +++ b/engines/gob/video_v6.cpp @@ -172,10 +172,14 @@ void Video_v6::shadeRect(SurfaceDesc *dest, int height = bottom - top + 1; int dWidth = dest->getWidth(); byte *vidMem = dest->getVidMem() + dWidth * top + left; - byte sY, sU, sV; + byte sY, sU, sV; _palLUT->getEntry(color, sY, sU, sV); + int shadeY = sY * (16 - strength); + int shadeU = sU * (16 - strength); + int shadeV = sV * (16 - strength); + Graphics::SierraLight *dither = new Graphics::SierraLight(width, _palLUT); @@ -188,8 +192,11 @@ void Video_v6::shadeRect(SurfaceDesc *dest, _palLUT->getEntry(dC, dY, dU, dV); - dY = CLIP<int>(sY + (dY >> 2), 0, 255); - *d++ = dither->dither(dY, sU, sV, j); + dY = CLIP<int>((shadeY + strength * dY) >> 4, 0, 255); + dU = CLIP<int>((shadeU + strength * dU) >> 4, 0, 255); + dV = CLIP<int>((shadeV + strength * dV) >> 4, 0, 255); + + *d++ = dither->dither(dY, dU, dV, j); } dither->nextLine(); |