diff options
author | peter1138 <peter1138@openttd.org> | 2006-05-06 20:33:22 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-05-06 20:33:22 +0000 |
commit | f689b2087469851b0db826d5d82c6892565cbff6 (patch) | |
tree | 3e95909577865aa683688e9760e70991a2347b18 /rail_cmd.c | |
parent | 5c94fd7afa166551a4ceee4df657c561f2ba957c (diff) | |
download | openttd-f689b2087469851b0db826d5d82c6892565cbff6.tar.xz |
(svn r4754) - Newstations: expose default station display data via a function so we can use it (rarely) in other places.
Diffstat (limited to 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 107b5bc17..f88267841 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -1336,7 +1336,12 @@ static void DrawTile_Track(TileInfo *ti) if (callback != CALLBACK_FAILED) tile = callback; } - cust = &statspec->renderdata[(tile < statspec->tiles ? tile : 0) + GetWaypointAxis(ti->tile)]; + if (statspec->renderdata == NULL) { + cust = GetStationTileLayout(tile); + relocation -= 0x42D; + } else { + cust = &statspec->renderdata[(tile < statspec->tiles ? tile : 0) + GetWaypointAxis(ti->tile)]; + } /* If there is no sprite layout, we fall back to the default waypoint graphics. */ if (cust != NULL && cust->seq != NULL) { |