#86449: For unscaled tilesets with tiles higher than 64px, borders and solid background are cropped to top 64px Open Date: 2024-05-22 20:31 Last Update: 2024-05-22 20:31 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/86449 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=86449 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2024-05-22 20:31 Updated by: illvilja * New Ticket "For unscaled tilesets with tiles higher than 64px, borders and solid background are cropped to top 64px" created --------------------------------------------------------------------- Ticket Status: Reporter: illvilja Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: (None) Component: Client common Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: When creating tilesets which have large tiles borders and solid background are cropped to the top 64 pixels unless the tileset has a scale different from 1.0. Regardless of scale of tileset or size of tiles, borders and solid background graphics should never cropped. Especially national borders are valuable for the player. My submitted patch is very simple (and thus very simple to review!) as it consists of simplifying 6 lines of code to 2 lines! The unpatched code will test if scale equals 1.0 (which I think it always does) and if so, it assumes tiles are not wider than the hardcoded value of 128 and not higher than a hardcoded value of 64. The else clause (if scale differs from 1.0 which I think never happens) makes the sensible thing, it uses the current tileset's max width and max height instead of any hardcoded (and perhaps too small) values. My patch simply does away with the test vs the value of scale being 1.0 and removes the useless "then" clause. Then only thing left is the useful else clause that does not use hardcoded values! (After reading the source, I have not found any way to actually set the scale at all, so I cannot see how the scale can be different from 1.0 anyway.) -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/86449 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=86449