diff options
author | tron <tron@openttd.org> | 2005-01-05 13:32:03 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-05 13:32:03 +0000 |
commit | 67161506ad98a7636d3c9f141b5595481d079e93 (patch) | |
tree | b9a5829b3d37c53a2de48d1ef28960f41804f4dc /roadveh_cmd.c | |
parent | 2543158c8e0d105148bc38522fba43aa3428d76a (diff) | |
download | openttd-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 'roadveh_cmd.c')
-rw-r--r-- | roadveh_cmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index 37196cc86..35e92cef0 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -866,7 +866,7 @@ static void RoadVehCheckOvertake(Vehicle *v, Vehicle *u) if (FindRoadVehToOvertake(&od)) return; - od.tile = v->tile + _tileoffs_by_dir[v->direction>>1]; + od.tile = v->tile + TileOffsByDir(v->direction >> 1); if (FindRoadVehToOvertake(&od)) return; @@ -1009,7 +1009,7 @@ static int RoadFindPathToDest(Vehicle *v, uint tile, int direction) if (IS_BYTE_INSIDE(m5, 0x43, 0x4B)) { m5 -= 0x43; do_it:; - desttile += _tileoffs_by_dir[m5&3]; + desttile += TileOffsByDir(m5 & 3); if (desttile == tile && bitmask&_road_pf_table_3[m5&3]) { return_track(FindFirstBit2x64(bitmask&_road_pf_table_3[m5&3])); } @@ -1178,7 +1178,7 @@ static void RoadVehEventHandler(Vehicle *v) // switch to another tile if (rd.x & 0x80) { - uint tile = v->tile + _tileoffs_by_dir[rd.x&3]; + uint tile = v->tile + TileOffsByDir(rd.x & 3); int dir = RoadFindPathToDest(v, tile, rd.x&3); int tmp; uint32 r; |