From ebc18e3957ceaf2c3fdd208a3ad6590875caf8de Mon Sep 17 00:00:00 2001 From: dominik Date: Fri, 17 Sep 2004 20:49:47 +0000 Subject: (svn r288) Fix: new checkpoint graphics now also work for monorail/maglev --- rail_cmd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'rail_cmd.c') 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, -- cgit v1.2.3-54-g00ecf