zladx/LADX-Disassembly

Make the PNG graphics easier to edit

kemenaran opened this issue · 1 comments

Tiles data are stored as PNG files. However sometimes the 4-tiles objects are not aligned: instead they are split between multiple rows or columns.

Exemple
dungeon_a cgb

These files should be converted to a PNG layout easier to edit. The original layout of the binary file could be restored at compile time.

Result
dungeon_a cgb w16 interleave

How

Different projects have different methods to deal with this issue. One is to add special commands to the PNG filename (like .w16.interleave.png), and then to use pret's gfx.py tool to convert the PNG back to 2bpp.

However this requires users building the code to have a working Python2 installation on their computer.

Another solution would be to add support for interleaved formats to rgbgfx (which is in C, bundled with rgbasm, and generally quite fast). But that's more code to write.

(Also pokecrystal has an intermediary solution with a Python script wrapping the original gfx.py; this may be a thing to look at).