(svn r5833) -Feature: Allow building of (certain) rails, roads and bridge ramps on steep sloped tiles

This commit is contained in:
tron
2006-08-10 14:44:32 +00:00
parent 4ccdb04cd3
commit 5f943a4ba7
5 changed files with 106 additions and 44 deletions

View File

@@ -214,6 +214,17 @@ void DrawFoundation(TileInfo *ti, uint f)
OffsetGroundSprite(31, 1);
} else {
// inclined foundation
if (IsSteepSlope(ti->tileh)) {
uint32 lower_base;
// Lower part of foundation
lower_base = sprite_base;
if (lower_base == SPR_SLOPES_BASE - 15) lower_base = SPR_FOUNDATION_BASE;
AddSortableSpriteToDraw(
lower_base + (ti->tileh & ~SLOPE_STEEP), ti->x, ti->y, 16, 16, 7, ti->z
);
ti->z += TILE_HEIGHT;
}
AddSortableSpriteToDraw(sprite_base + f, ti->x, ti->y, 16, 16, 1, ti->z);
ti->tileh = _inclined_tileh[f - 15];
OffsetGroundSprite(31, 9);