From 470305ae1c7b038fa0ad58223a2d48f60158a7bf Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 10 Jan 2023 23:33:45 -0800 Subject: main,til_args: employ the stream, add --print-pipes This is a rudimentary integration of the new til_stream_t into rototiller. If the stream is going to continue living in til_fb_fragment_t, the fragmenters and other nested frame scenarios likely need to be updated to copy the stream through to make the pipes available to the nested renders. --print-pipes dumps the values found at the pipes' driver taps to stdout on every frame. Right now there's no way to externally write these values, but with --print-pipes you can already see where things are going and it's a nice visibility tool for tapped variables in modules. Only stars and plato tap variables presently, but that will improve. --- src/til_args.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/til_args.c') diff --git a/src/til_args.c b/src/til_args.c index 8969d89..11f2487 100644 --- a/src/til_args.c +++ b/src/til_args.c @@ -12,6 +12,7 @@ * ./rototiller --defaults // use default settings where unspecified * ./rototiller --go // don't show args and wait for user input before proceeding * ./rototiller --seed=0xdeadbeef // explicitly set global random seed instead of generating one + * ./rototiller --print-pipes // print values for the pipes every frame * * unrecognized arguments trigger an -EINVAL error, unless res_{argc,argv} are non-NULL * where a new argv will be allocated and populated with the otherwise invalid arguments @@ -54,6 +55,8 @@ static int args_parse(int argc, const char *argv[], til_args_t *res_args, int *r res_args->help = 1; } else if (!strcasecmp("--go", argv[i])) { res_args->gogogo = 1; + } else if (!strcasecmp("--print-pipes", argv[i])) { + res_args->print_pipes = 1; } else { if (!res_argv) return -EINVAL; -- cgit v1.2.1