summaryrefslogtreecommitdiff
path: root/rail_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'rail_cmd.c')
-rw-r--r--rail_cmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/rail_cmd.c b/rail_cmd.c
index 235a37fe4..2546651c8 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -1510,15 +1510,17 @@ static void DrawTile_Track(TileInfo *ti)
}
}
} else {
+ /* draw depots / checkpoints */
const byte *s;
const DrawTrackSeqStruct *drss;
+ byte type = m5 & 0x3F; // 0-3: depots, 4-5: checkpoints
if (!(m5 & (RAIL_TYPE_MASK&~RAIL_TYPE_SPECIAL)))
return;
if (ti->tileh != 0) { DrawFoundation(ti, ti->tileh); }
- s = _track_depot_layout_table[m5 & 0x3F];
+ s = _track_depot_layout_table[type];
image = *(const uint16*)s;
if (image & 0x8000) image = (image & 0x7FFF) + tracktype_offs;
@@ -1540,7 +1542,7 @@ static void DrawTile_Track(TileInfo *ti)
while ((image=drss->image) != 0) {
if (image & 0x8000)
image |= _drawtile_track_palette;
- image += tracktype_offs;
+ image += (type<4)?tracktype_offs:0;
if (!(_display_opt & DO_TRANS_BUILDINGS)) // show transparent depots
image = (image & 0x3FFF) | 0x3224000;
AddSortableSpriteToDraw(image, ti->x | drss->subcoord_x,