diff options
author | tron <tron@openttd.org> | 2005-01-05 18:09:06 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-05 18:09:06 +0000 |
commit | 8a0ba57ac64c5d72c5d1f743241ac1eec5d95bf6 (patch) | |
tree | 49ecedd5cf885926d93cb6274ad279c91b362866 | |
parent | 503ccc81c919cbe36143e48ead8bb5caee2aef7a (diff) | |
download | openttd-8a0ba57ac64c5d72c5d1f743241ac1eec5d95bf6.tar.xz |
(svn r1390) Use TileOffsByDir() instead of home brewed table
-rw-r--r-- | roadveh_cmd.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index 35e92cef0..3a44d4f74 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -247,14 +247,6 @@ typedef struct RoadFindDepotData { byte owner; } RoadFindDepotData; - -static const TileIndexDiff _road_find_sig_dir_mod[4] = { - TILE_XY(-1,0), - TILE_XY(0,1), - TILE_XY(1,0), - TILE_XY(0,-1), -}; - static const byte _road_pf_directions[16] = { 0, 1, 0, 1, 2, 1, 255, 255, 2, 3, 3, 2, 3, 0, 255, 255, @@ -262,7 +254,7 @@ static const byte _road_pf_directions[16] = { static bool EnumRoadSignalFindDepot(uint tile, RoadFindDepotData *rfdd, int track, uint length, byte *state) { - tile += _road_find_sig_dir_mod[_road_pf_directions[track]]; + tile += TileOffsByDir(_road_pf_directions[track]); if (IS_TILETYPE(tile, MP_STREET) && (_map5[tile] & 0xF0) == 0x20 && |