diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-06-09 22:40:06 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-06-10 21:17:22 -0700 |
commit | b437600c820f489049c022d2c4697226cf8d68fc (patch) | |
tree | ba115db92719bd707aa7553495278587f1474c33 /src/modules | |
parent | 156bad78f27813934d897518f0d6ea8748be9e47 (diff) |
til: add ticks to til_module_context_t
Also wire this up to the til_module_context_new() helper and
all its callers.
This is in preparation for modules doing more correct delta-T
derived animation.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/blinds/blinds.c | 2 | ||||
-rw-r--r-- | src/modules/checkers/checkers.c | 2 | ||||
-rw-r--r-- | src/modules/compose/compose.c | 2 | ||||
-rw-r--r-- | src/modules/drizzle/drizzle.c | 2 | ||||
-rw-r--r-- | src/modules/flui2d/flui2d.c | 2 | ||||
-rw-r--r-- | src/modules/julia/julia.c | 2 | ||||
-rw-r--r-- | src/modules/meta2d/meta2d.c | 2 | ||||
-rw-r--r-- | src/modules/moire/moire.c | 2 | ||||
-rw-r--r-- | src/modules/montage/montage.c | 2 | ||||
-rw-r--r-- | src/modules/pixbounce/pixbounce.c | 2 | ||||
-rw-r--r-- | src/modules/plasma/plasma.c | 2 | ||||
-rw-r--r-- | src/modules/plato/plato.c | 2 | ||||
-rw-r--r-- | src/modules/ray/ray.c | 2 | ||||
-rw-r--r-- | src/modules/roto/roto.c | 2 | ||||
-rw-r--r-- | src/modules/rtv/rtv.c | 2 | ||||
-rw-r--r-- | src/modules/shapes/shapes.c | 2 | ||||
-rw-r--r-- | src/modules/snow/snow.c | 2 | ||||
-rw-r--r-- | src/modules/sparkler/sparkler.c | 2 | ||||
-rw-r--r-- | src/modules/spiro/spiro.c | 2 | ||||
-rw-r--r-- | src/modules/stars/stars.c | 2 | ||||
-rw-r--r-- | src/modules/submit/submit.c | 2 | ||||
-rw-r--r-- | src/modules/swab/swab.c | 2 | ||||
-rw-r--r-- | src/modules/swarm/swarm.c | 2 | ||||
-rw-r--r-- | src/modules/voronoi/voronoi.c | 2 |
24 files changed, 24 insertions, 24 deletions
diff --git a/src/modules/blinds/blinds.c b/src/modules/blinds/blinds.c index 1d7b580..aa71ddd 100644 --- a/src/modules/blinds/blinds.c +++ b/src/modules/blinds/blinds.c @@ -44,7 +44,7 @@ static til_module_context_t * blinds_create_context(unsigned seed, unsigned tick if (!setup) setup = &blinds_default_setup.til_setup; - ctxt = til_module_context_new(sizeof(blinds_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(blinds_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/checkers/checkers.c b/src/modules/checkers/checkers.c index 079df4d..c9a0444 100644 --- a/src/modules/checkers/checkers.c +++ b/src/modules/checkers/checkers.c @@ -70,7 +70,7 @@ static til_module_context_t * checkers_create_context(unsigned seed, unsigned ti if (!setup) setup = &checkers_default_setup.til_setup; - ctxt = til_module_context_new(sizeof(checkers_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(checkers_context_t), ticks, seed, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/compose/compose.c b/src/modules/compose/compose.c index 7415150..06fa01c 100644 --- a/src/modules/compose/compose.c +++ b/src/modules/compose/compose.c @@ -77,7 +77,7 @@ static til_module_context_t * compose_create_context(unsigned seed, unsigned tic for (n = 0; ((compose_setup_t *)setup)->layers[n]; n++); - ctxt = til_module_context_new(sizeof(compose_context_t) + n * sizeof(compose_layer_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(compose_context_t) + n * sizeof(compose_layer_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/drizzle/drizzle.c b/src/modules/drizzle/drizzle.c index b23fba8..2ed8533 100644 --- a/src/modules/drizzle/drizzle.c +++ b/src/modules/drizzle/drizzle.c @@ -81,7 +81,7 @@ static til_module_context_t * drizzle_create_context(unsigned seed, unsigned tic if (!setup) setup = &drizzle_default_setup.til_setup; - ctxt = til_module_context_new(sizeof(drizzle_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(drizzle_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/flui2d/flui2d.c b/src/modules/flui2d/flui2d.c index df980ba..78f0265 100644 --- a/src/modules/flui2d/flui2d.c +++ b/src/modules/flui2d/flui2d.c @@ -253,7 +253,7 @@ static til_module_context_t * flui2d_create_context(unsigned seed, unsigned tick if (!setup) setup = &flui2d_default_setup.til_setup; - ctxt = til_module_context_new(sizeof(flui2d_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(flui2d_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/julia/julia.c b/src/modules/julia/julia.c index dd11f25..f878f99 100644 --- a/src/modules/julia/julia.c +++ b/src/modules/julia/julia.c @@ -71,7 +71,7 @@ static til_module_context_t * julia_create_context(unsigned seed, unsigned ticks { julia_context_t *ctxt; - ctxt = til_module_context_new(sizeof(julia_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(julia_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/meta2d/meta2d.c b/src/modules/meta2d/meta2d.c index eb816d0..c6a6c86 100644 --- a/src/modules/meta2d/meta2d.c +++ b/src/modules/meta2d/meta2d.c @@ -71,7 +71,7 @@ static til_module_context_t * meta2d_create_context(unsigned seed, unsigned tick { meta2d_context_t *ctxt; - ctxt = til_module_context_new(sizeof(meta2d_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(meta2d_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/moire/moire.c b/src/modules/moire/moire.c index 1678170..e16a8ab 100644 --- a/src/modules/moire/moire.c +++ b/src/modules/moire/moire.c @@ -54,7 +54,7 @@ static til_module_context_t * moire_create_context(unsigned seed, unsigned ticks if (!setup) setup = &moire_default_setup.til_setup; - ctxt = til_module_context_new(sizeof(moire_context_t) + ((moire_setup_t *)setup)->n_centers * sizeof(moire_center_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(moire_context_t) + ((moire_setup_t *)setup)->n_centers * sizeof(moire_center_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/montage/montage.c b/src/modules/montage/montage.c index 2db9fdd..f1dffd1 100644 --- a/src/modules/montage/montage.c +++ b/src/modules/montage/montage.c @@ -38,7 +38,7 @@ static til_module_context_t * montage_create_context(unsigned seed, unsigned tic size_t n_modules; montage_context_t *ctxt; - ctxt = til_module_context_new(sizeof(montage_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(montage_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/pixbounce/pixbounce.c b/src/modules/pixbounce/pixbounce.c index 8c23fa4..206d8a2 100644 --- a/src/modules/pixbounce/pixbounce.c +++ b/src/modules/pixbounce/pixbounce.c @@ -244,7 +244,7 @@ static til_module_context_t * pixbounce_create_context(unsigned seed, unsigned t { pixbounce_context_t *ctxt; - ctxt = til_module_context_new(sizeof(pixbounce_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(pixbounce_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/plasma/plasma.c b/src/modules/plasma/plasma.c index 56f1176..225b4e3 100644 --- a/src/modules/plasma/plasma.c +++ b/src/modules/plasma/plasma.c @@ -64,7 +64,7 @@ static til_module_context_t * plasma_create_context(unsigned seed, unsigned tick init_plasma(costab, sintab); } - ctxt = til_module_context_new(sizeof(plasma_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(plasma_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/plato/plato.c b/src/modules/plato/plato.c index c22a6c4..ffa7e68 100644 --- a/src/modules/plato/plato.c +++ b/src/modules/plato/plato.c @@ -614,7 +614,7 @@ static til_module_context_t * plato_create_context(unsigned seed, unsigned ticks { plato_context_t *ctxt; - ctxt = til_module_context_new(sizeof(plato_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(plato_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/ray/ray.c b/src/modules/ray/ray.c index 84e4eb2..e781adc 100644 --- a/src/modules/ray/ray.c +++ b/src/modules/ray/ray.c @@ -136,7 +136,7 @@ static til_module_context_t * ray_create_context(unsigned seed, unsigned ticks, { ray_context_t *ctxt; - ctxt = til_module_context_new(sizeof(ray_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(ray_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/roto/roto.c b/src/modules/roto/roto.c index cc69103..389aa5d 100644 --- a/src/modules/roto/roto.c +++ b/src/modules/roto/roto.c @@ -37,7 +37,7 @@ static til_module_context_t * roto_create_context(unsigned seed, unsigned ticks, { roto_context_t *ctxt; - ctxt = til_module_context_new(sizeof(roto_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(roto_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c index fe68903..bf6a578 100644 --- a/src/modules/rtv/rtv.c +++ b/src/modules/rtv/rtv.c @@ -232,7 +232,7 @@ static til_module_context_t * rtv_create_context(unsigned seed, unsigned ticks, n_channels++; } - ctxt = til_module_context_new(sizeof(rtv_context_t) + n_channels * sizeof(rtv_channel_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(rtv_context_t) + n_channels * sizeof(rtv_channel_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/shapes/shapes.c b/src/modules/shapes/shapes.c index 8a1da6e..0a53a34 100644 --- a/src/modules/shapes/shapes.c +++ b/src/modules/shapes/shapes.c @@ -105,7 +105,7 @@ static til_module_context_t * shapes_create_context(unsigned seed, unsigned tick if (!setup) setup = &shapes_default_setup.til_setup; - ctxt = til_module_context_new(sizeof(shapes_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(shapes_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/snow/snow.c b/src/modules/snow/snow.c index 767459e..fcc40b3 100644 --- a/src/modules/snow/snow.c +++ b/src/modules/snow/snow.c @@ -26,7 +26,7 @@ static til_module_context_t * snow_create_context(unsigned seed, unsigned ticks, { snow_context_t *ctxt; - ctxt = til_module_context_new(sizeof(snow_context_t) + n_cpus * sizeof(snow_seed_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(snow_context_t) + n_cpus * sizeof(snow_seed_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/sparkler/sparkler.c b/src/modules/sparkler/sparkler.c index 8c8348b..95b19b7 100644 --- a/src/modules/sparkler/sparkler.c +++ b/src/modules/sparkler/sparkler.c @@ -42,7 +42,7 @@ static til_module_context_t * sparkler_create_context(unsigned seed, unsigned ti if (!setup) setup = &sparkler_default_setup.til_setup; - ctxt = til_module_context_new(sizeof(sparkler_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(sparkler_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/spiro/spiro.c b/src/modules/spiro/spiro.c index 39868f6..9da4686 100644 --- a/src/modules/spiro/spiro.c +++ b/src/modules/spiro/spiro.c @@ -36,7 +36,7 @@ static til_module_context_t * spiro_create_context(unsigned seed, unsigned ticks spiro_context_t *ctxt; float z; - ctxt = til_module_context_new(sizeof(spiro_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(spiro_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/stars/stars.c b/src/modules/stars/stars.c index 31f4ead..665534a 100644 --- a/src/modules/stars/stars.c +++ b/src/modules/stars/stars.c @@ -60,7 +60,7 @@ static til_module_context_t * stars_create_context(unsigned seed, unsigned ticks if (!setup) setup = &stars_default_setup.til_setup; - ctxt = til_module_context_new(sizeof(stars_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(stars_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/submit/submit.c b/src/modules/submit/submit.c index 1573688..6262dec 100644 --- a/src/modules/submit/submit.c +++ b/src/modules/submit/submit.c @@ -274,7 +274,7 @@ static til_module_context_t * submit_create_context(unsigned seed, unsigned tick if (!setup) setup = &submit_default_setup.til_setup; - ctxt = til_module_context_new(sizeof(submit_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(submit_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/swab/swab.c b/src/modules/swab/swab.c index 8566fa3..69b369a 100644 --- a/src/modules/swab/swab.c +++ b/src/modules/swab/swab.c @@ -70,7 +70,7 @@ static til_module_context_t * swab_create_context(unsigned seed, unsigned ticks, { swab_context_t *ctxt; - ctxt = til_module_context_new(sizeof(swab_context_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(swab_context_t), seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/swarm/swarm.c b/src/modules/swarm/swarm.c index 14d82ed..fd852cd 100644 --- a/src/modules/swarm/swarm.c +++ b/src/modules/swarm/swarm.c @@ -188,7 +188,7 @@ static til_module_context_t * swarm_create_context(unsigned seed, unsigned ticks if (!setup) setup = &swarm_default_setup.til_setup; - ctxt = til_module_context_new(sizeof(swarm_context_t) + sizeof(*(ctxt->boids)) * SWARM_SIZE, seed, n_cpus); + ctxt = til_module_context_new(sizeof(swarm_context_t) + sizeof(*(ctxt->boids)) * SWARM_SIZE, seed, ticks, n_cpus); if (!ctxt) return NULL; diff --git a/src/modules/voronoi/voronoi.c b/src/modules/voronoi/voronoi.c index 9365015..6775416 100644 --- a/src/modules/voronoi/voronoi.c +++ b/src/modules/voronoi/voronoi.c @@ -87,7 +87,7 @@ static til_module_context_t * voronoi_create_context(unsigned seed, unsigned tic if (!setup) setup = &voronoi_default_setup.til_setup; - ctxt = til_module_context_new(sizeof(voronoi_context_t) + ((voronoi_setup_t *)setup)->n_cells * sizeof(voronoi_cell_t), seed, n_cpus); + ctxt = til_module_context_new(sizeof(voronoi_context_t) + ((voronoi_setup_t *)setup)->n_cells * sizeof(voronoi_cell_t), seed, ticks, n_cpus); if (!ctxt) return NULL; |