dansanderson / picotool

Tools and Python libraries for manipulating Pico-8 game files. http://www.lexaloffle.com/pico-8.php
MIT License
367 stars 46 forks source link

__gfx__ and __gff__ sections filled out unnecessarily #61

Open benwiley4000 opened 5 years ago

benwiley4000 commented 5 years ago

Seems like when to_lines is called for gfx and gff we end up with a bunch of empty data rows we don't need if those sections aren't full already. Not really the end of the world, but inflates the file size more than necessary.

I took a look at the code but wasn't able to quickly figure out why these sections behave differently than others.

GiovanH commented 2 years ago

I'm not experiencing this issue with gfx after running luafmt. What command are you using that generates the extra output?

Experimenting a bit here, but obviously trimmed output doesn't match the expected test cases: https://github.com/GiovanH/picotool/tree/no-trailing