{0, "scene", OPT_SCENEFILE, "scene file to open"},
{'m', "music", OPT_MUSIC, "play background audio"},
{'r', "reflect", OPT_REFLECT, "render reflections"},
{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"},
+ {0, "minturn", OPT_MIN_TURN, "minimum turn angle"},
{'h', "help", OPT_HELP, "print usage and exit"},
OPTCFG_OPTIONS_END
};
{'h', "help", OPT_HELP, "print usage and exit"},
OPTCFG_OPTIONS_END
};
+ case OPT_DATAURL:
+ opt.data_url = strdup(optcfg_next_value(oc));
+ break;
+
+ case OPT_MIN_TURN:
+ {
+ int deg;
+ char *valstr = optcfg_next_value(oc);
+
+ if(!valstr || sscanf(valstr, "%d", °) != 1) {
+ fprintf(stderr, "minimum turn must be a number >= 0 in degrees\n");
+ return -1;
+ }
+ opt.min_turn = deg;
+ }
+ break;
+