From ff61da6fb9720106d7869a0e5026810450d8f515 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 28 Aug 2019 11:54:17 +0200 Subject: Color Palette, need shortcut Added color palette instead of brighness level to display the set boundaries. Vim-like shortcut to move around. --- main.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 7757243..bc3fb6f 100644 --- a/main.c +++ b/main.c @@ -1,10 +1,25 @@ +#include #include "header.h" -int main(void) +int main(int argc, char **argv) { - /* mandelbrot_print(); */ + int opt; + + while ((opt = getopt(argc, argv, "c")) != -1) + { + switch (opt) + { + case 'c': + mandelbrot_print(); + exit(EXIT_SUCCESS); + break; + default: + fprintf(stderr, "Usage %s ...", argv[0]); + } + + } GState *gstate = graphics_init(); graphics_run(gstate); graphics_quit(gstate); - return 0; + return EXIT_SUCCESS; } -- cgit