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

Fix picotool to work with p8 carts that use CRLF line endings #100

Open scottnm opened 2 years ago

scottnm commented 2 years ago

picotool fails to read p8 carts which use CRLF line endings

this generally isn't a huge issue but git and windows make for really annoying problems dealing with line endings and given pico8 supports carts with CRLF line endings, it seems like a nice convenience for picotool to support both as well

this change...

  1. Fixes picotool to support CRLF line endings
  2. Fixes picotool to provide better error messages when a file fails to parse due to invalid headers
  3. Updates the gitattributes so that git won't try to normalize the line endings of the test p8 cart files in the repo
  4. Adds a new test for verifying that p8 carts with CRLF line endings are parsed correctly
  5. Adds an automated test when merging to master to validate that the tests all pass on both Windows and Ubuntu