From 920839003b4ea1628d81fc56351b2cf053f2f8ff Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 28 Apr 2022 01:23:28 -0700 Subject: modules/roto: randomize roto initial state Just something quick and dirty to differentiate roto layers, plus it's kind of boring having roto always start at the same state. --- src/modules/roto/roto.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modules/roto/roto.c b/src/modules/roto/roto.c index 06a9e11..1dafd53 100644 --- a/src/modules/roto/roto.c +++ b/src/modules/roto/roto.c @@ -33,7 +33,16 @@ static color_t palette[2]; static void * roto_create_context(unsigned ticks, unsigned n_cpus, til_setup_t *setup) { - return calloc(1, sizeof(roto_context_t)); + roto_context_t *ctxt; + + ctxt = calloc(1, sizeof(roto_context_t)); + if (!ctxt) + return NULL; + + ctxt->r = rand(); + ctxt->rr = rand(); + + return ctxt; } -- cgit v1.2.1