From 01bf40c402f9da50e4282eef722a25c9668efc3c Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 10 Jan 2023 23:42:32 -0800 Subject: src/modules/{stars,plato}: stream tapped variables Now that til_stream_t is implemented, let's wire up the taps. Note that nothing actually creates the stream and puts it in the fragment yet, so stream is still always NULL for these effectively turning this into a NOP. --- src/modules/plato/plato.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/modules/plato') diff --git a/src/modules/plato/plato.c b/src/modules/plato/plato.c index 1e9f6bd..1dc56a3 100644 --- a/src/modules/plato/plato.c +++ b/src/modules/plato/plato.c @@ -47,6 +47,7 @@ #include "til.h" #include "til_fb.h" #include "til_module_context.h" +#include "til_stream.h" #include "til_tap.h" #define PLATO_DEFAULT_ORBIT_RATE .25 @@ -651,6 +652,10 @@ static void plato_render_fragment(til_module_context_t *context, unsigned ticks, plato_context_t *ctxt = (plato_context_t *)context; til_fb_fragment_t *fragment = *fragment_ptr; + /* since we don't automate the rates ourselves, we don't care about the tap return values */ + (void) til_stream_tap_context(fragment->stream, context, &ctxt->taps.orbit_rate); + (void) til_stream_tap_context(fragment->stream, context, &ctxt->taps.spin_rate); + ctxt->r += (float)(ticks - context->ticks) * (*ctxt->orbit_rate * .001f); ctxt->rr += (float)(ticks - context->ticks) * (*ctxt->spin_rate * .001f); context->ticks = ticks; -- cgit v1.2.3