diff options
author | Eugene Sandulenko | 2014-06-15 21:15:31 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-06-15 21:15:31 +0300 |
commit | 1ebb8aa6debe7fab79bd058730ac07e360a7b486 (patch) | |
tree | d7024aebdc6f35282c9378663a5512471dfcaa69 /engines/sword25/gfx/image/vectorimagerenderer.cpp | |
parent | c57991ddfa3532fe02d212f20aa583f9a6c60d62 (diff) | |
parent | 5c706dde274753b62c9fc72d5d33b4f42100c11a (diff) | |
download | scummvm-rg350-1ebb8aa6debe7fab79bd058730ac07e360a7b486.tar.gz scummvm-rg350-1ebb8aa6debe7fab79bd058730ac07e360a7b486.tar.bz2 scummvm-rg350-1ebb8aa6debe7fab79bd058730ac07e360a7b486.zip |
Merge pull request #466 from sev-/transparent-surface
COMMON: Move TransparentSurface to common code
Diffstat (limited to 'engines/sword25/gfx/image/vectorimagerenderer.cpp')
-rw-r--r-- | engines/sword25/gfx/image/vectorimagerenderer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/sword25/gfx/image/vectorimagerenderer.cpp b/engines/sword25/gfx/image/vectorimagerenderer.cpp index c7a79fd3c4..c69cb497c1 100644 --- a/engines/sword25/gfx/image/vectorimagerenderer.cpp +++ b/engines/sword25/gfx/image/vectorimagerenderer.cpp @@ -52,7 +52,7 @@ void art_rgb_fill_run1(byte *buf, byte r, byte g, byte b, int n) { memset(buf, g, n + n + n + n); } else { uint32 *alt = (uint32 *)buf; - uint32 color = Graphics::ARGBToColor<Graphics::ColorMasks<8888> >(0xff, r, g, b); + uint32 color = Graphics::ARGBToColor<Graphics::ColorMasks<8888> >(r, g, b, 0xff); for (i = 0; i < n; i++) *alt++ = color; @@ -66,22 +66,22 @@ void art_rgb_run_alpha1(byte *buf, byte r, byte g, byte b, int alpha, int n) { for (i = 0; i < n; i++) { #if defined(SCUMM_LITTLE_ENDIAN) v = *buf; + *buf++ = MIN(v + alpha, 0xff); + v = *buf; *buf++ = v + (((b - v) * alpha + 0x80) >> 8); v = *buf; *buf++ = v + (((g - v) * alpha + 0x80) >> 8); v = *buf; *buf++ = v + (((r - v) * alpha + 0x80) >> 8); - v = *buf; - *buf++ = MIN(v + alpha, 0xff); #else v = *buf; - *buf++ = MIN(v + alpha, 0xff); - v = *buf; *buf++ = v + (((r - v) * alpha + 0x80) >> 8); v = *buf; *buf++ = v + (((g - v) * alpha + 0x80) >> 8); v = *buf; *buf++ = v + (((b - v) * alpha + 0x80) >> 8); + v = *buf; + *buf++ = MIN(v + alpha, 0xff); #endif } } |