ISSOtm
87092208bc
Stop passing options.columnMajor explicitly everywhere
2022-07-02 17:04:17 +02:00
ISSOtm
0d32775a1f
Add more sanity checks when reversing an image
2022-07-02 17:04:17 +02:00
ISSOtm
0df07d3688
Add note on supporting extra pal formats
2022-07-02 17:04:17 +02:00
ISSOtm
3f70372308
Implement slicing input image
2022-07-02 17:04:17 +02:00
ISSOtm
9646f15b59
Add error message for nigh-impossible proto-palette overflow
2022-07-02 17:04:17 +02:00
ISSOtm
973fbb91bc
Improve error message when a tile has too many colors
2022-07-02 17:04:17 +02:00
ISSOtm
903862c451
Improve flag set generation of RGBGFX tests
...
Less duplication = good
2022-07-02 17:04:17 +02:00
ISSOtm
3f5983358c
Add proper error message for bad manual palettes
2022-07-02 17:04:17 +02:00
ISSOtm
7a7126f3b8
Implement bit flipping with a lookup table
...
Should improve performance.
This version is cooler, and also does not suffer from iteration limits
2022-07-02 17:04:17 +02:00
ISSOtm
b4dadd35b6
Use an iterator zip
...
Simplifies iterating over tiles and attributes at the same time
2022-07-02 17:04:17 +02:00
ISSOtm
d9b1402ef8
Fix RGBGFX number parsing
2022-07-02 17:04:17 +02:00
ISSOtm
832e0ec972
Report position in color errors
2022-07-02 17:04:17 +02:00
ISSOtm
caaf7a8444
Test VRA0 size as well in randtilegen tests
2022-07-02 17:04:17 +02:00
ISSOtm
a5ed0292b1
Reject colors with ambiguous alpha channel
2022-07-02 17:04:17 +02:00
ISSOtm
05e36767b0
Implement "palette map" output
2022-07-02 17:04:17 +02:00
ISSOtm
531092f5bd
Add corrupted PNGs to check error handling
...
This is not intended to test libpng as much as checking that
we behave correctly if libpng gives us an error
2022-07-02 17:04:17 +02:00
ISSOtm
4c51792f15
Allow testing RGBGFX with specific images as input
...
No such tests yet, but the infrastructure will be there.
2022-07-02 17:04:17 +02:00
ISSOtm
c4359c1058
Ignore -b and -N when reversing without tilemap
...
These offsets should only be applied to a tile ID read as input... but this ain't one!
2022-07-02 17:04:17 +02:00
ISSOtm
159efe1257
Transfer test programs as well for cross-testing
2022-07-02 17:04:17 +02:00
ISSOtm
3cfe7800c7
Make randtilegen and rgbgfx_test compile with MSVC
2022-07-02 17:04:17 +02:00
ISSOtm
01cf0c5f98
Print RGBGFX test names
2022-07-02 17:04:17 +02:00
ISSOtm
0dbcebfeb4
Have CMake build and install steps be verbose
2022-07-02 17:04:17 +02:00
ISSOtm
491b6746ab
Clean RGBGFX test programs with make clean
2022-07-02 17:04:17 +02:00
ISSOtm
cbf6fadcdb
Add RGBGFX tests
2022-07-02 17:04:17 +02:00
ISSOtm
a77b0b396a
Fix grayscale sorting not setting palette size
...
A black+white palette would turn into white+transparent, removing black pixels
from the palette (the third slot would be empty, and the 4th slot be set directly)
2022-07-02 17:04:17 +02:00
ISSOtm
568fb5e4c8
Only report "fusing" different colors once per pair
2022-07-02 17:04:17 +02:00
ISSOtm
82012f698e
Fix alpha channel checking in RGBGFX test driver
...
Compare CGB colors only, including ignoring RGB components if alpha says
the color is transparent
2022-07-02 17:04:17 +02:00
ISSOtm
57ac07b03e
Correctly handle fully-transparent tiles when outputting unoptimized tilemap
2022-07-02 17:04:17 +02:00
ISSOtm
c521233499
Fix ProtoPalette::compare
...
Some disjoint sets were mistakenly reported not as such
For example, {0} was considered to include {1}.
2022-07-02 17:04:17 +02:00
ISSOtm
bf869f6961
Fix memory leak in test driver program
...
Teeny tiny
2022-07-02 17:04:17 +02:00
ISSOtm
0f8cbb1faf
Generate all necessary files for RGBGFX tests
2022-07-02 17:04:17 +02:00
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
Eievui
ed104a9f70
Add rgbgfx test program
...
Co-Authored-By: ISSOtm <eldredhabert0@gmail.com >
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
75b9d48990
Make randtilegen report the file names it fails to open
...
Which of the two is erroring out can be inferred from the file name,
anyway.
2022-07-02 17:04:17 +02:00
ISSOtm
3aabe9c799
Move randtilegen to test/gfx subdir
...
It's tool-specific, so categorize it where it belongs
2022-07-02 17:04:17 +02:00
ISSOtm
5be2b96b40
Remove incorrect check for reversed image width
...
That check was when the image width was in tiles, and another check right below
is the correct equivalent for the new pixel-unit argument
2022-07-02 17:04:17 +02:00
ISSOtm
7fdfbbbbba
Fix inverted condition in tile dedup warning
2022-07-02 17:04:17 +02:00
ISSOtm
7fdc6cbced
Fix erroneous tabs in rgbgfx usage text
...
Thanks @GreenAndEievui!
2022-07-02 17:04:17 +02:00
ISSOtm
56115653ef
Include cross-ref link to at-files where mentioned
2022-07-02 17:04:17 +02:00
ISSOtm
7927dfd2e3
Remove negative values in parseNumber checking
...
Including removal of a dead & useless check.
By the way, fuck integer promotion.
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
7defaad9d2
Remove placeholder palette output format from -p
...
This is now described in its own section
2022-07-02 17:04:17 +02:00
ISSOtm
dc9185e50b
Make output format descriptions more succinct and link to Pan Docs
2022-07-02 17:04:17 +02:00
ISSOtm
02d957278d
Document output formats
2022-07-02 17:04:17 +02:00
ISSOtm
6feb1fb73a
Retire -f
2022-07-02 17:04:17 +02:00
ISSOtm
dc67f152a9
Document accepted external palette formats
2022-07-02 17:04:17 +02:00
ISSOtm
913c3dd711
Accept both colons and semicolons in inline pal spec
2022-07-02 17:04:17 +02:00