mirror of https://github.com/OpenTTD/OpenTTD
(svn r12674) -Fix [FS#1902]: Colour remaps on station sprites only worked for company colours.
parent
711909fa0c
commit
a45c1d45e5
|
@ -754,7 +754,7 @@ bool DrawStationTile(int x, int y, RailType railtype, Axis axis, StationClassID
|
||||||
const RailtypeInfo *rti = GetRailTypeInfo(railtype);
|
const RailtypeInfo *rti = GetRailTypeInfo(railtype);
|
||||||
SpriteID relocation;
|
SpriteID relocation;
|
||||||
SpriteID image;
|
SpriteID image;
|
||||||
SpriteID pal = PLAYER_SPRITE_COLOR(_local_player);
|
SpriteID palette = PLAYER_SPRITE_COLOR(_local_player);
|
||||||
uint tile = 2;
|
uint tile = 2;
|
||||||
|
|
||||||
statspec = GetCustomStationSpec(sclass, station);
|
statspec = GetCustomStationSpec(sclass, station);
|
||||||
|
@ -792,6 +792,17 @@ bool DrawStationTile(int x, int y, RailType railtype, Axis axis, StationClassID
|
||||||
image += relocation;
|
image += relocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SpriteID pal;
|
||||||
|
if (HasBit(image, PALETTE_MODIFIER_TRANSPARENT) || HasBit(image, PALETTE_MODIFIER_COLOR)) {
|
||||||
|
if (seq->image.pal > 0) {
|
||||||
|
pal = seq->image.pal;
|
||||||
|
} else {
|
||||||
|
pal = palette;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
pal = PAL_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
if ((byte)seq->delta_z != 0x80) {
|
if ((byte)seq->delta_z != 0x80) {
|
||||||
pt = RemapCoords(seq->delta_x, seq->delta_y, seq->delta_z);
|
pt = RemapCoords(seq->delta_x, seq->delta_y, seq->delta_z);
|
||||||
DrawSprite(image, pal, x + pt.x, y + pt.y);
|
DrawSprite(image, pal, x + pt.x, y + pt.y);
|
||||||
|
|
|
@ -2199,10 +2199,14 @@ static void DrawTile_Station(TileInfo *ti)
|
||||||
}
|
}
|
||||||
|
|
||||||
SpriteID pal;
|
SpriteID pal;
|
||||||
if (!(!HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_BUILDINGS)) && HasBit(image, PALETTE_MODIFIER_COLOR)) {
|
if (HasBit(image, PALETTE_MODIFIER_TRANSPARENT) || HasBit(image, PALETTE_MODIFIER_COLOR)) {
|
||||||
pal = palette;
|
if (dtss->image.pal > 0) {
|
||||||
|
pal = dtss->image.pal;
|
||||||
|
} else {
|
||||||
|
pal = palette;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
pal = dtss->image.pal;
|
pal = PAL_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((byte)dtss->delta_z != 0x80) {
|
if ((byte)dtss->delta_z != 0x80) {
|
||||||
|
|
Loading…
Reference in New Issue