diff options
author | tron <tron@openttd.org> | 2005-10-05 07:20:26 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-10-05 07:20:26 +0000 |
commit | ae4a1f3675bab50b93e443dcca07fd297fcdc58d (patch) | |
tree | 8281c38dbbb38386dacf57d352e00b62be0edc77 /roadveh_cmd.c | |
parent | 102cf2615f8ffb4e260680a5f2b3b7d9f2a7a130 (diff) | |
download | openttd-ae4a1f3675bab50b93e443dcca07fd297fcdc58d.tar.xz |
(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r-- | roadveh_cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index ee882b25c..9a5cc09f3 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -284,7 +284,7 @@ static bool EnumRoadSignalFindDepot(TileIndex tile, RoadFindDepotData *rfdd, int tile += TileOffsByDir(_road_pf_directions[track]); if (IsTileType(tile, MP_STREET) && - (_m[tile].m5 & 0xF0) == 0x20 && + GB(_m[tile].m5, 4, 4) == 2 && IsTileOwner(tile, rfdd->owner)) { if (length < rfdd->best_length) { @@ -1034,7 +1034,7 @@ static int RoadFindPathToDest(Vehicle *v, TileIndex tile, int enterdir) } if (IsTileType(tile, MP_STREET)) { - if ((_m[tile].m5&0xF0) == 0x20 && IsTileOwner(tile, v->owner)) + if (GB(_m[tile].m5, 4, 4) == 2 && IsTileOwner(tile, v->owner)) /* Road crossing */ bitmask |= _road_veh_fp_ax_or[_m[tile].m5&3]; } else if (IsTileType(tile, MP_STATION)) { @@ -1237,7 +1237,7 @@ static void RoadVehController(Vehicle *v) v->cur_speed = 0; - dir = _m[v->tile].m5&3; + dir = GB(_m[v->tile].m5, 0, 2); v->direction = dir*2+1; rd2 = _roadveh_data_2[dir]; @@ -1286,7 +1286,7 @@ static void RoadVehController(Vehicle *v) } if (IsTileType(gp.new_tile, MP_TUNNELBRIDGE) && - (_m[gp.new_tile].m5&0xF0) == 0 && + GB(_m[gp.new_tile].m5, 4, 4) == 0 && (VehicleEnterTile(v, gp.new_tile, gp.x, gp.y)&4)) { //new_dir = RoadGetNewDirection(v, gp.x, gp.y) |