summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-07-20 17:46:43 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-07-20 17:50:42 -0700
commit1e461f6cc82cb8c30027b120a8b07693fb32edfd (patch)
tree36de8cbedca33a1171f7993c18836cf84446523f /src/modules
parentc0881f0be992c43f85e794bd160fddb4ffb6d951 (diff)
libs/din: pass seed to din_new()
also update call sites in modules/{meta2d,swab} accordingly
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/meta2d/meta2d.c4
-rw-r--r--src/modules/swab/swab.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/meta2d/meta2d.c b/src/modules/meta2d/meta2d.c
index 1ab444c..1bb8827 100644
--- a/src/modules/meta2d/meta2d.c
+++ b/src/modules/meta2d/meta2d.c
@@ -76,8 +76,8 @@ static til_module_context_t * meta2d_create_context(unsigned seed, unsigned tick
return NULL;
/* perlin noise is used for some organic-ish random movement of the balls */
- ctxt->din_a = din_new(10, 10, META2D_NUM_BALLS + 2);
- ctxt->din_b = din_new(10, 10, META2D_NUM_BALLS + 2);
+ ctxt->din_a = din_new(10, 10, META2D_NUM_BALLS + 2, seed);
+ ctxt->din_b = din_new(10, 10, META2D_NUM_BALLS + 2, seed);
for (int i = 0; i < META2D_NUM_BALLS; i++) {
meta2d_ball_t *ball = &ctxt->balls[i];
diff --git a/src/modules/swab/swab.c b/src/modules/swab/swab.c
index 5424bf6..9047f68 100644
--- a/src/modules/swab/swab.c
+++ b/src/modules/swab/swab.c
@@ -74,7 +74,7 @@ static til_module_context_t * swab_create_context(unsigned seed, unsigned ticks,
if (!ctxt)
return NULL;
- ctxt->din = din_new(12, 12, 100);
+ ctxt->din = din_new(12, 12, 100, seed);
if (!ctxt->din) {
free(ctxt);
return NULL;
© All Rights Reserved