From d71788c40206fa35b792d34769fde7768b4456c1 Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 21 Jul 2005 06:31:02 +0000 Subject: (svn r2660) Get rid of some more shifting/anding/casting --- roadveh_cmd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'roadveh_cmd.c') diff --git a/roadveh_cmd.c b/roadveh_cmd.c index 2fad4cdb6..293d2004e 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -449,10 +449,10 @@ static void UpdateRoadVehDeltaXY(Vehicle *v) }; #undef MKIT uint32 x = _delta_xy_table[v->direction]; - v->x_offs = (byte)x; - v->y_offs = (byte)(x>>=8); - v->sprite_width = (byte)(x>>=8); - v->sprite_height = (byte)(x>>=8); + v->x_offs = GB(x, 0, 8); + v->y_offs = GB(x, 8, 8); + v->sprite_width = GB(x, 16, 8); + v->sprite_height = GB(x, 24, 8); } static void ClearCrashedStation(Vehicle *v) @@ -927,7 +927,7 @@ static void RoadVehCheckOvertake(Vehicle *v, Vehicle *u) if (v->u.road.state >= 32 || (v->u.road.state&7) > 1 ) return; - tt = (byte)(GetTileTrackStatus(v->tile, TRANSPORT_ROAD) & 0x3F); + tt = GetTileTrackStatus(v->tile, TRANSPORT_ROAD) & 0x3F; if ((tt & 3) == 0) return; if ((tt & 0x3C) != 0) -- cgit v1.2.3-54-g00ecf