shithub: rgbds

Download patch

ref: ca8693690ab7c0a1456348c733fbaf905754d73f
parent: 87092208bc364cde15391a73df614e5889f8e63c
author: ISSOtm <eldredhabert0@gmail.com>
date: Sat Jul 2 12:35:49 EDT 2022

Cancel `-U` option

As it turns out, it is really difficult to implement, and can be dealt with later.

--- a/include/gfx/main.hpp
+++ b/include/gfx/main.hpp
@@ -52,7 +52,6 @@
 	std::string palmap{}; // -q, -Q
 	uint8_t nbColorsPerPal = 0; // -s; 0 means "auto" = 1 << bitDepth;
 	std::string tilemap{}; // -t, -T
-	std::array<uint16_t, 2> unitSize{1, 1}; // -U (in tiles)
 	uint64_t trim = 0; // -x
 
 	std::string input{}; // positional arg
--- a/man/rgbgfx.1
+++ b/man/rgbgfx.1
@@ -29,7 +29,6 @@
 .Op Fl q Ar pal_map | Fl Q
 .Op Fl s Ar nb_colors
 .Op Fl t Ar tilemap | Fl T
-.Op Fl U Ar unit_size
 .Op Fl x Ar quantity
 .Ar file
 .Sh DESCRIPTION
@@ -256,21 +255,6 @@
 .Ar path
 is the input image's path with the extension set to
 .Pa .tilemap .
-.It Fl U Ar unit_size , Fl Fl unit-size Ar unit_size
-Set the deduplication
-.Dq unit
-size to
-.Ar unit_size ,
-which should be two comma-separated tile counts (width then height).
-Defaults to
-.Ql 1,1 ,
-i.e. one tile.
-.Fl U Cm 1,2
-is particularly useful for the
-.Dq 8\[tmu]16
-OAM mode.
-.Pp
-.Sy TODO: describe how this affects the dedup process, and how the image is visited .
 .It Fl u , Fl Fl unique-tiles
 Deduplicate identical tiles, and omit the duplicates from the tile data file.
 Useful with a tile map
--- a/src/gfx/main.cpp
+++ b/src/gfx/main.cpp
@@ -138,13 +138,13 @@
 
 static void printUsage(void) {
 	fputs("Usage: rgbgfx [-r stride] [-CmuVZ] [-v [-v ...]] [-a <attr_map> | -A]\n"
-	      "       [-b base_ids] [-c color_spec] [-d <depth>] [-L slice] [-N nb_tiles]\n"
-	      "       [-n nb_pals] [-o <out_file>] [-p <pal_file> | -P] [-q <pal_mal> | -Q ]\n"
-	      "       [-s nb_colors] [-t <tile_map> | -T] [-U unit_size] [-x <tiles>] <file>\n"
+	      "       [-b <base_ids>] [-c <colors>] [-d <depth>] [-L <slice>] [-N <nb_tiles>]\n"
+	      "       [-n <nb_pals>] [-o <out_file>] [-p <pal_file> | -P] [-q <pal_map> | -Q]\n"
+	      "       [-s <nb_colors>] [-t <tile_map> | -T] [-x <nb_tiles>] <file>\n"
 	      "Useful options:\n"
 	      "    -m, --mirror-tiles    optimize out mirrored tiles\n"
-	      "    -o, --output <path>   set the output binary file\n"
-	      "    -t, --tilemap <path>  set the output tilemap file\n"
+	      "    -o, --output <path>   output the tile data to this path\n"
+	      "    -t, --tilemap <path>  output the tile map to this path\n"
 	      "    -u, --unique-tiles    optimize out identical tiles\n"
 	      "    -V, --version         print RGBGFX version and exit\n"
 	      "\n"
@@ -730,8 +730,6 @@
 			}
 			fputs("\t]\n", stderr);
 		}
-		fprintf(stderr, "\tDedup unit: %" PRIu16 "x%" PRIu16 " tiles\n", options.unitSize[0],
-		        options.unitSize[1]);
 		fprintf(stderr,
 		        "\tInput image slice: %" PRIu32 "x%" PRIu32 " pixels starting at (%" PRIi32
 		        ", %" PRIi32 ")\n",