summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-05 07:20:26 +0000
committertron <tron@openttd.org>2005-10-05 07:20:26 +0000
commit39f5dbfd3b22f24120c63c09433415cdde023bc6 (patch)
tree8281c38dbbb38386dacf57d352e00b62be0edc77 /roadveh_cmd.c
parent6687d63add08a36f7366764fa2482270e8d7a80e (diff)
downloadopenttd-39f5dbfd3b22f24120c63c09433415cdde023bc6.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.c8
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)