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) { |