summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/station_cmd.cpp4
-rw-r--r--src/table/station_land.h10
2 files changed, 12 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 0b928cfbe..114eca1f2 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2580,7 +2580,7 @@ static void DrawTile_Station(TileInfo *ti)
palette = PALETTE_TO_GREY;
}
- if (t == NULL || t->seq == NULL) t = &_station_display_datas[GetStationType(ti->tile)][GetStationGfx(ti->tile)];
+ if (t == NULL || t->seq == NULL) t = GetStationTileLayout(GetStationType(ti->tile), GetStationGfx(ti->tile));
/* don't show foundation for docks */
if (ti->tileh != SLOPE_FLAT && !IsDock(ti->tile)) {
@@ -2702,7 +2702,7 @@ void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, Ro
{
int32 total_offset = 0;
PaletteID pal = COMPANY_SPRITE_COLOUR(_local_company);
- const DrawTileSprites *t = &_station_display_datas[st][image];
+ const DrawTileSprites *t = GetStationTileLayout(st, image);
const RailtypeInfo *rti = NULL;
if (railtype != INVALID_RAILTYPE) {
diff --git a/src/table/station_land.h b/src/table/station_land.h
index 3eac6b31e..6668ce6b0 100644
--- a/src/table/station_land.h
+++ b/src/table/station_land.h
@@ -954,11 +954,21 @@ static const DrawTileSprites _station_display_datas_buoy[] = {
static const DrawTileSprites _station_display_datas_waypoint[] = {
TILE_SPRITE_LINE(SPR_RAIL_TRACK_X, _station_display_datas_waypoint_X)
TILE_SPRITE_LINE(SPR_RAIL_TRACK_Y, _station_display_datas_waypoint_Y)
+ TILE_SPRITE_LINE(SPR_RAIL_TRACK_X, _station_display_datas_waypoint_X)
+ TILE_SPRITE_LINE(SPR_RAIL_TRACK_Y, _station_display_datas_waypoint_Y)
+ TILE_SPRITE_LINE(SPR_RAIL_TRACK_X, _station_display_datas_waypoint_X)
+ TILE_SPRITE_LINE(SPR_RAIL_TRACK_Y, _station_display_datas_waypoint_Y)
+ TILE_SPRITE_LINE(SPR_RAIL_TRACK_X, _station_display_datas_waypoint_X)
+ TILE_SPRITE_LINE(SPR_RAIL_TRACK_Y, _station_display_datas_waypoint_Y)
};
#undef TILE_SPRITE_LINE
#undef TILE_SPRITE_NULL
+/* Default waypoint is also drawn as fallback for NewGRF waypoints.
+ * As these are drawn/build like stations, they may use the same number of layouts. */
+assert_compile(lengthof(_station_display_datas_rail) == lengthof(_station_display_datas_waypoint));
+
static const DrawTileSprites * const _station_display_datas[] = {
_station_display_datas_rail,
_station_display_datas_airport,