src/blitter/32bpp_anim.cpp
changeset 7552 56aa62dba204
parent 7170 923946ec324f
child 7553 63d4424de5d7
equal deleted inserted replaced
7551:7e76a6be5873 7552:56aa62dba204
    57 					 *  This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
    57 					 *  This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
    58 					 *  we produce a result the newgrf maker didn't expect ;) */
    58 					 *  we produce a result the newgrf maker didn't expect ;) */
    59 
    59 
    60 					/* Make the current color a bit more black, so it looks like this image is transparent */
    60 					/* Make the current color a bit more black, so it looks like this image is transparent */
    61 					if (src->a != 0) {
    61 					if (src->a != 0) {
    62 						*dst = MakeTransparent(*dst, 75);
    62 						*dst = MakeTransparent(*dst, 192);
    63 						*anim = bp->remap[*anim];
    63 						*anim = bp->remap[*anim];
    64 					}
    64 					}
    65 					break;
    65 					break;
    66 
    66 
    67 				default:
    67 				default:
    88 	anim = this->anim_buf + ((uint32 *)dst - (uint32 *)_screen.dst_ptr);
    88 	anim = this->anim_buf + ((uint32 *)dst - (uint32 *)_screen.dst_ptr);
    89 
    89 
    90 	if (pal == PALETTE_TO_TRANSPARENT) {
    90 	if (pal == PALETTE_TO_TRANSPARENT) {
    91 		do {
    91 		do {
    92 			for (int i = 0; i != width; i++) {
    92 			for (int i = 0; i != width; i++) {
    93 				*udst = MakeTransparent(*udst, 60);
    93 				*udst = MakeTransparent(*udst, 154);
    94 				*anim = 0;
    94 				*anim = 0;
    95 				udst++;
    95 				udst++;
    96 				anim++;
    96 				anim++;
    97 			}
    97 			}
    98 			udst = udst - width + _screen.pitch;
    98 			udst = udst - width + _screen.pitch;