summaryrefslogtreecommitdiff
path: root/src/modules/rkt/rkt.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-07-05 16:46:54 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-07-05 16:46:54 -0700
commit14b35ecd216fda58873b94cd2b211986f2b20e02 (patch)
tree254ecf15e88cb36bb691b35fad4b96781679e484 /src/modules/rkt/rkt.h
parentbe48e352f08a7a6e5e96862865cff7946985dd32 (diff)
modules/rkt: introduce a rudimentary scenes editor
This adds a BBS-style interface for creating new scenes in a live rkt session. It listens on tcp port 54321 on localhost by default, just use telnet to connect, the rest is fairly self-explanatory. This is still early days, but it's a whole lot more than nothing.
Diffstat (limited to 'src/modules/rkt/rkt.h')
-rw-r--r--src/modules/rkt/rkt.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/modules/rkt/rkt.h b/src/modules/rkt/rkt.h
index 2c41631..b06c6a4 100644
--- a/src/modules/rkt/rkt.h
+++ b/src/modules/rkt/rkt.h
@@ -3,6 +3,9 @@
#include "til.h"
#include "til_module_context.h"
+#include "til_settings.h"
+
+typedef struct rkt_scener_t rkt_scener_t;
typedef struct rkt_scene_t {
til_module_context_t *module_ctxt;
@@ -11,6 +14,7 @@ typedef struct rkt_scene_t {
typedef struct rkt_context_t {
til_module_context_t til_module_context;
+ rkt_scener_t *scener;
struct sync_device *sync_device;
const struct sync_track *scene_track;
double rows_per_ms;
@@ -19,20 +23,33 @@ typedef struct rkt_context_t {
unsigned paused:1;
size_t n_scenes;
rkt_scene_t *scenes;
+ unsigned scene; /* current scene (usually driven by the scene track data,
+ * but scener may override it to force showing a specific scene)
+ */
} rkt_context_t;
typedef struct rkt_setup_scene_t {
const til_module_t *module;
- til_setup_t *setup; /* Baked setup as-configured via setup. */
+ til_setup_t *setup; /* Baked setup as-configured via setup. */
} rkt_setup_scene_t;
typedef struct rkt_setup_t {
til_setup_t til_setup;
+ til_settings_t *settings; /* Settings instance used to produce rkt's root setup,
+ * which rkt grabs a reference to for serializing its
+ * entirety "as args". The per-scene setups also grab
+ * reference to their respective settings instances, for
+ * editability within their levels of the rkt settings
+ * heirarchy.
+ */
+ til_settings_t *scenes_settings;
+
const char *base;
double rows_per_ms;
unsigned connect:1;
- const char *host;
- unsigned short port;
+ unsigned scener_listen:1;
+ const char *host, *scener_address;
+ unsigned short port, scener_port;
size_t n_scenes;
rkt_setup_scene_t scenes[];
} rkt_setup_t;
© All Rights Reserved