(svn r5155) - Remove the bridge branch merge (revision r5070)
This commit is contained in:
41
bridge_map.c
41
bridge_map.c
@@ -3,25 +3,22 @@
|
||||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "bridge_map.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
TileIndex GetBridgeEnd(TileIndex tile, DiagDirection dir)
|
||||
{
|
||||
TileIndexDiff delta = TileOffsByDir(dir);
|
||||
|
||||
do { tile += delta; } while (IsBridgeAbove(tile) && IsBridgeOfAxis(tile, DiagDirToAxis(dir)));
|
||||
assert(DiagDirToAxis(dir) == GetBridgeAxis(tile));
|
||||
|
||||
do {
|
||||
tile += delta;
|
||||
} while (!IsBridgeRamp(tile));
|
||||
|
||||
return tile;
|
||||
}
|
||||
|
||||
|
||||
TileIndex GetNorthernBridgeEnd(TileIndex t)
|
||||
{
|
||||
return GetBridgeEnd(t, ReverseDiagDir(AxisToDiagDir(GetBridgeAxis(t))));
|
||||
}
|
||||
|
||||
|
||||
TileIndex GetSouthernBridgeEnd(TileIndex t)
|
||||
{
|
||||
return GetBridgeEnd(t, AxisToDiagDir(GetBridgeAxis(t)));
|
||||
@@ -30,25 +27,11 @@ TileIndex GetSouthernBridgeEnd(TileIndex t)
|
||||
|
||||
TileIndex GetOtherBridgeEnd(TileIndex tile)
|
||||
{
|
||||
assert(IsBridgeTile(tile));
|
||||
return GetBridgeEnd(tile, GetBridgeRampDirection(tile));
|
||||
}
|
||||
|
||||
uint GetBridgeHeight(TileIndex tile, Axis a)
|
||||
{
|
||||
uint h, f;
|
||||
uint tileh = GetTileSlope(tile, &h);
|
||||
|
||||
f = GetBridgeFoundation(tileh, a);
|
||||
|
||||
if (f) {
|
||||
if (f < 15) {
|
||||
h += TILE_HEIGHT;
|
||||
tileh = SLOPE_FLAT;
|
||||
} else {
|
||||
tileh = _inclined_tileh[f - 15];
|
||||
}
|
||||
}
|
||||
|
||||
return h + TILE_HEIGHT;
|
||||
TileIndexDiff delta = TileOffsByDir(GetBridgeRampDirection(tile));
|
||||
|
||||
do {
|
||||
tile += delta;
|
||||
} while (!IsBridgeRamp(tile));
|
||||
|
||||
return tile;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user