(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)
This commit is contained in:
truelight
2007-09-09 21:56:52 +00:00
parent 38ff181ebf
commit 89bdfaacd9
3 changed files with 23 additions and 15 deletions

View File

@@ -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;