Change: Draw north-side farm fences/hedges/walls on tile edge, instead of 1/16th in.

This matches original TTD drawing behaviour, which is what the original baseset sprites are designed for, and avoids alignment issues (which are more problematic with high detail 4x sprites.)
pull/661/head
Peter Nelson 4 months ago committed by Michael Lutz
parent fa64fff4a5
commit d6c5efd795

@ -69,14 +69,14 @@ static void DrawClearLandFence(const TileInfo *ti)
if (fence_nw != 0) {
int z = GetSlopePixelZInCorner(ti->tileh, CORNER_W);
SpriteID sprite = _clear_land_fence_sprites[fence_nw - 1] + _fence_mod_by_tileh_nw[ti->tileh];
AddSortableSpriteToDraw(sprite, PAL_NONE, ti->x, ti->y - 15, 16, 31, maxz - z + 4, ti->z + z, false, 0, 15, -z);
AddSortableSpriteToDraw(sprite, PAL_NONE, ti->x, ti->y - 16, 16, 32, maxz - z + 4, ti->z + z, false, 0, 16, -z);
}
uint fence_ne = GetFence(ti->tile, DIAGDIR_NE);
if (fence_ne != 0) {
int z = GetSlopePixelZInCorner(ti->tileh, CORNER_E);
SpriteID sprite = _clear_land_fence_sprites[fence_ne - 1] + _fence_mod_by_tileh_ne[ti->tileh];
AddSortableSpriteToDraw(sprite, PAL_NONE, ti->x - 15, ti->y, 31, 16, maxz - z + 4, ti->z + z, false, 15, 0, -z);
AddSortableSpriteToDraw(sprite, PAL_NONE, ti->x - 16, ti->y, 32, 16, maxz - z + 4, ti->z + z, false, 16, 0, -z);
}
uint fence_sw = GetFence(ti->tile, DIAGDIR_SW);

Loading…
Cancel
Save