(svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo

This commit is contained in:
tron
2006-04-02 12:49:18 +00:00
parent e9a5ca70e2
commit 892a4c587d
13 changed files with 29 additions and 32 deletions

View File

@@ -863,13 +863,13 @@ static uint GetSlopeZ_Road(const TileInfo* ti)
}
}
static uint GetSlopeTileh_Road(const TileInfo *ti)
static uint GetSlopeTileh_Road(TileIndex tile, uint tileh)
{
if (ti->tileh == 0) return ti->tileh;
if (GetRoadType(ti->tile) == ROAD_NORMAL) {
uint f = GetRoadFoundation(ti->tileh, GetRoadBits(ti->tile));
if (tileh == 0) return 0;
if (GetRoadType(tile) == ROAD_NORMAL) {
uint f = GetRoadFoundation(tileh, GetRoadBits(tile));
if (f == 0) return ti->tileh;
if (f == 0) return tileh;
if (f < 15) return 0; // leveled foundation
return _inclined_tileh[f - 15]; // inclined foundation
} else {