summaryrefslogtreecommitdiff
path: root/rail_cmd.c
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-11-14 22:30:46 +0000
committerdominik <dominik@openttd.org>2004-11-14 22:30:46 +0000
commitd99b89ab29c340e1305f3b7f15257b4e29d5b7b7 (patch)
tree2d29b22b413527f9ba338d12dbb15bbdba50c1e5 /rail_cmd.c
parent363a92bd43daf771a4859db31369ac39340f57d2 (diff)
downloadopenttd-d99b89ab29c340e1305f3b7f15257b4e29d5b7b7.tar.xz
(svn r614) [newgrf] Some minor code fixes
Diffstat (limited to 'rail_cmd.c')
-rw-r--r--rail_cmd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/rail_cmd.c b/rail_cmd.c
index ac32369d8..053c6792c 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -1573,7 +1573,8 @@ static void DrawTile_Track(TileInfo *ti)
uint32 relocation = GetCustomStationRelocation(stat, ComposeWaypointStation(ti->tile), 0);
int railtype=(_map3_lo[ti->tile] & 0xF);
- image = cust->ground_sprite + railtype*((image<_custom_sprites_base)?TRACKTYPE_SPRITE_PITCH:1);
+ image = cust->ground_sprite;
+ image += railtype*((image<_custom_sprites_base)?TRACKTYPE_SPRITE_PITCH:1);
if (image & 0x8000) image = (image & 0x7FFF);
@@ -1683,7 +1684,9 @@ void DrawWaypointSprite(int x, int y, int stat_id, int railtype)
// add 1 to get the other direction
cust = &stat->renderdata[2];
- img = cust->ground_sprite + railtype*((img<_custom_sprites_base)?TRACKTYPE_SPRITE_PITCH:1);
+ img = cust->ground_sprite;
+ img += railtype*((img<_custom_sprites_base)?TRACKTYPE_SPRITE_PITCH:1);
+
if (img & 0x8000) img = (img & 0x7FFF);
DrawSprite(img, x, y);