better halp
This commit is contained in:
parent
5f4032eca0
commit
36a2a1e9a7
1 changed files with 17 additions and 13 deletions
30
main.cpp
30
main.cpp
|
@ -17,16 +17,18 @@
|
||||||
int verbose;
|
int verbose;
|
||||||
|
|
||||||
void showHelpText() {
|
void showHelpText() {
|
||||||
std::cout << "Awesome Attractor, version " << __DATE__ << std::endl;
|
std::cout <<
|
||||||
std::cout << "Usage: AwesomeAttractor [OPTION]... FILE" << std::endl << std::endl;
|
"Awesome Attractor, version " __DATE__ "\n"
|
||||||
std::cout << "Optons:" << std::endl;
|
"Usage: AwesomeAttractor [OPTION]... FILE\n"
|
||||||
std::cout << " --help Shows this help" << std::endl;
|
"Optons:\n"
|
||||||
std::cout << " -q quiet mode" << std::endl;
|
" -h, --help Shows this help\n"
|
||||||
std::cout << " -v verbose mode" << std::endl;
|
" -q quiet mode\n"
|
||||||
std::cout << " -V loud mode" << std::endl;
|
" -v verbose mode\n"
|
||||||
std::cout << " -w N Sets width of output image to N" << std::endl;
|
" -V loud mode\n"
|
||||||
std::cout << " -h N Sets height of output image to N" << std::endl;
|
" -W N Sets width of output image to N\n"
|
||||||
std::cout << " -i N Sets number of iterations to N" << std::endl;
|
" -H N Sets height of output image to N\n"
|
||||||
|
" -I N Sets number of iterations to N\n"
|
||||||
|
<< std::endl;
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,13 +50,15 @@ int main(int argc, char* argv[]) {
|
||||||
verbose = -1;
|
verbose = -1;
|
||||||
} else if(strcmp(argv[i], "--help") == 0) {
|
} else if(strcmp(argv[i], "--help") == 0) {
|
||||||
showHelpText();
|
showHelpText();
|
||||||
|
} else if(strcmp(argv[i], "-h") == 0) {
|
||||||
|
showHelpText();
|
||||||
} else if(strcmp(argv[i], "-V") == 0) {
|
} else if(strcmp(argv[i], "-V") == 0) {
|
||||||
verbose = 3;
|
verbose = 3;
|
||||||
} else if(strcmp(argv[i], "-w") == 0) {
|
} else if(strcmp(argv[i], "-W") == 0) {
|
||||||
width = atoi(argv[++i]);
|
width = atoi(argv[++i]);
|
||||||
} else if(strcmp(argv[i], "-h") == 0) {
|
} else if(strcmp(argv[i], "-H") == 0) {
|
||||||
height = atoi(argv[++i]);
|
height = atoi(argv[++i]);
|
||||||
} else if(strcmp(argv[i], "-i") == 0) {
|
} else if(strcmp(argv[i], "-I") == 0) {
|
||||||
iterations = atoi(argv[++i]);
|
iterations = atoi(argv[++i]);
|
||||||
} else {
|
} else {
|
||||||
attractorFile = argv[i];
|
attractorFile = argv[i];
|
||||||
|
|
Reference in a new issue