particle/ramp: new particle, selects one particle from a list

The ramp particle is configured with a tag name and a list of
particles.

At instantiation time, a single particle is selected from the list,
depending on the tag value and it's minimum and maximum values.

I.e. this particle acts kind of like a progress bar.
This commit is contained in:
Daniel Eklöf 2018-12-16 16:20:45 +01:00
parent 2218bd1583
commit 47b36bdd35
4 changed files with 101 additions and 3 deletions

5
particles/ramp.h Normal file
View file

@ -0,0 +1,5 @@
#pragma once
#include "../particle.h"
struct particle *particle_ramp_new(
const char *tag, struct particle *particles[], size_t count);