[Scummvm-cvs-logs] SF.net SVN: scummvm:[36252] scummvm/branches/branch-0-13-0/graphics/ VectorRendererSpec.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Feb 8 22:44:45 CET 2009
Revision: 36252
http://scummvm.svn.sourceforge.net/scummvm/?rev=36252&view=rev
Author: thebluegr
Date: 2009-02-08 21:44:45 +0000 (Sun, 08 Feb 2009)
Log Message:
-----------
Backport of commit #36185, to fix compilation with MSVC
Modified Paths:
--------------
scummvm/branches/branch-0-13-0/graphics/VectorRendererSpec.cpp
Modified: scummvm/branches/branch-0-13-0/graphics/VectorRendererSpec.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/graphics/VectorRendererSpec.cpp 2009-02-08 21:36:43 UTC (rev 36251)
+++ scummvm/branches/branch-0-13-0/graphics/VectorRendererSpec.cpp 2009-02-08 21:44:45 UTC (rev 36252)
@@ -395,6 +395,7 @@
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) +
@@ -407,7 +408,7 @@
((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))));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list