# HG changeset patch # User Matti Hamalainen # Date 1586949611 -10800 # Node ID ac42dccc6b7c03ab848588e4de106ada3d905a53 # Parent 375da267d9944d832658457672be1488258a4523 Allow the -R option of gfxconv to be specified as '-R auto[+remove]' for remapping the palette without specifying any manual remaps. diff -r 375da267d994 -r ac42dccc6b7c tools/gfxconv.c --- a/tools/gfxconv.c Wed Apr 15 14:18:43 2020 +0300 +++ b/tools/gfxconv.c Wed Apr 15 14:20:11 2020 +0300 @@ -182,7 +182,7 @@ { 34, 'B', "bpp" , "Bits per plane (some output formats)", OPT_ARGREQ }, { 36, 'I', "interleave" , "Interleaved/planar output (some output formats)", OPT_NONE }, { 38, 'C', "compress" , "Use compression -C <0-9>, 0 = disable, default is 9", OPT_ARGREQ }, - { 42, 'R', "remap" , "Remap output image colors (-R <(#RRGGBB|index):index>[,<..>][+remove] | -R @map.txt[+remove])", OPT_ARGREQ }, + { 42, 'R', "remap" , "Remap output image colors (-R <(#RRGGBB|index):index>[,<..>][+remove] | -R auto[+remove] | -R @map.txt[+remove])", OPT_ARGREQ }, { 44, 0, "char-rom" , "Set character ROM file to be used.", OPT_ARGREQ }, { 46, 'p', "palette" , "Set C64 palette to be used (see list with -p help).", OPT_ARGREQ }, }; @@ -954,6 +954,7 @@ } } else + if (dm_strcasecmp(optArg, "auto") != 0) { if (!dmParseMapOptionString(optArg, optRemapTable, &optNRemapTable, DM_MAX_COLORS, TRUE, "color remap option"))