diff options
Diffstat (limited to 'engines/sword25')
-rw-r--r-- | engines/sword25/gfx/image/vectorimage.cpp | 1 | ||||
-rw-r--r-- | engines/sword25/gfx/image/vectorimagerenderer.cpp | 22 |
2 files changed, 9 insertions, 14 deletions
diff --git a/engines/sword25/gfx/image/vectorimage.cpp b/engines/sword25/gfx/image/vectorimage.cpp index 70e162eae2..4cb77692fe 100644 --- a/engines/sword25/gfx/image/vectorimage.cpp +++ b/engines/sword25/gfx/image/vectorimage.cpp @@ -560,7 +560,6 @@ bool VectorImage::parseStyles(uint shapeType, SWFBitStream &bs, uint &numFillBit color = Graphics::ARGBToColor<Graphics::ColorMasks<8888> >(a, r, g, b); - debug(0, "color: %08x", color); _elements.back()._lineStyles.push_back(VectorImageElement::LineStyleType(width, color)); } diff --git a/engines/sword25/gfx/image/vectorimagerenderer.cpp b/engines/sword25/gfx/image/vectorimagerenderer.cpp index 8ba65dd1e1..c784be2dad 100644 --- a/engines/sword25/gfx/image/vectorimagerenderer.cpp +++ b/engines/sword25/gfx/image/vectorimagerenderer.cpp @@ -44,8 +44,7 @@ namespace Sword25 { -void -art_rgb_fill_run1(art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int n) { +void art_rgb_fill_run1(art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int n) { int i; if (r == g && g == b && r == 255) { @@ -53,25 +52,25 @@ art_rgb_fill_run1(art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int n) { } else { uint32 *alt = (uint32 *)buf; uint32 color = Graphics::ARGBToColor<Graphics::ColorMasks<8888> >(0xff, r, g, b); + for (i = 0; i < n; i++) *alt++ = color; } } -void -art_rgb_run_alpha1(art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int alpha, int n) { +void art_rgb_run_alpha1(art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int alpha, int n) { int i; int v; for (i = 0; i < n; i++) { v = *buf; + *buf++ = v + (((alpha - v) * alpha + 0x80) >> 8); + 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++ = v + (((alpha - v) * alpha + 0x80) >> 8); } } @@ -85,8 +84,7 @@ struct _ArtRgbSVPAlphaData { int x0, x1; }; -static void -art_rgb_svp_alpha_callback1(void *callback_data, int y, +static void art_rgb_svp_alpha_callback1(void *callback_data, int y, int start, ArtSVPRenderAAStep *steps, int n_steps) { ArtRgbSVPAlphaData *data = (ArtRgbSVPAlphaData *)callback_data; art_u8 *linebuf; @@ -140,8 +138,7 @@ art_rgb_svp_alpha_callback1(void *callback_data, int y, data->buf += data->rowstride; } -static void -art_rgb_svp_alpha_opaque_callback1(void *callback_data, int y, +static void art_rgb_svp_alpha_opaque_callback1(void *callback_data, int y, int start, ArtSVPRenderAAStep *steps, int n_steps) { ArtRgbSVPAlphaData *data = (ArtRgbSVPAlphaData *)callback_data; @@ -212,8 +209,7 @@ art_rgb_svp_alpha_opaque_callback1(void *callback_data, int y, data->buf += data->rowstride; } -void -art_rgb_svp_alpha1(const ArtSVP *svp, +void art_rgb_svp_alpha1(const ArtSVP *svp, int x0, int y0, int x1, int y1, uint32 color, art_u8 *buf, int rowstride, @@ -290,7 +286,7 @@ void VectorImage::render(int width, int height) { ArtSVP *svp1 = art_svp_from_vpath(vec); - + if (_elements[j].getPathInfo(i).getFillStyle0()) { int color1 = _elements[j].getFillStyleColor(_elements[j].getPathInfo(i).getFillStyle0() - 1); art_rgb_svp_alpha1(svp1, 0, 0, width, height, color1, _pixelData, width * 4, NULL); |