diff options
author | Sierraffinity <sierra@domoreaweso.me> | 2020-04-22 15:03:58 -0700 |
---|---|---|
committer | Sierraffinity <sierra@domoreaweso.me> | 2020-04-22 15:03:58 -0700 |
commit | ef107002b58360787bfe7541cdf9e734457104dc (patch) | |
tree | 52e3868c8c2cbeac3e68b5ed959c94c113beaf69 /tools/gbagfx/lz.c | |
parent | a97d3d7725409f5f5a5e223ebefede3bd02f179c (diff) |
gbagfx: Various fixes and improvements
Bring over Huffman compression/decompression from pokeemerald
Fix num_colors exceeding amount of colors in palette leading to use of uninitialized colors
Handle png -> pal conversion (aka extracting JASC palettes from png)
Allow JASC pal files to be used as -palette argument when converting from GBA to PNG
Allow using only file extension as output to reuse entire path from input before extension
Diffstat (limited to 'tools/gbagfx/lz.c')
-rw-r--r-- | tools/gbagfx/lz.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/gbagfx/lz.c b/tools/gbagfx/lz.c index c2ba3e327..97434ce50 100644 --- a/tools/gbagfx/lz.c +++ b/tools/gbagfx/lz.c @@ -69,10 +69,8 @@ fail: FATAL_ERROR("Fatal error while decompressing LZ file.\n"); } -unsigned char *LZCompress(unsigned char *src, int srcSize, int *compressedSize) +unsigned char *LZCompress(unsigned char *src, int srcSize, int *compressedSize, const int minDistance) { - const int minDistance = 2; // for compatibility with LZ77UnCompVram() - if (srcSize <= 0) goto fail; |