(svn r3887) Add a function to get the other bridge end when you're at a bridge ramp

This commit is contained in:
tron
2006-03-15 16:44:50 +00:00
parent bd5def0092
commit 626109f3f9
5 changed files with 33 additions and 8 deletions

17
bridge_map.c Normal file
View File

@@ -0,0 +1,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;
}