src/industry_cmd.cpp
changeset 7829 88883899c9e6
parent 7815 04deaeb181ab
child 7830 210381b46ae6
equal deleted inserted replaced
7828:b78d1fab57da 7829:88883899c9e6
   297 	DrawGroundSprite(image, pal);
   297 	DrawGroundSprite(image, pal);
   298 
   298 
   299 	/* Add industry on top of the ground? */
   299 	/* Add industry on top of the ground? */
   300 	image = dits->building.sprite;
   300 	image = dits->building.sprite;
   301 	if (image != 0) {
   301 	if (image != 0) {
   302 		if (HASBIT(_transparent_opt, TO_INDUSTRIES)) {
   302 		AddSortableSpriteToDraw(image,
   303 			SETBIT(image, PALETTE_MODIFIER_TRANSPARENT);
   303 			(HASBIT(image, PALETTE_MODIFIER_COLOR) && dits->building.pal == PAL_NONE) ? GENERAL_SPRITE_COLOR(ind->random_color) : dits->building.pal,
   304 			pal = PALETTE_TO_TRANSPARENT;
       
   305 		} else if (HASBIT(image, PALETTE_MODIFIER_COLOR) && dits->building.pal == PAL_NONE) {
       
   306 			pal = GENERAL_SPRITE_COLOR(ind->random_color);
       
   307 		} else {
       
   308 			pal = dits->building.pal;
       
   309 		}
       
   310 
       
   311 		AddSortableSpriteToDraw(image, pal,
       
   312 			ti->x + dits->subtile_x,
   304 			ti->x + dits->subtile_x,
   313 			ti->y + dits->subtile_y,
   305 			ti->y + dits->subtile_y,
   314 			dits->width  + 1,
   306 			dits->width  + 1,
   315 			dits->height + 1,
   307 			dits->height + 1,
   316 			dits->dz,
   308 			dits->dz,
   317 			z);
   309 			z,
       
   310 			HASBIT(_transparent_opt, TO_INDUSTRIES));
   318 
   311 
   319 		if (HASBIT(_transparent_opt, TO_INDUSTRIES)) return;
   312 		if (HASBIT(_transparent_opt, TO_INDUSTRIES)) return;
   320 	}
   313 	}
   321 
   314 
   322 	{
   315 	{