Changeset - r28739:8ca07a87b860
[Not reviewed]
master
0 1 0
Peter Nelson - 10 months ago 2024-02-08 18:32:21
peter1138@openttd.org
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.)
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/clear_cmd.cpp
Show inline comments
 
@@ -69,14 +69,14 @@ static void DrawClearLandFence(const Til
 
	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);
0 comments (0 inline, 0 general)