Cancel -U option

As it turns out, it is really difficult to implement, and can be dealt with later.
This commit is contained in:
ISSOtm
2022-07-02 16:35:49 +02:00
committed by Eldred Habert
parent 87092208bc
commit ca8693690a
3 changed files with 5 additions and 24 deletions

View File

@@ -52,7 +52,6 @@ struct Options {
std::string palmap{}; // -q, -Q std::string palmap{}; // -q, -Q
uint8_t nbColorsPerPal = 0; // -s; 0 means "auto" = 1 << bitDepth; uint8_t nbColorsPerPal = 0; // -s; 0 means "auto" = 1 << bitDepth;
std::string tilemap{}; // -t, -T std::string tilemap{}; // -t, -T
std::array<uint16_t, 2> unitSize{1, 1}; // -U (in tiles)
uint64_t trim = 0; // -x uint64_t trim = 0; // -x
std::string input{}; // positional arg std::string input{}; // positional arg

View File

@@ -29,7 +29,6 @@
.Op Fl q Ar pal_map | Fl Q .Op Fl q Ar pal_map | Fl Q
.Op Fl s Ar nb_colors .Op Fl s Ar nb_colors
.Op Fl t Ar tilemap | Fl T .Op Fl t Ar tilemap | Fl T
.Op Fl U Ar unit_size
.Op Fl x Ar quantity .Op Fl x Ar quantity
.Ar file .Ar file
.Sh DESCRIPTION .Sh DESCRIPTION
@@ -256,21 +255,6 @@ where
.Ar path .Ar path
is the input image's path with the extension set to is the input image's path with the extension set to
.Pa .tilemap . .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 .It Fl u , Fl Fl unique-tiles
Deduplicate identical tiles, and omit the duplicates from the tile data file. Deduplicate identical tiles, and omit the duplicates from the tile data file.
Useful with a tile map Useful with a tile map

View File

@@ -138,13 +138,13 @@ static struct option const longopts[] = {
static void printUsage(void) { static void printUsage(void) {
fputs("Usage: rgbgfx [-r stride] [-CmuVZ] [-v [-v ...]] [-a <attr_map> | -A]\n" 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" " [-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_mal> | -Q ]\n" " [-n <nb_pals>] [-o <out_file>] [-p <pal_file> | -P] [-q <pal_map> | -Q]\n"
" [-s nb_colors] [-t <tile_map> | -T] [-U unit_size] [-x <tiles>] <file>\n" " [-s <nb_colors>] [-t <tile_map> | -T] [-x <nb_tiles>] <file>\n"
"Useful options:\n" "Useful options:\n"
" -m, --mirror-tiles optimize out mirrored tiles\n" " -m, --mirror-tiles optimize out mirrored tiles\n"
" -o, --output <path> set the output binary file\n" " -o, --output <path> output the tile data to this path\n"
" -t, --tilemap <path> set the output tilemap file\n" " -t, --tilemap <path> output the tile map to this path\n"
" -u, --unique-tiles optimize out identical tiles\n" " -u, --unique-tiles optimize out identical tiles\n"
" -V, --version print RGBGFX version and exit\n" " -V, --version print RGBGFX version and exit\n"
"\n" "\n"
@@ -730,8 +730,6 @@ int main(int argc, char *argv[]) {
} }
fputs("\t]\n", stderr); fputs("\t]\n", stderr);
} }
fprintf(stderr, "\tDedup unit: %" PRIu16 "x%" PRIu16 " tiles\n", options.unitSize[0],
options.unitSize[1]);
fprintf(stderr, fprintf(stderr,
"\tInput image slice: %" PRIu32 "x%" PRIu32 " pixels starting at (%" PRIi32 "\tInput image slice: %" PRIu32 "x%" PRIu32 " pixels starting at (%" PRIi32
", %" PRIi32 ")\n", ", %" PRIi32 ")\n",