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 useColorCurve = false; // -C
bool fixInput = false; // -f
bool allowMirroring = false; // -m
bool allowDedup = false; // -u
bool columnMajor = false; // -Z, previously -h

View File

@@ -15,7 +15,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl r Ar stride
.Op Fl CfmuVZ
.Op Fl CmuVZ
.Op Fl v Op Fl v No ...
.Op Fl a Ar attrmap | Fl A
.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
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).
.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
Only process a given rectangle of the image.
.Sy TODO: arg format .
@@ -497,12 +486,10 @@ assumes that no tiles were mirrored.
.El
.Sh NOTES
Some flags have had their functionality removed.
.Fl D
is now ignored,
.Fl F
now behaves like
.Fl f ,
.Fl D , f ,
and
.Fl F
are now ignored, and
.Fl h
is an alias for the new (and less confusingly named)
.Fl Z .

View File

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