summaryrefslogtreecommitdiff
path: root/bridge_map.c
blob: dbd6ac3f4f3bbd54c7da7c23b945bc312e1823c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* $Id$ */

#include "stdafx.h"
#include "openttd.h"
#include "bridge_map.h"


TileIndex GetOtherBridgeEnd(TileIndex tile)
{
	TileIndexDiff delta = TileOffsByDir(GetBridgeRampDirection(tile));

	do {
		tile += delta;
	} while (!IsBridgeRamp(tile));

	return tile;
}