src/newgrf_house.cpp
changeset 9549 41ec95418e84
parent 9523 8a60ed4426b7
child 9574 7ff7285bf59f
equal deleted inserted replaced
9548:eae9545bf02c 9549:41ec95418e84
   328 
   328 
   329 	if (IS_CUSTOM_SPRITE(image)) image += stage;
   329 	if (IS_CUSTOM_SPRITE(image)) image += stage;
   330 
   330 
   331 	if (GB(image, 0, SPRITE_WIDTH) != 0) DrawGroundSprite(image, pal);
   331 	if (GB(image, 0, SPRITE_WIDTH) != 0) DrawGroundSprite(image, pal);
   332 
   332 
   333 	/* End now, if houses are invisible */
       
   334 	if (IsInvisibilitySet(TO_HOUSES)) return;
       
   335 
       
   336 	foreach_draw_tile_seq(dtss, dts->seq) {
   333 	foreach_draw_tile_seq(dtss, dts->seq) {
   337 		if (GB(dtss->image.sprite, 0, SPRITE_WIDTH) == 0) continue;
   334 		if (GB(dtss->image.sprite, 0, SPRITE_WIDTH) == 0) continue;
   338 
   335 
   339 		image = dtss->image.sprite;
   336 		image = dtss->image.sprite;
   340 		pal   = dtss->image.pal;
   337 		pal   = dtss->image.pal;
       
   338 
       
   339 		/* Stop drawing sprite sequence once we meet a sprite that doesn't have to be opaque */
       
   340 		if (IsInvisibilitySet(TO_HOUSES) && !HasBit(image, SPRITE_MODIFIER_OPAQUE)) return;
   341 
   341 
   342 		if (IS_CUSTOM_SPRITE(image)) image += stage;
   342 		if (IS_CUSTOM_SPRITE(image)) image += stage;
   343 
   343 
   344 		if ((HasBit(image, SPRITE_MODIFIER_OPAQUE) || !IsTransparencySet(TO_HOUSES)) && HasBit(image, PALETTE_MODIFIER_COLOR)) {
   344 		if ((HasBit(image, SPRITE_MODIFIER_OPAQUE) || !IsTransparencySet(TO_HOUSES)) && HasBit(image, PALETTE_MODIFIER_COLOR)) {
   345 			if (pal == 0) {
   345 			if (pal == 0) {