X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Foptions.c;fp=src%2Foptions.c;h=34dee8fc24b7379efb4e8641e5143beeaec4d93a;hb=d5f45e3128c537f272615cf76242e1dfebccdee7;hp=0000000000000000000000000000000000000000;hpb=dd7ce87b0ad2b8a1b4758bcc9354e993b71c8599;p=raydungeon diff --git a/src/options.c b/src/options.c new file mode 100644 index 0000000..34dee8f --- /dev/null +++ b/src/options.c @@ -0,0 +1,130 @@ +#include +#include +#include +#include +#include "options.h" +#include "treestor.h" + +#define DEF_XRES 1280 +#define DEF_YRES 800 +#define DEF_VSYNC 1 +#define DEF_VOL 255 +#define DEF_MUS 1 +#define DEF_FULLSCR 0 +#define DEF_INVMOUSEY 0 +#define DEF_MOUSE_SPEED 50 + + +struct options opt = { + DEF_XRES, DEF_YRES, + DEF_VSYNC, + DEF_FULLSCR, + DEF_VOL, DEF_VOL, DEF_VOL, + DEF_MUS, + DEF_INVMOUSEY, + DEF_MOUSE_SPEED, +}; + +int parse_options(int argc, char **argv) +{ + int i; + static const char *usage_fmt = "Usage: %s [options]\n" + "Options:\n" + " -screen : select starting screen\n" + " -h,-help: print usage information and exit\n\n"; + + for(i=1; i