diff options
author | truelight <truelight@openttd.org> | 2007-09-09 21:56:52 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-09-09 21:56:52 +0000 |
commit | 89bdfaacd93f543a72c37adbb277531f5e39482c (patch) | |
tree | 3628ae991fa6f1b731d7c53d8e543a7a18dada9e /src/blitter/32bpp_simple.cpp | |
parent | 38ff181ebf2e6baa1dfa41828b407bea488c2fa0 (diff) | |
download | openttd-89bdfaacd93f543a72c37adbb277531f5e39482c.tar.xz |
(svn r11076) -Fix: MakeTransparent of 32bpp blitter used 0..100; using 0..255 makes it much faster (frosch)
-Fix: ComposeColourXXX could work a tiny bit faster when using 256, not 255 as value to divide with; downside is that it can give alpha errors (frosch)
Diffstat (limited to 'src/blitter/32bpp_simple.cpp')
-rw-r--r-- | src/blitter/32bpp_simple.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blitter/32bpp_simple.cpp b/src/blitter/32bpp_simple.cpp index 6dbdd2267..b5afea9eb 100644 --- a/src/blitter/32bpp_simple.cpp +++ b/src/blitter/32bpp_simple.cpp @@ -40,7 +40,7 @@ void Blitter_32bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoo * we produce a result the newgrf maker didn't expect ;) */ /* Make the current color a bit more black, so it looks like this image is transparent */ - if (src->a != 0) *dst = MakeTransparent(*dst, 75); + if (src->a != 0) *dst = MakeTransparent(*dst, 192); break; default: @@ -60,7 +60,7 @@ void Blitter_32bppSimple::DrawColorMappingRect(void *dst, int width, int height, if (pal == PALETTE_TO_TRANSPARENT) { do { for (int i = 0; i != width; i++) { - *udst = MakeTransparent(*udst, 60); + *udst = MakeTransparent(*udst, 154); udst++; } udst = udst - width + _screen.pitch; |