1 #include "../ckb/ckb-anim.h"
11 CKB_GUID(
"{54DD2975-E192-457D-BCFC-D912A24E33B4}");
33 CKB_PRESET_PARAM(
"color",
"0:ffff0000 17:ffffff00 33:ff00ff00 50:ff00ffff 67:ff0000ff 83:ffff00ff 100:ffff0000");
60 srand((
unsigned)time(NULL));
62 anim = malloc(count *
sizeof *anim);
63 for(
unsigned i = 0; i < count; i++) {
64 anim[i].target =
NONE;
77 int i = key - context->
keys;
81 float colorChoice = (float)rand()/(float)(RAND_MAX);
85 newGradient.
pts[0] = 0;
86 newGradient.
pts[1] = 100;
87 newGradient.
a[0] = 255;
118 memset(anim, 0, count *
sizeof *anim);
120 for(
unsigned i = 0; i < count; i++) {
129 for(
unsigned i = 0; i < count; i++){
131 if(phase > 1.f || phase < 0.f)
133 anim[i].
target = phase + delta;
140 for(
unsigned i = 0; i < count; i++){
void ckb_keypress(ckb_runctx *context, ckb_key *key, int x, int y, int state)
void ckb_parameter(ckb_runctx *context, const char *name, const char *value)
#define CKB_VERSION(version)
#define CKB_TIMEMODE(mode)
#define CKB_PARSE_AGRADIENT(param_name, gradient_ptr)
#define CKB_LICENSE(license)
#define CKB_COPYRIGHT(year, author)
#define CKB_DESCRIPTION(description)
int ckb_frame(ckb_runctx *context)
#define CKB_PRESET_START(name)
void ckb_time(ckb_runctx *context, double delta)
#define CKB_PARAM_AGRADIENT(name, prefix, postfix, default)
#define CKB_LIVEPARAMS(enable)
#define CKB_TIME_DURATION
#define CKB_PARSE_BOOL(param_name, value_ptr)
void ckb_init(ckb_runctx *context)
void ckb_start(ckb_runctx *context, int state)
#define CKB_PRESET_PARAM(name, value)
#define CKB_PARAM_BOOL(name, text, default)
void ckb_grad_color(float *a, float *r, float *g, float *b, const ckb_gradient *grad, float pos)