From 72e9eb1188e4889f23c50836d1ccd2206852e588 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Fri, 4 Aug 2023 19:51:13 -0700 Subject: modules/rkt: utilize til_module_setup_full() rkt_setup() and rkt_scener_update() had distinct implementations for scene module setup. This consolidates that where trivial to both use the new til_module_setup_full() with appropriate parameters, wrapped up in rkt_scene_module_setup(). The finalizing phase is still ad-hoc which is mildly annoying, but if finalizing just passed into rkt_scene_module_setup() there wouldn't be the til_module_t onhand for sticking in rkt_scene_t. So the code to extract and lookup the module from the settings would still be needed anyways, as the whole til setup_func api isn't limited to modules so the baked til_setup_t doesn't come back with a til_module_t hanging in there. Maybe in the future this gets changed a bit, there could for instance be a void* in til_setup_t where something usage-specific goes, like the relevant module in the case of a module's setup. Something to consider for the future. Consolidating these in the pre-finalize phase at least ensures consistent behavior in initial rkt::scenes setup vs. scener editing/new scenes. --- src/modules/rkt/rkt.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/modules/rkt/rkt.h') diff --git a/src/modules/rkt/rkt.h b/src/modules/rkt/rkt.h index 53b9eba..e5ed4dc 100644 --- a/src/modules/rkt/rkt.h +++ b/src/modules/rkt/rkt.h @@ -61,4 +61,7 @@ typedef struct rkt_setup_t { rkt_setup_scene_t scenes[]; } rkt_setup_t; + +int rkt_scene_module_setup(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup); + #endif -- cgit v1.2.1