diff options
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r-- | src/newgrf_house.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index b7907945f..296139caa 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -421,7 +421,7 @@ uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, House return group->g.callback.result; } -void DrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte stage, HouseID house_id) +static void DrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte stage, HouseID house_id) { const DrawTileSprites *dts = group->g.layout.dts; const DrawTileSeqStruct *dtss; @@ -444,7 +444,7 @@ void DrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte stage, Ho if (IS_CUSTOM_SPRITE(image)) image += stage; - if ((HasBit(image, SPRITE_MODIFIER_OPAQUE) || !IsTransparencySet(TO_HOUSES)) && HasBit(image, PALETTE_MODIFIER_COLOR)) { + if (HasBit(image, PALETTE_MODIFIER_TRANSPARENT) || HasBit(image, PALETTE_MODIFIER_COLOR)) { if (pal == 0) { const HouseSpec *hs = GetHouseSpecs(house_id); if (HasBit(hs->callback_mask, CBM_HOUSE_COLOUR)) { @@ -467,10 +467,11 @@ void DrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte stage, Ho ti->x + dtss->delta_x, ti->y + dtss->delta_y, dtss->size_x, dtss->size_y, dtss->size_z, ti->z + dtss->delta_z, - IsTransparencySet(TO_HOUSES) + !HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_HOUSES) ); } else { - AddChildSpriteScreen(image, pal, (byte)dtss->delta_x, (byte)dtss->delta_y, IsTransparencySet(TO_HOUSES)); + /* For industries and houses delta_x and delta_y are unsigned */ + AddChildSpriteScreen(image, pal, (byte)dtss->delta_x, (byte)dtss->delta_y, !HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_HOUSES)); } } } |