forked from mirror/OpenTTD
(svn r14488) -Fix: Synchronize drawing of spritelayouts in DrawTileLayout (Houses), IndustryDrawTileLayout, DrawStationTile, DrawTile_Station and DrawTile_Track (Waypoint).
Now transparency options, PALETTE_MODIFIER_TRANSPARENT and SPRITE_MODIFIER_OPAQUE should work for all of them.
This commit is contained in:
@@ -2014,10 +2014,14 @@ default_waypoint:
|
||||
image += relocation;
|
||||
}
|
||||
|
||||
if (!(!HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_BUILDINGS)) && HasBit(image, PALETTE_MODIFIER_COLOR)) {
|
||||
pal = _drawtile_track_palette;
|
||||
if (HasBit(image, PALETTE_MODIFIER_TRANSPARENT) || HasBit(image, PALETTE_MODIFIER_COLOR)) {
|
||||
if (dtss->image.pal != 0) {
|
||||
pal = dtss->image.pal;
|
||||
} else {
|
||||
pal = _drawtile_track_palette;
|
||||
}
|
||||
} else {
|
||||
pal = dtss->image.pal;
|
||||
pal = PAL_NONE;
|
||||
}
|
||||
|
||||
if ((byte)dtss->delta_z != 0x80) {
|
||||
@@ -2029,7 +2033,8 @@ default_waypoint:
|
||||
!HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_BUILDINGS)
|
||||
);
|
||||
} else {
|
||||
AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y);
|
||||
/* For stations and original spritelayouts delta_x and delta_y are signed */
|
||||
AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y, !HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_BUILDINGS));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user