summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-04-28 01:23:28 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-05-01 13:52:14 -0700
commit920839003b4ea1628d81fc56351b2cf053f2f8ff (patch)
tree9334d5c4424e909d12b66c7b7982d93c951dc7a6 /src
parentaea618965fa437ffdfef485dc3671af923ea5e8c (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/modules/roto/roto.c11
1 files changed, 10 insertions, 1 deletions
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;
}
© All Rights Reserved