summaryrefslogtreecommitdiff
path: root/rail_cmd.c
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-09-17 20:49:47 +0000
committerdominik <dominik@openttd.org>2004-09-17 20:49:47 +0000
commitebc18e3957ceaf2c3fdd208a3ad6590875caf8de (patch)
tree9a4cf5aad9fe85b136bf14a40d9b1703d01db82c /rail_cmd.c
parentda80dabe6b649fd25ef000ab132df802eb845f65 (diff)
downloadopenttd-ebc18e3957ceaf2c3fdd208a3ad6590875caf8de.tar.xz
(svn r288) Fix: new checkpoint graphics now also work for monorail/maglev
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,