|
|
@ -1862,6 +1862,7 @@ static void DrawSingleSignal(TileIndex tile, const RailtypeInfo *rti, Track trac
|
|
|
|
SignalVariant variant = GetSignalVariant(tile, track);
|
|
|
|
SignalVariant variant = GetSignalVariant(tile, track);
|
|
|
|
|
|
|
|
|
|
|
|
SpriteID sprite = GetCustomSignalSprite(rti, tile, type, variant, condition);
|
|
|
|
SpriteID sprite = GetCustomSignalSprite(rti, tile, type, variant, condition);
|
|
|
|
|
|
|
|
bool is_custom_sprite = (sprite != 0);
|
|
|
|
if (sprite != 0) {
|
|
|
|
if (sprite != 0) {
|
|
|
|
sprite += image;
|
|
|
|
sprite += image;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -1870,7 +1871,19 @@ static void DrawSingleSignal(TileIndex tile, const RailtypeInfo *rti, Track trac
|
|
|
|
sprite += type * 16 + variant * 64 + image * 2 + condition + (type > SIGTYPE_LAST_NOPBS ? 64 : 0);
|
|
|
|
sprite += type * 16 + variant * 64 + image * 2 + condition + (type > SIGTYPE_LAST_NOPBS ? 64 : 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!is_custom_sprite && variant == SIG_ELECTRIC && IsRestrictedSignal(tile) && GetExistingTraceRestrictProgram(tile, track) != NULL) {
|
|
|
|
|
|
|
|
if (type == SIGTYPE_PBS || type == SIGTYPE_PBS_ONEWAY) {
|
|
|
|
|
|
|
|
static const SubSprite lower_part { -50, -10, 50, 50 };
|
|
|
|
|
|
|
|
static const SubSprite upper_part { -50, -50, 50, -11 };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AddSortableSpriteToDraw(sprite, SPR_TRACERESTRICT_BASE, x, y, 1, 1, BB_HEIGHT_UNDER_BRIDGE, GetSaveSlopeZ(x, y, track), false, 0, 0, 0, &lower_part);
|
|
|
|
|
|
|
|
AddSortableSpriteToDraw(sprite, PAL_NONE, x, y, 1, 1, BB_HEIGHT_UNDER_BRIDGE, GetSaveSlopeZ(x, y, track), false, 0, 0, 0, &upper_part);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
AddSortableSpriteToDraw(sprite, SPR_TRACERESTRICT_BASE + 1, x, y, 1, 1, BB_HEIGHT_UNDER_BRIDGE, GetSaveSlopeZ(x, y, track));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
AddSortableSpriteToDraw(sprite, PAL_NONE, x, y, 1, 1, BB_HEIGHT_UNDER_BRIDGE, GetSaveSlopeZ(x, y, track));
|
|
|
|
AddSortableSpriteToDraw(sprite, PAL_NONE, x, y, 1, 1, BB_HEIGHT_UNDER_BRIDGE, GetSaveSlopeZ(x, y, track));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static uint32 _drawtile_track_palette;
|
|
|
|
static uint32 _drawtile_track_palette;
|
|
|
|