4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
10 /** @file tunnelbridge_map.h Functions that have tunnels and bridges in common */
12 #ifndef TUNNELBRIDGE_MAP_H
13 #define TUNNELBRIDGE_MAP_H
15 #include "bridge_map.h"
16 #include "map/tunnel.h"
20 * Determines type of the wormhole and returns its other end
22 * @pre IsTunnelTile(t) || IsBridgeHeadTile(t)
25 static inline TileIndex
GetOtherTunnelBridgeEnd(TileIndex t
)
27 assert(IsTunnelTile(t
) || IsBridgeHeadTile(t
));
28 return IsTunnelTile(t
) ? GetOtherTunnelEnd(t
) : GetOtherBridgeEnd(t
);
32 #endif /* TUNNELBRIDGE_MAP_H */