@@ -97,6 +97,15 @@ constexpr auto verbose_arg = optional_argument("--verbose", "Display all input f
9797
9898constexpr auto help_arg = optional_argument(" --help" , " Show usage information." );
9999
100+ // Advanced options.
101+ constexpr auto alpha_black_arg = optional_arg{" --bc1-alpha-black" , " -bc1-ab" ,
102+ " The BC1 encoder will use 3 color blocks for blocks containing black or very dark pixels. Increases texture quality "
103+ " substantially, but programs using these textures must ignore the alpha channel." };
104+
105+ constexpr auto report_arg =
106+ optional_arg{" --report" , " -rp" , " Prints information about the encoding process of each file." };
107+
108+ // Positional arguments.
100109constexpr std::string_view input_name = " input" ;
101110constexpr std::string_view input_help =
102111 " Encode all PNG files inside of this folder as DDS. It can also point to a single PNG file. "
@@ -108,10 +117,6 @@ constexpr std::string_view output_help =
108117 " Write DDS files to this folder instead of creating them next to input PNGs. This argument is ignored if input "
109118 " points to a TXT file." ;
110119
111- constexpr auto alpha_black_arg = optional_arg{" --bc1-alpha-black" , " -bc1-ab" ,
112- " The BC1 encoder will use 3 color blocks for blocks containing black or very dark pixels. Increases texture quality "
113- " substantially, but programs using these textures must ignore the alpha channel." };
114-
115120consteval std::size_t argument_name_total_space () {
116121 std::size_t max_space{};
117122 max_space = std::max (max_space, clean_arg.name .size () + clean_arg.shorter .size () + 2UL );
@@ -135,9 +140,10 @@ consteval std::size_t argument_name_total_space() {
135140 max_space = std::max (max_space, verbose_arg.name .size () + verbose_arg.shorter .size () + 2UL );
136141 max_space = std::max (max_space, regex_arg.name .size () + regex_arg.shorter .size () + 2UL );
137142 max_space = std::max (max_space, help_arg.name .size () + help_arg.shorter .size () + 2UL );
143+ max_space = std::max (max_space, alpha_black_arg.name .size () + alpha_black_arg.shorter .size () + 2UL );
144+ max_space = std::max (max_space, report_arg.name .size () + report_arg.shorter .size () + 2UL );
138145 max_space = std::max (max_space, input_name.size ());
139146 max_space = std::max (max_space, output_name.size ());
140- max_space = std::max (max_space, alpha_black_arg.name .size () + alpha_black_arg.shorter .size () + 2UL );
141147
142148 return max_space + 2UL ;
143149}
@@ -244,6 +250,7 @@ std::string get_help(std::size_t max_threads) {
244250 ostream << " \n ADVANCED OPTIONS:\n " ;
245251
246252 print_optional_argument (ostream, alpha_black_arg);
253+ print_optional_argument (ostream, report_arg);
247254
248255 return std::move (ostream).str ();
249256}
@@ -307,7 +314,6 @@ void argument_from_str<double>(
307314} // anonymous namespace
308315
309316namespace todds ::args {
310-
311317data get (int argc, char ** argv) {
312318 const boost::nowide::args nowide_args (argc, argv);
313319 todds::vector<std::string_view> arguments;
@@ -426,6 +432,8 @@ data get(const todds::vector<std::string_view>& arguments) {
426432 parsed_arguments.verbose = true ;
427433 } else if (matches (argument, alpha_black_arg)) {
428434 parsed_arguments.alpha_black = true ;
435+ } else if (matches (argument, report_arg)) {
436+ parsed_arguments.report = true ;
429437 } else {
430438 parsed_arguments.error = true ;
431439 parsed_arguments.text = fmt::format (" Invalid positional argument {:s}" , argument);
0 commit comments