shithub: rgbds

Download patch

ref: 6feb1fb73a0c6e3127ab58f82d4673f3aba2c06c
parent: dc67f152a953b277860c76eaaeae6e221e4e8ab7
author: ISSOtm <[email protected]>
date: Tue Apr 12 19:55:10 EDT 2022

Retire `-f`

--- a/include/gfx/main.hpp
+++ b/include/gfx/main.hpp
@@ -24,7 +24,6 @@
 	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
--- a/man/rgbgfx.1
+++ b/man/rgbgfx.1
@@ -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 @@
 .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 @@
 .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 .
--- a/src/gfx/main.cpp
+++ b/src/gfx/main.cpp
@@ -130,7 +130,7 @@
 };
 
 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 @@
 				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 @@
 				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 @@
 				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 @@
 		}
 
 		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)