Commit Graph

57 Commits

Author SHA1 Message Date
ISSOtm
fcce42d3d2 Avoid sorting proto-palettes breaking mappings
The sorting was performed without updating the mappings, which broke the world.
We can instead sort the IDs as they are inserted into the packing queue,
which should also be faster than moving the actual proto-pal objects around.
2022-07-02 17:04:17 +02:00
ISSOtm
f5d4126303 Report when an input "tile" contains too many colors
Which otherwise trips a later assertion in debug mode (phew!)
and crashes in release mode (oops)
2022-07-02 17:04:17 +02:00
ISSOtm
78e751f022 Fix reading interlaced PNGs
Either we let libpng handle the transform, or we don't.
But make up your mind!
2022-07-02 17:04:17 +02:00
ISSOtm
d569c6392c Avoid initializing the PNG row
It gets overwritten right after, and uncovers an error in the interlaced read
2022-07-02 17:04:17 +02:00
ISSOtm
b1aec91912 Assert that row size is not null
Silences some static analysis warning
2022-07-02 17:04:17 +02:00
ISSOtm
cc27169ecd Implement preliminary version of "reverse" feature
Not hooked to all RGBGFX flags yet, but good enough for most use cases
(and as a base for future development, should I need to `reset --hard`.)

TODOs marked appropriately.
2022-07-02 17:04:17 +02:00
ISSOtm
188027bccc Rename convert to process
More consistent with its "main" function's name
2022-07-02 17:04:17 +02:00