# HG changeset patch # User tron # Date 1104948546 0 # Node ID bff808a1c7f0b0bc57420be37d02088b8561316f # Parent f860c7234167ed106787c7f27db3499c9b20bad6 (svn r1390) Use TileOffsByDir() instead of home brewed table diff -r f860c7234167 -r bff808a1c7f0 roadveh_cmd.c --- a/roadveh_cmd.c Wed Jan 05 14:39:48 2005 +0000 +++ b/roadveh_cmd.c Wed Jan 05 18:09:06 2005 +0000 @@ -247,14 +247,6 @@ 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 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 &&