forked from mirror/OpenTTD
(svn r3887) Add a function to get the other bridge end when you're at a bridge ramp
This commit is contained in:
12
bridge_map.h
12
bridge_map.h
@@ -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);
|
||||
|
Reference in New Issue
Block a user