Retire -f

This commit is contained in:
ISSOtm
2022-04-12 23:55:10 +02:00
committed by Eldred Habert
parent dc67f152a9
commit 6feb1fb73a
3 changed files with 10 additions and 30 deletions

View File

@@ -24,7 +24,6 @@ struct Options {
bool reverse() const { return reversedWidth != 0; } bool reverse() const { return reversedWidth != 0; }
bool useColorCurve = false; // -C bool useColorCurve = false; // -C
bool fixInput = false; // -f
bool allowMirroring = false; // -m bool allowMirroring = false; // -m
bool allowDedup = false; // -u bool allowDedup = false; // -u
bool columnMajor = false; // -Z, previously -h bool columnMajor = false; // -Z, previously -h

View File

@@ -15,7 +15,7 @@
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl r Ar stride .Op Fl r Ar stride
.Op Fl CfmuVZ .Op Fl CmuVZ
.Op Fl v Op Fl v No ... .Op Fl v Op Fl v No ...
.Op Fl a Ar attrmap | Fl A .Op Fl a Ar attrmap | Fl A
.Op Fl b Ar base_ids .Op Fl b Ar base_ids
@@ -156,17 +156,6 @@ for a list of formats and their descriptions.
.It Fl d Ar depth , Fl Fl depth Ar depth .It Fl d Ar depth , Fl Fl depth Ar depth
Set the bit depth of the output tile data, in bits per pixel (bpp), either 1 or 2 (the default). Set the bit depth of the output tile data, in bits per pixel (bpp), either 1 or 2 (the default).
This changes how tile data is output, and the maximum number of colors per palette (2 and 4 respectively). This changes how tile data is output, and the maximum number of colors per palette (2 and 4 respectively).
.It Fl f , Fl Fl fix
Make the input image an
.Em indexed
PNG.
.Sy TODO: before or after processing ?
Due to some changes in
.Nm Ap s behavior, this option does not really Dq fix
the input PNG anymore, and so it may be removed in a future RGBDS release.
To manipulate a PNG's format, using an external editor like GIMP or command-line tools like ImageMagick's
.Xr convert 1
program is recommended instead.
.It Fl L Ar slice , Fl Fl slice Ar slice .It Fl L Ar slice , Fl Fl slice Ar slice
Only process a given rectangle of the image. Only process a given rectangle of the image.
.Sy TODO: arg format . .Sy TODO: arg format .
@@ -497,12 +486,10 @@ assumes that no tiles were mirrored.
.El .El
.Sh NOTES .Sh NOTES
Some flags have had their functionality removed. Some flags have had their functionality removed.
.Fl D .Fl D , f ,
is now ignored,
.Fl F
now behaves like
.Fl f ,
and and
.Fl F
are now ignored, and
.Fl h .Fl h
is an alias for the new (and less confusingly named) is an alias for the new (and less confusingly named)
.Fl Z . .Fl Z .

View File

@@ -130,7 +130,7 @@ static struct option const longopts[] = {
}; };
static void printUsage(void) { static void printUsage(void) {
fputs("Usage: rgbgfx [-r] [-CfmuVZ] [-v [-v ...]] [-a <attr_map> | -A] [-b base_ids]\n" fputs("Usage: rgbgfx [-r] [-CmuVZ] [-v [-v ...]] [-a <attr_map> | -A] [-b base_ids]\n"
" [-c color_spec] [-d <depth>] [-L slice] [-N nb_tiles] [-n nb_pals]\n" " [-c color_spec] [-d <depth>] [-L slice] [-N nb_tiles] [-n nb_pals]\n"
" [-o <out_file>] [-p <pal_file> | -P] [-s nb_colors] [-t <tile_map> | -T]\n" " [-o <out_file>] [-p <pal_file> | -P] [-s nb_colors] [-t <tile_map> | -T]\n"
" [-U unit_size] [-x <tiles>] <file>\n" " [-U unit_size] [-x <tiles>] <file>\n"
@@ -377,9 +377,6 @@ static char *parseArgv(int argc, char **argv, bool &autoAttrmap, bool &autoTilem
externalPalSpec = musl_optarg; externalPalSpec = musl_optarg;
} }
break; break;
case 'D':
warning("Ignoring retired option `-D`");
break;
case 'd': case 'd':
options.bitDepth = parseNumber(arg, "Bit depth", 2); options.bitDepth = parseNumber(arg, "Bit depth", 2);
if (*arg != '\0') { if (*arg != '\0') {
@@ -389,12 +386,6 @@ static char *parseArgv(int argc, char **argv, bool &autoAttrmap, bool &autoTilem
options.bitDepth = 2; options.bitDepth = 2;
} }
break; break;
case 'F':
warning("`-F` is now deprecated, and behaves like `-f`");
[[fallthrough]];
case 'f':
options.fixInput = true;
break;
case 'L': case 'L':
options.inputSlice = {0, 0, 0, 0}; // TODO options.inputSlice = {0, 0, 0, 0}; // TODO
break; break;
@@ -506,6 +497,11 @@ static char *parseArgv(int argc, char **argv, bool &autoAttrmap, bool &autoTilem
registerInput(musl_optarg); registerInput(musl_optarg);
} }
break; break;
case 'D':
case 'F':
case 'f':
warning("Ignoring retired option `-%c`", opt);
break;
default: default:
printUsage(); printUsage();
exit(1); exit(1);
@@ -647,8 +643,6 @@ int main(int argc, char *argv[]) {
} }
fputs("Options:\n", stderr); fputs("Options:\n", stderr);
if (options.fixInput)
fputs("\tConvert input to indexed\n", stderr);
if (options.columnMajor) if (options.columnMajor)
fputs("\tVisit image in column-major order\n", stderr); fputs("\tVisit image in column-major order\n", stderr);
if (options.allowMirroring) if (options.allowMirroring)