aboutsummaryrefslogtreecommitdiff
path: root/graphics/VectorRendererSpec.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-02-01 20:52:53 +0000
committerFilippos Karapetis2009-02-01 20:52:53 +0000
commitf1ebbebd7b8f7aa62256b08d73086df2f6b5cb28 (patch)
tree6a346ebcf6b34603035224ef1a4ad125a35cc623 /graphics/VectorRendererSpec.cpp
parent574a7924df26d9ebb072c6cd582442f4e29a5213 (diff)
downloadscummvm-rg350-f1ebbebd7b8f7aa62256b08d73086df2f6b5cb28.tar.gz
scummvm-rg350-f1ebbebd7b8f7aa62256b08d73086df2f6b5cb28.tar.bz2
scummvm-rg350-f1ebbebd7b8f7aa62256b08d73086df2f6b5cb28.zip
Silenced MSVC warning (MSVC is being silly here...)
svn-id: r36185
Diffstat (limited to 'graphics/VectorRendererSpec.cpp')
-rw-r--r--graphics/VectorRendererSpec.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index ac21203da1..62bd560909 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -393,6 +393,7 @@ inline void VectorRendererSpec<PixelType, PixelFormat>::
blendPixelPtr(PixelType *ptr, PixelType color, uint8 alpha) {
register int idst = *ptr;
register int isrc = color;
+ int rightShift = 8 - PixelFormat::kAlphaBits;
*ptr = (PixelType)(
(PixelFormat::kRedMask & ((idst & PixelFormat::kRedMask) +
@@ -405,7 +406,7 @@ blendPixelPtr(PixelType *ptr, PixelType color, uint8 alpha) {
((int)(((int)(isrc & PixelFormat::kBlueMask) -
(int)(idst & PixelFormat::kBlueMask)) * alpha) >> 8))) |
(PixelFormat::kAlphaMask & ((idst & PixelFormat::kAlphaMask) +
- ((alpha >> (8 - PixelFormat::kAlphaBits)) << PixelFormat::kAlphaShift) -
+ ((alpha >> rightShift) << PixelFormat::kAlphaShift) -
(((int)(idst & PixelFormat::kAlphaMask) * alpha) >> 8))));
}