X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fopt.cc;h=b5ab7ed3401fc5584d55fef7be16c41ac8015c23;hp=f9bcf53df04d42544dabe42e9de3f275efba1e7e;hb=04e3ba9a85209eb83100c83118f0db5dece1788f;hpb=f30d53755d1da9378a2e5c222135b5e3c92ff4b0 diff --git a/src/opt.cc b/src/opt.cc index f9bcf53..b5ab7ed 100644 --- a/src/opt.cc +++ b/src/opt.cc @@ -11,7 +11,8 @@ Options def_opt = { false, // vr false, // fullscreen 0, // scene file - true // music + true, // music + true // reflections }; enum { @@ -21,6 +22,7 @@ enum { OPT_WINDOWED, OPT_SCENEFILE, OPT_MUSIC, + OPT_REFLECT, OPT_HELP }; @@ -32,6 +34,7 @@ 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"}, {'h', "help", OPT_HELP, "print usage and exit"}, OPTCFG_OPTIONS_END }; @@ -102,6 +105,10 @@ 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_HELP: printf("Usage: demo [options]\nOptions:\n"); optcfg_print_options(oc);