(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 962852b732
commit 3d9c76d8b8
5 changed files with 33 additions and 8 deletions

View File

@@ -10,6 +10,12 @@
#include "tile.h"
static inline bool IsBridgeRamp(TileIndex t)
{
return !HASBIT(_m[t].m5, 6);
}
/**
* Get the direction pointing onto the bridge
*/
@@ -22,6 +28,12 @@ static inline DiagDirection GetBridgeRampDirection(TileIndex t)
}
/**
* Starting at one bridge end finds the other bridge end
*/
TileIndex GetOtherBridgeEnd(TileIndex);
static inline void SetClearUnderBridge(TileIndex t)
{
SetTileOwner(t, OWNER_NONE);