Add -invertsize switch to PNG -> NCLR pipeline

This commit is contained in:
Rachel 2024-10-28 11:37:56 -07:00
parent e8ea772119
commit 7f334e6cc3

7
main.c
View File

@ -565,6 +565,7 @@ void HandlePngToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, c
int bitdepth = 0;
int compNum = 0;
bool pcmp = false;
bool inverted = false;
for (int i = 3; i < argc; i++)
{
@ -612,6 +613,10 @@ void HandlePngToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, c
{
pcmp = true;
}
else if (strcmp(option, "-invertsize") == 0)
{
inverted = true;
}
else
{
FATAL_ERROR("Unrecognized option \"%s\".\n", option);
@ -619,7 +624,7 @@ void HandlePngToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, c
}
ReadPngPalette(inputPath, &palette);
WriteNtrPalette(outputPath, &palette, ncpr, ir, bitdepth, !nopad, compNum, pcmp, false);
WriteNtrPalette(outputPath, &palette, ncpr, ir, bitdepth, !nopad, compNum, pcmp, inverted);
}
void HandleGbaToJascPaletteCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)