dansanderson / picotool

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

writep8 arg producing png not p8 #67

Open benbaker76 opened 4 years ago

benbaker76 commented 4 years ago

Using the writep8 arg will create a png not a p8 file.

./p8tool writep8 9970.p8.png
9970.p8.png -> 9970_fmt.p8.png

It should create 9970_fmt.p8 not 9970_fmt.p8.png. In tool.py need to change

            if fname.endswith('.p8.png'):
                out_fname = fname[:-len('.p8.png')] + '_fmt.p8.png'

to

            if fname.endswith('.p8.png'):
                out_fname = fname[:-len('.p8.png')] + '_fmt.p8'