industry_cmd.c
changeset 2187 2a51f8925eeb
parent 2186 461a2aff3486
child 2260 3e97367f7cbc
equal deleted inserted replaced
2186:461a2aff3486 2187:2a51f8925eeb
   346 	byte z;
   346 	byte z;
   347 	uint32 image, ormod;
   347 	uint32 image, ormod;
   348 
   348 
   349 	/* Pointer to industry */
   349 	/* Pointer to industry */
   350 	ind = GetIndustry(_m[ti->tile].m2);
   350 	ind = GetIndustry(_m[ti->tile].m2);
   351 	ormod = (ind->color_map+0x307)<<16;
   351 	ormod = (ind->color_map+0x307) << PALETTE_SPRITE_START;
   352 
   352 
   353 	/* Retrieve pointer to the draw industry tile struct */
   353 	/* Retrieve pointer to the draw industry tile struct */
   354 	dits = &_industry_draw_tile_data[(ti->map5<<2) | (_m[ti->tile].owner&3)];
   354 	dits = &_industry_draw_tile_data[(ti->map5<<2) | (_m[ti->tile].owner&3)];
   355 
   355 
   356 	image = dits->sprite_1;
   356 	image = dits->sprite_1;
   357 	if (image&0x8000 && (image & 0xFFFF0000) == 0)
   357 	if (image & PALETTE_MODIFIER_COLOR && (image & PALETTE_SPRITE_MASK) == 0)
   358 		image |= ormod;
   358 		image |= ormod;
   359 
   359 
   360 	z = ti->z;
   360 	z = ti->z;
   361 	/* Add bricks below the industry? */
   361 	/* Add bricks below the industry? */
   362 	if (ti->tileh & 0xF) {
   362 	if (ti->tileh & 0xF) {
   369 	}
   369 	}
   370 
   370 
   371 	/* Add industry on top of the ground? */
   371 	/* Add industry on top of the ground? */
   372 	if ((image = dits->sprite_2) != 0) {
   372 	if ((image = dits->sprite_2) != 0) {
   373 
   373 
   374 		if (image&0x8000 && (image & 0xFFFF0000) == 0)
   374 		if (image & PALETTE_MODIFIER_COLOR && (image & PALETTE_SPRITE_MASK) == 0)
   375 			image |= ormod;
   375 			image |= ormod;
   376 
   376 
   377 		if (_display_opt & DO_TRANS_BUILDINGS)
   377 		if (_display_opt & DO_TRANS_BUILDINGS)
   378 			MAKE_TRANSPARENT(image);
   378 			MAKE_TRANSPARENT(image);
   379 
   379