(svn r13640) -Codechange: make colours behind not fully solid objects less darker for BM_TRANSPARENT (for 32bpp blitters)
This commit is contained in:
@@ -136,15 +136,24 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
|
||||
* 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 */
|
||||
src_px += n;
|
||||
src_n += n;
|
||||
|
||||
do {
|
||||
*dst = MakeTransparent(*dst, 192);
|
||||
*anim = remap[*anim];
|
||||
anim++;
|
||||
dst++;
|
||||
} while (--n != 0);
|
||||
if (src_px->a == 255) {
|
||||
src_px += n;
|
||||
do {
|
||||
*dst = MakeTransparent(*dst, 3, 4);
|
||||
*anim = remap[*anim];
|
||||
anim++;
|
||||
dst++;
|
||||
} while (--n != 0);
|
||||
} else {
|
||||
do {
|
||||
*dst = MakeTransparent(*dst, (256 * 4 - src_px->a), 256 * 4);
|
||||
*anim = remap[*anim];
|
||||
anim++;
|
||||
dst++;
|
||||
src_px++;
|
||||
} while (--n != 0);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user