X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=args.c;h=4d629952332a0375e30f5070050a6ed401af79ea;hp=9c4c62b92e8c562d597dcf566c7400b6839f6e18;hb=3b94094992bdbe85a4ac824e22df09b2a7362c27;hpb=3079660eb1f60a861b677b746da581c4c0e6c3dd diff --git a/args.c b/args.c index 9c4c62b..4d62995 100644 --- a/args.c +++ b/args.c @@ -4,15 +4,12 @@ #include "args.h" #include "config.h" -// Gameplay Variations -float opt_bounciness; -float opt_gamespeed; -float opt_max_lead; - // Look and Feel int opt_fullscreen; int opt_sound; +int opt_autopilot; + static void show_help(void) { @@ -23,9 +20,6 @@ show_help(void) puts(" -V, --version Print program version"); puts(" -?, --help Give this help list"); putchar('\n'); - puts("Mandatory or optional arguments to long options are also mandatory or optional"); - puts("for any corresponding short options."); - putchar('\n'); puts("Report bugs at http://jasonwoof.com/contact.html"); } @@ -40,6 +34,7 @@ short_opt(char c, char *arg) exit(0); case '?': case 'h': return 0; + case 'a': opt_autopilot = 1; break; default: fprintf(stderr, "unknown option -%c\n\n", c); return 0; @@ -54,9 +49,9 @@ parse_short_opts(const char *s, char *arg) return short_opt(*s, arg); } -static char *long_opts[] = { "full-screen", "silent", "version", "help" }; +static char *long_opts[] = { "full-screen", "silent", "version", "help", "autopilot" }; -static char short_opts[] = { 'f', 's', 'V', 'h' }; +static char short_opts[] = { 'f', 's', 'V', 'h', 'a' }; int parse_long_opt(const char *s, char *arg) @@ -73,14 +68,9 @@ parse_long_opt(const char *s, char *arg) void init_opts(void) { - // Gameplay Variations - opt_bounciness = 0.50; // lose 50% when you hit the screen edge. - opt_gamespeed = 1.00; // Run game at full speed. - opt_max_lead = 1.00*XSIZE; // you can get 1 screen ahead. - - // Look and Feel opt_fullscreen = 0; opt_sound = 1; + opt_autopilot = 0; } int