diff options
author | Torbjörn Andersson | 2011-01-16 08:15:47 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2011-01-16 08:15:47 +0000 |
commit | da4201440282afa825f298874ca7482dfac8d024 (patch) | |
tree | 02f45886ed964d72a8ec888303451d4fc0736112 /engines/sword25/gfx/image | |
parent | 0309f365523cd43d0a8d27f921d70d20a4deae7b (diff) | |
download | scummvm-rg350-da4201440282afa825f298874ca7482dfac8d024.tar.gz scummvm-rg350-da4201440282afa825f298874ca7482dfac8d024.tar.bz2 scummvm-rg350-da4201440282afa825f298874ca7482dfac8d024.zip |
SWORD25: Fix main menu button text colour
In the other cases I've found in the code, the colour components are
stored in the order B, G, R and A. Assume that's the case here too. I
hope that is correct. It doesn't seem to break anything obvious.
svn-id: r55255
Diffstat (limited to 'engines/sword25/gfx/image')
-rw-r--r-- | engines/sword25/gfx/image/renderedimage.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp index fb82f893c6..ce04d79aa3 100644 --- a/engines/sword25/gfx/image/renderedimage.cpp +++ b/engines/sword25/gfx/image/renderedimage.cpp @@ -269,9 +269,9 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe out = outo; in = ino; for (int j = 0; j < img->w; j++) { - int r = in[0]; + int b = in[0]; int g = in[1]; - int b = in[2]; + int r = in[2]; int a = in[3]; in += inStep; @@ -284,39 +284,39 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe out += 4; break; case 255: // Full opacity - if (cr != 255) - *out++ = (r * cr) >> 8; + if (cb != 255) + *out++ = (b * cb) >> 8; else - *out++ = r; + *out++ = b; if (cg != 255) *out++ = (g * cg) >> 8; else *out++ = g; - if (cb != 255) - *out++ = (b * cb) >> 8; + if (cr != 255) + *out++ = (r * cr) >> 8; else - *out++ = b; + *out++ = r; *out++ = a; break; default: // alpha blending - if (cr != 255) - *out += ((r - *out) * a * cr) >> 16; + if (cb != 255) + *out += ((b - *out) * a * cb) >> 16; else - *out += ((r - *out) * a) >> 8; + *out += ((b - *out) * a) >> 8; out++; if (cg != 255) *out += ((g - *out) * a * cg) >> 16; else *out += ((g - *out) * a) >> 8; out++; - if (cb != 255) - *out += ((b - *out) * a * cb) >> 16; + if (cr != 255) + *out += ((r - *out) * a * cr) >> 16; else - *out += ((b - *out) * a) >> 8; + *out += ((r - *out) * a) >> 8; out++; *out = 255; out++; |