X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fopt.cc;h=7f3d4bb69b0f437afa70b8aaf4e7eb86fabffb18;hp=f9bcf53df04d42544dabe42e9de3f275efba1e7e;hb=3ee6226e6c7110280b4cc05a9c776eed3bfe6555;hpb=8b3ce77b133bbac9979e75a6c88f6b86559d2705 diff --git a/src/opt.cc b/src/opt.cc index f9bcf53..7f3d4bb 100644 --- a/src/opt.cc +++ b/src/opt.cc @@ -11,7 +11,9 @@ Options def_opt = { false, // vr false, // fullscreen 0, // scene file - true // music + true, // music + true, // reflections + 0 // data url }; enum { @@ -21,6 +23,8 @@ enum { OPT_WINDOWED, OPT_SCENEFILE, OPT_MUSIC, + OPT_REFLECT, + OPT_DATAURL, OPT_HELP }; @@ -32,6 +36,8 @@ static optcfg_option options[] = { {'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 }; @@ -102,6 +108,14 @@ static int opt_handler(optcfg *oc, int optid, void *cls) 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: demo [options]\nOptions:\n"); optcfg_print_options(oc);