diff options
Diffstat (limited to 'tools/nitrogfx/main.c')
-rw-r--r-- | tools/nitrogfx/main.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/tools/nitrogfx/main.c b/tools/nitrogfx/main.c index 2f5b2735..0aaad201 100644 --- a/tools/nitrogfx/main.c +++ b/tools/nitrogfx/main.c @@ -88,7 +88,7 @@ void ConvertPngToNtr(char *inputPath, char *outputPath, struct PngToNtrOptions * ReadPng(inputPath, &image); - WriteNtrImage(outputPath, options->numTiles, options->bitDepth, options->metatileWidth, options->metatileHeight, &image, !image.hasPalette, options->clobberSize, options->byteOrder); + WriteNtrImage(outputPath, options->numTiles, image.bitDepth, options->metatileWidth, options->metatileHeight, &image, !image.hasPalette, options->clobberSize, options->byteOrder, options->version101, options->sopc); FreeImage(&image); } @@ -320,6 +320,8 @@ void HandlePngToNtrCommand(char *inputPath, char *outputPath, int argc, char **a options.metatileHeight = 1; options.clobberSize = false; options.byteOrder = true; + options.version101 = false; + options.sopc = false; for (int i = 3; i < argc; i++) { @@ -385,6 +387,14 @@ void HandlePngToNtrCommand(char *inputPath, char *outputPath, int argc, char **a { options.byteOrder = false; } + else if (strcmp(option, "-version101") == 0) + { + options.version101 = true; + } + else if (strcmp(option, "-sopc") == 0) + { + options.sopc = true; + } else { FATAL_ERROR("Unrecognized option \"%s\".\n", option); @@ -406,6 +416,7 @@ void HandlePngToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, c { struct Palette palette; bool ncpr = false; + bool ir = false; for (int i = 3; i < argc; i++) { @@ -415,6 +426,10 @@ void HandlePngToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, c { ncpr = true; } + else if (strcmp(option, "-ir") == 0) + { + ir = true; + } else { FATAL_ERROR("Unrecognized option \"%s\".\n", option); @@ -422,7 +437,7 @@ void HandlePngToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, c } ReadPngPalette(inputPath, &palette); - WriteNtrPalette(outputPath, &palette, ncpr); + WriteNtrPalette(outputPath, &palette, ncpr, ir); } void HandleGbaToJascPaletteCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED) @@ -482,6 +497,7 @@ void HandleJascToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, { int numColors = 0; bool ncpr = false; + bool ir = false; for (int i = 3; i < argc; i++) { @@ -504,6 +520,10 @@ void HandleJascToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, { ncpr = true; } + else if (strcmp(option, "-ir") == 0) + { + ir = true; + } else { FATAL_ERROR("Unrecognized option \"%s\".\n", option); @@ -517,7 +537,7 @@ void HandleJascToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, if (numColors != 0) palette.numColors = numColors; - WriteNtrPalette(outputPath, &palette, ncpr); + WriteNtrPalette(outputPath, &palette, ncpr, ir); } void HandleLatinFontToPngCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED) |