Resizing a map in the editor can mess up the map design
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
Resizing a map in the editor can mess up the map design
I found a problem with the editor (v1.8.2) which probably is unavoidable due to the way Wesnoth handles maps.
If you resize a map on the x-axis and put the anchor on the right side, i.e. expanding the map to the left or shrinking it on the left, then the map gets completely messed up IF you resize by an odd amount of tiles. The reason for this is that the tile (1,0) is always north-east to the tile (0,0). When you strip away the left-most column of the map, for example, which I assume is internally stored in a simple two-dimensional cartesian array, then the new (1,0) (old: 2,0) should now be to the south-east of the new (0,0) (old: 1,0). Given that Wesnoth doesn't do that, every even column is now shifted vertically compared to its original, messing up the original map design.
Similarily, if you resize the map on the x-axis and put the anchor in the middle, i.e. expanding or shrinking to both sides equally, this seems to only work when resizing by an integer multiple of 4. Other cases mess up the map as well.
I assume this is unavoidable, but it might be a good idea to place a message in the resize window informing the user when resizing the map with the current settings would cause such a problem, like this:
If you resize a map on the x-axis and put the anchor on the right side, i.e. expanding the map to the left or shrinking it on the left, then the map gets completely messed up IF you resize by an odd amount of tiles. The reason for this is that the tile (1,0) is always north-east to the tile (0,0). When you strip away the left-most column of the map, for example, which I assume is internally stored in a simple two-dimensional cartesian array, then the new (1,0) (old: 2,0) should now be to the south-east of the new (0,0) (old: 1,0). Given that Wesnoth doesn't do that, every even column is now shifted vertically compared to its original, messing up the original map design.
Similarily, if you resize the map on the x-axis and put the anchor in the middle, i.e. expanding or shrinking to both sides equally, this seems to only work when resizing by an integer multiple of 4. Other cases mess up the map as well.
I assume this is unavoidable, but it might be a good idea to place a message in the resize window informing the user when resizing the map with the current settings would cause such a problem, like this:
The Cost Of Living (1.8): main thread, feedback thread
Re: Resizing a map in the editor can mess up the map design
http://www.wesnoth.org/forum/viewtopic.php?f=4&t=29014
you might want to file a bug report (feature request for the warning message) so it wont be forgotten:
http://wiki.wesnoth.org/ReportingBugs
you might want to file a bug report (feature request for the warning message) so it wont be forgotten:
http://wiki.wesnoth.org/ReportingBugs