(svn r12346) -Fix [FS#1748, FS#1825](r9874, r11872): Remove duplicated and inconsistent code wrt. autoreplace with rules in both vehicles' group and ALL_GROUP.
/* $Id$ *//** @file tunnel_map.h */#ifndef TUNNEL_MAP_H#define TUNNEL_MAP_H#include"direction_func.h"#include"rail_type.h"#include"road_type.h"#include"tile_map.h"/** * Is this a tunnel (entrance)? * @param t the tile that might be a tunnel * @pre IsTileType(t, MP_TUNNELBRIDGE) * @return true if and only if this tile is a tunnel (entrance) */staticinlineboolIsTunnel(TileIndext){assert(IsTileType(t,MP_TUNNELBRIDGE));return!HasBit(_m[t].m5,7);}/** * Is this a tunnel (entrance)? * @param t the tile that might be a tunnel * @return true if and only if this tile is a tunnel (entrance) */staticinlineboolIsTunnelTile(TileIndext){returnIsTileType(t,MP_TUNNELBRIDGE)&&IsTunnel(t);}TileIndexGetOtherTunnelEnd(TileIndex);boolIsTunnelInWay(TileIndex,uintz);boolIsTunnelInWayDir(TileIndextile,uintz,DiagDirectiondir);/** * Makes a road tunnel entrance * @param t the entrance of the tunnel * @param o the owner of the entrance * @param d the direction facing out of the tunnel * @param r the road type used in the tunnel */staticinlinevoidMakeRoadTunnel(TileIndext,Ownero,DiagDirectiond,RoadTypesr){SetTileType(t,MP_TUNNELBRIDGE);SetTileOwner(t,o);_m[t].m2=0;_m[t].m3=r;_m[t].m4=0;_m[t].m5=TRANSPORT_ROAD<<2|d;}/** * Makes a rail tunnel entrance * @param t the entrance of the tunnel * @param o the owner of the entrance * @param d the direction facing out of the tunnel * @param r the rail type used in the tunnel */staticinlinevoidMakeRailTunnel(TileIndext,Ownero,DiagDirectiond,RailTyper){SetTileType(t,MP_TUNNELBRIDGE);SetTileOwner(t,o);_m[t].m2=0;_m[t].m3=r;_m[t].m4=0;_m[t].m5=TRANSPORT_RAIL<<2|d;}#endif /* TUNNEL_MAP_H */