X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fopt.cc;h=7f3d4bb69b0f437afa70b8aaf4e7eb86fabffb18;hb=a96233587b2446034857fa9b46c988334bf47419;hp=18d73f2f3bd5c743054ca3301cfb661c1bc9eb94;hpb=9802d969be55668e4dcc10fe427b0dcdeb6302be;p=laserbrain_demo diff --git a/src/opt.cc b/src/opt.cc index 18d73f2..7f3d4bb 100644 --- a/src/opt.cc +++ b/src/opt.cc @@ -10,7 +10,10 @@ Options def_opt = { 1280, 800, false, // vr false, // fullscreen - 0 // scene file + 0, // scene file + true, // music + true, // reflections + 0 // data url }; enum { @@ -19,6 +22,9 @@ enum { OPT_FULLSCREEN, OPT_WINDOWED, OPT_SCENEFILE, + OPT_MUSIC, + OPT_REFLECT, + OPT_DATAURL, OPT_HELP }; @@ -29,6 +35,9 @@ static optcfg_option options[] = { {'f', "fullscreen", OPT_FULLSCREEN, "run in fullscreen mode"}, {'w', "windowed", OPT_WINDOWED, "run in windowed mode"}, {0, "scene", OPT_SCENEFILE, "scene file to open"}, + {'m', "music", OPT_MUSIC, "play background audio"}, + {'r', "reflect", OPT_REFLECT, "render reflections"}, + {0, "url", OPT_DATAURL, "data URL"}, {'h', "help", OPT_HELP, "print usage and exit"}, OPTCFG_OPTIONS_END }; @@ -95,8 +104,20 @@ static int opt_handler(optcfg *oc, int optid, void *cls) opt.scenefile = strdup(optcfg_next_value(oc)); break; + case OPT_MUSIC: + opt.music = is_enabled(oc); + break; + + case OPT_REFLECT: + opt.reflect = is_enabled(oc); + break; + + case OPT_DATAURL: + opt.data_url = strdup(optcfg_next_value(oc)); + break; + case OPT_HELP: - printf("Usage: vrfileman [options]\nOptions:\n"); + printf("Usage: demo [options]\nOptions:\n"); optcfg_print_options(oc); exit(0); }