src/blitter/32bpp_simple.cpp
branchNewGRF_ports
changeset 6870 ca3fd1fbe311
parent 6720 35756db7e577
child 6872 1c4a4a609f85
equal deleted inserted replaced
6869:76282d3b748d 6870:ca3fd1fbe311
    38 					/* TODO -- We make an assumption here that the remap in fact is transparency, not some color.
    38 					/* TODO -- We make an assumption here that the remap in fact is transparency, not some color.
    39 					 *  This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
    39 					 *  This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
    40 					 *  we produce a result the newgrf maker didn't expect ;) */
    40 					 *  we produce a result the newgrf maker didn't expect ;) */
    41 
    41 
    42 					/* Make the current color a bit more black, so it looks like this image is transparent */
    42 					/* Make the current color a bit more black, so it looks like this image is transparent */
    43 					if (src->a != 0) *dst = MakeTransparent(*dst, 75);
    43 					if (src->a != 0) *dst = MakeTransparent(*dst, 192);
    44 					break;
    44 					break;
    45 
    45 
    46 				default:
    46 				default:
    47 					if (src->a != 0) *dst = ComposeColourRGBA(src->r, src->g, src->b, src->a, *dst);
    47 					if (src->a != 0) *dst = ComposeColourRGBA(src->r, src->g, src->b, src->a, *dst);
    48 					break;
    48 					break;
    58 	uint32 *udst = (uint32 *)dst;
    58 	uint32 *udst = (uint32 *)dst;
    59 
    59 
    60 	if (pal == PALETTE_TO_TRANSPARENT) {
    60 	if (pal == PALETTE_TO_TRANSPARENT) {
    61 		do {
    61 		do {
    62 			for (int i = 0; i != width; i++) {
    62 			for (int i = 0; i != width; i++) {
    63 				*udst = MakeTransparent(*udst, 60);
    63 				*udst = MakeTransparent(*udst, 154);
    64 				udst++;
    64 				udst++;
    65 			}
    65 			}
    66 			udst = udst - width + _screen.pitch;
    66 			udst = udst - width + _screen.pitch;
    67 		} while (--height);
    67 		} while (--height);
    68 		return;
    68 		return;