Add a waypoint ground draw flag to NewGRF road stops
Adjust overlay draw conditions
This commit is contained in:
@@ -275,6 +275,9 @@ void DrawRoadStopTile(int x, int y, RoadType roadtype, const RoadStopSpec *spec,
|
||||
|
||||
if (type == STATION_ROADWAYPOINT) {
|
||||
DrawSprite(SPR_ROAD_PAVED_STRAIGHT_X, PAL_NONE, x, y);
|
||||
if ((spec->draw_mode & ROADSTOP_DRAW_MODE_WAYP_GROUND) && GB(image, 0, SPRITE_WIDTH) != 0) {
|
||||
DrawSprite(image, GroundSpritePaletteTransform(image, pal, palette), x, y);
|
||||
}
|
||||
} else if (GB(image, 0, SPRITE_WIDTH) != 0) {
|
||||
DrawSprite(image, GroundSpritePaletteTransform(image, pal, palette), x, y);
|
||||
}
|
||||
@@ -284,7 +287,7 @@ void DrawRoadStopTile(int x, int y, RoadType roadtype, const RoadStopSpec *spec,
|
||||
uint sprite_offset = 5 - view;
|
||||
|
||||
/* Road underlay takes precedence over tram */
|
||||
if (spec->draw_mode & ROADSTOP_DRAW_MODE_OVERLAY) {
|
||||
if (type == STATION_ROADWAYPOINT || spec->draw_mode & ROADSTOP_DRAW_MODE_OVERLAY) {
|
||||
if (rti->UsesOverlay()) {
|
||||
SpriteID ground = GetCustomRoadSprite(rti, INVALID_TILE, ROTSG_GROUND);
|
||||
DrawSprite(ground + sprite_offset, PAL_NONE, x, y);
|
||||
|
Reference in New Issue
Block a user