diff options
author | celestar <celestar@openttd.org> | 2005-07-31 22:53:57 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-07-31 22:53:57 +0000 |
commit | fcf5ace08fa0cdbb3c5a7d8f9457dcdb61741481 (patch) | |
tree | c9a9a1e3f27f68a40f4993b7913fab6b2142b6f2 /waypoint.c | |
parent | 132ce0a598eecf344c1489063fada0a824be89ad (diff) | |
download | openttd-fcf5ace08fa0cdbb3c5a7d8f9457dcdb61741481.tar.xz |
(svn r2774) -Codechange: Removed TRACKTYPE_SPRITE_PITCH globally and replaced it by a member of RailtypeInfo
Diffstat (limited to 'waypoint.c')
-rw-r--r-- | waypoint.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/waypoint.c b/waypoint.c index 1e27cc26e..8fd330e43 100644 --- a/waypoint.c +++ b/waypoint.c @@ -360,12 +360,13 @@ Station *ComposeWaypointStation(TileIndex tile) extern uint16 _custom_sprites_base; /* Draw a waypoint */ -void DrawWaypointSprite(int x, int y, int stat_id, int railtype) +void DrawWaypointSprite(int x, int y, int stat_id, uint railtype) { StationSpec *stat; uint32 relocation; DrawTileSprites *cust; DrawTileSeqStruct const *seq; + const RailtypeInfo *rti = GetRailTypeInfo(railtype); uint32 ormod, img; ormod = SPRITE_PALETTE(PLAYER_SPRITE_COLOR(_local_player)); @@ -378,7 +379,7 @@ void DrawWaypointSprite(int x, int y, int stat_id, int railtype) const DrawTrackSeqStruct *dtss = _track_depot_layout_table[4]; img = dtss++->image; - if (img & PALETTE_MODIFIER_COLOR) img = (img & SPRITE_MASK) + railtype*TRACKTYPE_SPRITE_PITCH; + if (img & PALETTE_MODIFIER_COLOR) img = (img & SPRITE_MASK) + rti->total_offset; DrawSprite(img, x, y); for (; dtss->image != 0; dtss++) { @@ -398,7 +399,7 @@ void DrawWaypointSprite(int x, int y, int stat_id, int railtype) cust = &stat->renderdata[2]; img = cust->ground_sprite; - img += railtype * ((img < _custom_sprites_base) ? TRACKTYPE_SPRITE_PITCH : 1); + img += (img < _custom_sprites_base) ? rti->total_offset : railtype; if (img & PALETTE_MODIFIER_COLOR) img = (img & SPRITE_MASK); DrawSprite(img, x, y); |