summaryrefslogtreecommitdiff
path: root/src/pathfind.cpp
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2007-11-19 21:02:30 +0000
committerskidd13 <skidd13@openttd.org>2007-11-19 21:02:30 +0000
commit71c4325c50ae594a5adf01cac7c9e527b239cdcb (patch)
tree21212e0b25777aac62f30d88b981e2bd624c4616 /src/pathfind.cpp
parent58bb5c752568f8f9a1cb4d9533268d0ecad34e12 (diff)
downloadopenttd-71c4325c50ae594a5adf01cac7c9e527b239cdcb.tar.xz
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
Diffstat (limited to 'src/pathfind.cpp')
-rw-r--r--src/pathfind.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pathfind.cpp b/src/pathfind.cpp
index fb0fc98bd..68602667f 100644
--- a/src/pathfind.cpp
+++ b/src/pathfind.cpp
@@ -185,7 +185,7 @@ static void TPFMode2(TrackPathFinder* tpf, TileIndex tile, DiagDirection directi
}
continue_here:;
- tpf->the_dir = (Trackdir)(i + (HASBIT(_otherdir_mask[direction], i) ? 8 : 0));
+ tpf->the_dir = (Trackdir)(i + (HasBit(_otherdir_mask[direction], i) ? 8 : 0));
if (!tpf->enum_proc(tile, tpf->userdata, tpf->the_dir, tpf->rd.cur_length, NULL)) {
TPFMode2(tpf, tile, _tpf_new_direction[tpf->the_dir]);
@@ -410,16 +410,16 @@ void FollowTrack(TileIndex tile, uint16 flags, uint sub_type, DiagDirection dire
tpf.rd.depth = 0;
tpf.rd.pft_var6 = 0;
- tpf.var2 = HASBIT(flags, 15) ? 0x43 : 0xFF; // 0x8000
+ tpf.var2 = HasBit(flags, 15) ? 0x43 : 0xFF; // 0x8000
- tpf.disable_tile_hash = HASBIT(flags, 12); // 0x1000
- tpf.hasbit_13 = HASBIT(flags, 13); // 0x2000
+ tpf.disable_tile_hash = HasBit(flags, 12); // 0x1000
+ tpf.hasbit_13 = HasBit(flags, 13); // 0x2000
tpf.tracktype = (TransportType)(flags & 0xFF);
tpf.sub_type = sub_type;
- if (HASBIT(flags, 11)) {
+ if (HasBit(flags, 11)) {
tpf.rd.pft_var6 = 0xFF;
tpf.enum_proc(tile, data, INVALID_TRACKDIR, 0, 0);
TPFMode2(&tpf, tile, direction);
@@ -746,7 +746,7 @@ start_at:
/* We are not driving into the tunnel, or it is an invalid tunnel */
continue;
}
- if (!HASBIT(tpf->railtypes, GetRailType(tile))) {
+ if (!HasBit(tpf->railtypes, GetRailType(tile))) {
bits = TRACK_BIT_NONE;
break;
}
@@ -796,7 +796,7 @@ start_at:
/* Check that the tile contains exactly one track */
if (bits == 0 || KillFirstBit(bits) != 0) break;
- if (!HASBIT(tpf->railtypes, GetRailType(tile))) {
+ if (!HasBit(tpf->railtypes, GetRailType(tile))) {
bits = TRACK_BIT_NONE;
break;
}
@@ -822,7 +822,7 @@ start_at:
* bits, not just reachable ones, to prevent infinite loops. */
if (bits == TRACK_BIT_NONE || TracksOverlap(allbits)) break;
- if (!HASBIT(tpf->railtypes, GetRailType(tile))) {
+ if (!HasBit(tpf->railtypes, GetRailType(tile))) {
bits = TRACK_BIT_NONE;
break;
}