mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-21 21:49:10 +00:00
(svn r18702) -Fix [FS#3467]: Enable DrawGroundSpriteAt() to deal with foundations as DrawGroundSprite() does, and use this for drawing one-way-road-signs and clear-land-fences.
This commit is contained in:
@@ -63,19 +63,14 @@ void DrawHillyLandTile(const TileInfo *ti)
|
||||
|
||||
void DrawClearLandFence(const TileInfo *ti)
|
||||
{
|
||||
byte z = ti->z;
|
||||
|
||||
if (ti->tileh & SLOPE_S) {
|
||||
z += TILE_HEIGHT;
|
||||
if (ti->tileh == SLOPE_STEEP_S) z += TILE_HEIGHT;
|
||||
}
|
||||
int z = GetSlopeZInCorner(ti->tileh, CORNER_S);
|
||||
|
||||
if (GetFenceSW(ti->tile) != 0) {
|
||||
DrawGroundSpriteAt(_clear_land_fence_sprites[GetFenceSW(ti->tile) - 1] + _fence_mod_by_tileh_sw[ti->tileh], PAL_NONE, ti->x, ti->y, z);
|
||||
DrawGroundSpriteAt(_clear_land_fence_sprites[GetFenceSW(ti->tile) - 1] + _fence_mod_by_tileh_sw[ti->tileh], PAL_NONE, 0, 0, z);
|
||||
}
|
||||
|
||||
if (GetFenceSE(ti->tile) != 0) {
|
||||
DrawGroundSpriteAt(_clear_land_fence_sprites[GetFenceSE(ti->tile) - 1] + _fence_mod_by_tileh_se[ti->tileh], PAL_NONE, ti->x, ti->y, z);
|
||||
DrawGroundSpriteAt(_clear_land_fence_sprites[GetFenceSE(ti->tile) - 1] + _fence_mod_by_tileh_se[ti->tileh], PAL_NONE, 0, 0, z);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user