File diff r7332:5ef3101b123d → r7333:94b25d4d956c
src/newgrf_house.cpp
Show inline comments
 
@@ -311,16 +311,13 @@ void DrawTileLayout(const TileInfo *ti, 
 
	foreach_draw_tile_seq(dtss, dts->seq) {
 
		if (GB(dtss->image, 0, SPRITE_WIDTH) == 0) continue;
 

	
 
		image = dtss->image + stage;
 
		pal   = dtss->pal;
 

	
 
		if (!HASBIT(image, SPRITE_MODIFIER_OPAQUE) && HASBIT(_transparent_opt, TO_HOUSES)) {
 
			SETBIT(image, PALETTE_MODIFIER_TRANSPARENT);
 
			pal = PALETTE_TO_TRANSPARENT;
 
		} else if (HASBIT(image, PALETTE_MODIFIER_COLOR)) {
 
		if ((HASBIT(image, SPRITE_MODIFIER_OPAQUE) || !HASBIT(_transparent_opt, TO_HOUSES)) && HASBIT(image, PALETTE_MODIFIER_COLOR)) {
 
			if (pal == 0) {
 
				const HouseSpec *hs = GetHouseSpecs(house_id);
 
				if (HASBIT(hs->callback_mask, CBM_BUILDING_COLOUR)) {
 
					uint16 callback = GetHouseCallback(CBID_BUILDING_COLOUR, 0, 0, house_id, GetTownByTile(ti->tile), ti->tile);
 
					if (callback != CALLBACK_FAILED) {
 
						/* If bit 14 is set, we should use a 2cc colour map, else use the callback value. */
 
@@ -336,13 +333,14 @@ void DrawTileLayout(const TileInfo *ti, 
 

	
 
		if ((byte)dtss->delta_z != 0x80) {
 
			AddSortableSpriteToDraw(
 
				image, pal,
 
				ti->x + dtss->delta_x, ti->y + dtss->delta_y,
 
				dtss->size_x, dtss->size_y,
 
				dtss->size_z, ti->z + dtss->delta_z
 
				dtss->size_z, ti->z + dtss->delta_z,
 
				HASBIT(_transparent_opt, TO_HOUSES)
 
			);
 
		} else {
 
			AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y);
 
		}
 
	}
 
}