summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2015-10-03 19:46:11 -0400
committerTavian Barnes <tavianator@tavianator.com>2015-10-04 13:23:17 -0400
commitc6ae17f774721875a2833b1138bad9f516a72003 (patch)
tree258f1902791f50ab9b6fb83325411bd876d08713 /options.c
parent328b647f8afc26af5ffaea124161682484f0c85e (diff)
downloadkd-forest-c6ae17f774721875a2833b1138bad9f516a72003.tar.xz
Add support for Morton order.
Diffstat (limited to 'options.c')
-rw-r--r--options.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/options.c b/options.c
index 5a5b446..db48615 100644
--- a/options.c
+++ b/options.c
@@ -225,7 +225,7 @@ print_usage(FILE *file, const char *command, bool verbose)
#define usage(...) print_colorized(file, tty, __VA_ARGS__)
usage("Usage:\n");
usage(" !$! *%s* [-b|--bit-depth @DEPTH@]\n", command);
- usage(" %s [-s|--hue-sort] [-r|--random]\n", whitespace);
+ usage(" %s [-s|--hue-sort] [-r|--random] [-M|--morton]\n", whitespace);
usage(" %s [-l|--selection @min@|@mean@]\n", whitespace);
usage(" %s [-c|--color-space @RGB@|@Lab@|@Luv@]\n", whitespace);
usage(" %s [-w|--width @WIDTH@] [-h|--height @HEIGHT@]\n", whitespace);
@@ -303,6 +303,8 @@ parse_options(options_t *options, int argc, char *argv[])
options->mode = MODE_HUE_SORT;
} else if (parse_arg(argc, argv, "-r", "--random", NULL, &i, &error)) {
options->mode = MODE_RANDOM;
+ } else if (parse_arg(argc, argv, "-M", "--morton", NULL, &i, &error)) {
+ options->mode = MODE_MORTON;
} else if (parse_arg(argc, argv, "-l", "--selection", &value, &i, &error)) {
if (strcmp(value, "min") == 0) {
options->selection = SELECTION_MIN;