aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx/image/renderedimage.cpp
diff options
context:
space:
mode:
authorStrangerke2011-06-29 16:15:41 +0200
committerStrangerke2011-06-29 16:15:41 +0200
commitb0c9c9122fc678074aba30068e5b36d347208e65 (patch)
tree79a99db08ec985f2e5f1e216823b1104d5b753fb /engines/sword25/gfx/image/renderedimage.cpp
parentf2f3124246a77036f843dee2d83ad28084234ebc (diff)
parentc32a3ea0d30336771bab460ecccb58c4614e6294 (diff)
downloadscummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.tar.gz
scummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.tar.bz2
scummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.zip
Merge branch 'master' of github.com:scummvm/scummvm into soltys_wip2
Diffstat (limited to 'engines/sword25/gfx/image/renderedimage.cpp')
-rw-r--r--engines/sword25/gfx/image/renderedimage.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp
index a9c9de4f0c..f5f33d8e02 100644
--- a/engines/sword25/gfx/image/renderedimage.cpp
+++ b/engines/sword25/gfx/image/renderedimage.cpp
@@ -373,17 +373,23 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
default: // alpha blending
#if defined(SCUMM_LITTLE_ENDIAN)
- if (cb != 255)
+ if (cb == 0)
+ *out = 0;
+ else if (cb != 255)
*out += ((b - *out) * a * cb) >> 16;
else
*out += ((b - *out) * a) >> 8;
out++;
- if (cg != 255)
+ if (cg == 0)
+ *out = 0;
+ else if (cg != 255)
*out += ((g - *out) * a * cg) >> 16;
else
*out += ((g - *out) * a) >> 8;
out++;
- if (cr != 255)
+ if (cr == 0)
+ *out = 0;
+ else if (cr != 255)
*out += ((r - *out) * a * cr) >> 16;
else
*out += ((r - *out) * a) >> 8;
@@ -393,17 +399,23 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
#else
*out = 255;
out++;
- if (cr != 255)
+ if (cr == 0)
+ *out = 0;
+ else if (cr != 255)
*out += ((r - *out) * a * cr) >> 16;
else
*out += ((r - *out) * a) >> 8;
out++;
- if (cg != 255)
+ if (cg == 0)
+ *out = 0;
+ else if (cg != 255)
*out += ((g - *out) * a * cg) >> 16;
else
*out += ((g - *out) * a) >> 8;
out++;
- if (cb != 255)
+ if (cb == 0)
+ *out = 0;
+ else if (cb != 255)
*out += ((b - *out) * a * cb) >> 16;
else
*out += ((b - *out) * a) >> 8;