Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
vor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more changes for windows
[vor.git]
/
args.c
diff --git
a/args.c
b/args.c
index
0131215
..
06efba3
100644
(file)
--- a/
args.c
+++ b/
args.c
@@
-12,6
+12,9
@@
int opt_fullscreen;
int opt_music;
int opt_sound;
int opt_music;
int opt_sound;
+
+#ifndef WIN32
+
error_t parse_opt(int, char*, struct argp_state *);
const char *argp_program_version = "Variations on Rockdodger " VERSION;
error_t parse_opt(int, char*, struct argp_state *);
const char *argp_program_version = "Variations on Rockdodger " VERSION;
@@
-33,6
+36,8
@@
static struct argp_option opts[] = {
struct argp argp = { opts, &parse_opt, 0, doc };
struct argp argp = { opts, &parse_opt, 0, doc };
+#endif // !WIN32
+
void
init_opts(void)
{
void
init_opts(void)
{
@@
-47,6
+52,8
@@
init_opts(void)
opt_music = 0;
}
opt_music = 0;
}
+#ifndef WIN32
+
error_t
parse_opt(int key, char *arg, struct argp_state *state)
{
error_t
parse_opt(int key, char *arg, struct argp_state *state)
{
@@
-67,7
+74,7
@@
parse_opt(int key, char *arg, struct argp_state *state)
argp_state_help(state, stderr, ARGP_HELP_STD_HELP);
return EINVAL;
}
argp_state_help(state, stderr, ARGP_HELP_STD_HELP);
return EINVAL;
}
- if(i < 0) i = 0; else if(i > 100) i = 100;
+ if(i < 0) i = 0; else if(i > 200) i = 100;
opt_gamespeed = (float)i / 100;
break;
case 'l': if(!sscanf(arg, "%f", &opt_max_lead)) {
opt_gamespeed = (float)i / 100;
break;
case 'l': if(!sscanf(arg, "%f", &opt_max_lead)) {
@@
-79,10
+86,9
@@
parse_opt(int key, char *arg, struct argp_state *state)
break;
case 'm': opt_music = 1; break;
case 's': opt_sound = 0; opt_music = 0; break;
break;
case 'm': opt_music = 1; break;
case 's': opt_sound = 0; opt_music = 0; break;
- case ARGP_KEY_END:
- break;
- default:
- return ARGP_ERR_UNKNOWN;
+ default: return ARGP_ERR_UNKNOWN;
}
return 0;
}
}
return 0;
}
+
+#endif // !WIN32