summaryrefslogtreecommitdiff
path: root/src/modules/swarm
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/swarm')
-rw-r--r--src/modules/swarm/swarm.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/modules/swarm/swarm.c b/src/modules/swarm/swarm.c
index 97a04d0..9407168 100644
--- a/src/modules/swarm/swarm.c
+++ b/src/modules/swarm/swarm.c
@@ -414,6 +414,20 @@ static void swarm_render_fragment(til_module_context_t *context, til_stream_t *s
}
+static int swarm_setup(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup);
+
+
+til_module_t swarm_module = {
+ .create_context = swarm_create_context,
+ .render_fragment = swarm_render_fragment,
+ .setup = swarm_setup,
+ .name = "swarm",
+ .description = "\"Boids\"-inspired particle swarm in 3D",
+ .author = "Vito Caputo <vcaputo@pengaru.com>",
+ .flags = TIL_MODULE_OVERLAYABLE,
+};
+
+
static int swarm_setup(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup)
{
const char *styles[] = {
@@ -441,7 +455,7 @@ static int swarm_setup(const til_settings_t *settings, til_setting_t **res_setti
if (res_setup) {
swarm_setup_t *setup;
- setup = til_setup_new(settings, sizeof(*setup), NULL);
+ setup = til_setup_new(settings, sizeof(*setup), NULL, &swarm_module);
if (!setup)
return -ENOMEM;
@@ -455,14 +469,3 @@ static int swarm_setup(const til_settings_t *settings, til_setting_t **res_setti
return 0;
}
-
-
-til_module_t swarm_module = {
- .create_context = swarm_create_context,
- .render_fragment = swarm_render_fragment,
- .setup = swarm_setup,
- .name = "swarm",
- .description = "\"Boids\"-inspired particle swarm in 3D",
- .author = "Vito Caputo <vcaputo@pengaru.com>",
- .flags = TIL_MODULE_OVERLAYABLE,
-};
© All Rights Reserved