summaryrefslogtreecommitdiff
path: root/pathfind.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-05 13:32:03 +0000
committertron <tron@openttd.org>2005-01-05 13:32:03 +0000
commit67161506ad98a7636d3c9f141b5595481d079e93 (patch)
treeb9a5829b3d37c53a2de48d1ef28960f41804f4dc /pathfind.c
parent2543158c8e0d105148bc38522fba43aa3428d76a (diff)
downloadopenttd-67161506ad98a7636d3c9f141b5595481d079e93.tar.xz
(svn r1386) Move TileIndexDiff to map.h
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
Diffstat (limited to 'pathfind.c')
-rw-r--r--pathfind.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pathfind.c b/pathfind.c
index fc71369e0..730c26aa4 100644
--- a/pathfind.c
+++ b/pathfind.c
@@ -140,7 +140,7 @@ static void TPFMode2(TrackPathFinder *tpf, uint tile, int direction)
// This addition will sometimes overflow by a single tile.
// The use of TILE_MASK here makes sure that we still point at a valid
// tile, and then this tile will be in the sentinel row/col, so GetTileTrackStatus will fail.
- tile = TILE_MASK(tile + _tileoffs_by_dir[direction]);
+ tile = TILE_MASK(tile + TileOffsByDir(direction));
/* Check in case of rail if the owner is the same */
if (tpf->tracktype == TRANSPORT_RAIL) {
@@ -283,7 +283,7 @@ static void TPFMode1(TrackPathFinder *tpf, uint tile, int direction)
return;
tile = SkipToEndOfTunnel(tpf, tile, direction);
}
- tile += _tileoffs_by_dir[direction];
+ tile += TileOffsByDir(direction);
/* Check in case of rail if the owner is the same */
if (tpf->tracktype == TRANSPORT_RAIL) {
@@ -638,7 +638,7 @@ restart:
tile_org = tile;
for(;;) {
- tile += _tileoffs_by_dir[direction];
+ tile += TileOffsByDir(direction);
// too long search length? bail out.
if (++si.cur_length >= tpf->maxlength)