Intersting behavior of editor palette when palette tile size is wrong

Found a bug in R'n'D? Report it here!

Moderators: Zomis, Flumminator

Post Reply
Eizzoux
Posts: 307
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Intersting behavior of editor palette when palette tile size is wrong

Post by Eizzoux » Tue Feb 19, 2019 3:49 pm

Once a time, just for a fun, I opened "autosetup.conf" which for now only contains one setup - "editor.zoom_tilesize: X", where X is only intended to be one of specific values: 4, 8, 16, 32. So I started messing with it and replacing it with some values unintended to be supported by the game.
For example, here's original view of the level with 'tile_size = 32':
32
32
mess1.png (157.94 KiB) Viewed 410 times
Here's what it looks like with 'tile_size = 5':
5
5
mess2.png (557.96 KiB) Viewed 410 times
Then here's 'tile_size = 30':
30
30
mess3.png (472.13 KiB) Viewed 410 times
And last, 'tile_size = 13':
13
13
mess4.png (593.4 KiB) Viewed 410 times
As you can see, it really messes with the sprites since they were not supposed to be shrunk to these sizes.
What's even more interesting, when you try to zoom in/out by pressing +/- or just clicking on intended toolbox button, it doesn't fix to one of intended tile sizes just yet, it instead doubles the size or shrinks to twice smaller tiles depending on what are you doing. Like, if you did 'tile_size = 7' and then press +, 'tile_size' will be changed to 14 instead of closest intended number 8. But at least this number won't be able to go beyond 32 since it's the biggest number supported. I'm also fascinated that game easily handles dividing uneven value of tile size by 2. When I tried 'tile_size = 29' and pressed - in editor, value changed to 14. Good! But still strange behavior... Understandable, since Holger didn't except anybody to get in the conf and change number to those unsupported numbers :lol:
Nothing in here...*

User avatar
Holger
Site Admin
Posts: 3225
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Intersting behavior of editor palette when palette tile size is wrong

Post by Holger » Tue Feb 19, 2019 4:02 pm

This is really embarrassing! :shock:

I really must do a better sanity check for input values that come from outside the program! :o

User avatar
Holger
Site Admin
Posts: 3225
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Intersting behavior of editor palette when palette tile size is wrong

Post by Holger » Thu Feb 21, 2019 7:26 am

Fixed now for this especially nasty case! :D

Post Reply