uint8_t rule_number;
/* At the end of the simulation, the user is given time to admire the */
- /* output. Delay is available to user as CLI option. */
+ /* output. Delay is available to user as CLI option '-admiration-delay'. */
Bool admiration_in_progress;
- size_t admiration_delay; /* ...in microseconds. */
+ size_t admiration_delay; /* ...in seconds. */
/* The following values correspond directly to independent CLI options. */
Bool rule_random;
state->dpy_height = xgwa.height;
state->ypos = 0;
- state->admiration_delay = 5000000;
+ state->admiration_delay = get_integer_resource(state->dpy, "admiration-delay", "Integer");
state->admiration_in_progress = False;
/* Set foreground and background colors for active/inactive cells. Either */
closure = WolframAutomata_init(dpy, win);
} else {
state->admiration_in_progress = True;
- return state->admiration_delay;
+ return 1000000 * state->admiration_delay;
}
}
static const char * WolframAutomata_defaults[] = {
"*delay-usec: 25000",
+ "*admiration-delay: 5",
"*num-generations: 5000",
"*pixel-size: 2",
"*color-index: -1",
static XrmOptionDescRec WolframAutomata_options[] = {
{ "-delay-usec", ".delay-usec", XrmoptionSepArg, 0 },
+ { "-admiration-delay", ".admiration-delay", XrmoptionSepArg, 0 },
{ "-num-generations", ".num-generations", XrmoptionSepArg, 0 },
{ "-pixel-size", ".pixel-size", XrmoptionSepArg, 0 },
{ "-color-index", ".color-index", XrmoptionSepArg, 0 },