1 #include "../ckb/ckb-anim.h"
10 CKB_GUID(
"{E0BBA19E-C328-4C0E-8E3C-A06D5722B4FC}");
33 CKB_PRESET_PARAM(
"color",
"0:ffff0000 17:ffffff00 33:ff00ff00 50:ff00ffff 67:ff0000ff 83:ffff00ff 100:ffff0000");
38 CKB_PRESET_PARAM(
"color",
"0:ffff0000 17:ffffff00 33:ff00ff00 50:ff00ffff 67:ff0000ff 83:ffff00ff 100:ffff0000");
66 double wOver2 = context->
width / 2., hOver2 = context->
height / 2.;
76 for(
int i = 0; i < 4; i++){
77 double x2 = x[i] * cos(
angle) - y[i] * sin(
angle);
82 double min_x = INFINITY, max_x = -INFINITY;
83 for(
int i = 0; i < 4; i++){
94 width = max_x - min_x;
98 #define ANIM_MAX (144 * 2)
143 for(
unsigned i = 0; i <
ANIM_MAX; i++){
145 anim[i].curx += width * delta;
146 if(
anim[i].curx > width + length)
158 for(
unsigned i = 0; i <
ANIM_MAX; i++){
168 distance = fabs(distance);
169 else if(distance >= -0.005f && distance < 0.f)
172 if(distance > 1.f && distance <= 1.005f)
176 if(distance <= 1.f && distance >= 0.){
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_PARAM_DOUBLE(name, prefix, postfix, default, min, max)
#define CKB_VERSION(version)
#define CKB_TIMEMODE(mode)
#define CKB_PARAM_ANGLE(name, prefix, postfix, default)
#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_PREEMPT(enable)
#define CKB_PARAM_AGRADIENT(name, prefix, postfix, default)
#define CKB_LIVEPARAMS(enable)
void anim_remove(int index)
#define CKB_TIME_DURATION
#define CKB_PARSE_BOOL(param_name, value_ptr)
void ckb_init(ckb_runctx *context)
#define CKB_PARSE_ANGLE(param_name, value_ptr)
#define CKB_KEYCLEAR(context)
void ckb_start(ckb_runctx *context, int state)
#define CKB_PRESET_PARAM(name, value)
#define CKB_PARSE_DOUBLE(param_name, value_ptr)
#define CKB_PARAM_BOOL(name, text, default)
void ckb_alpha_blend(ckb_key *key, float a, float r, float g, float b)
#define CKB_REAL_ANGLE(angle)
void ckb_grad_color(float *a, float *r, float *g, float *b, const ckb_gradient *grad, float pos)