void
change_tape(Actor *actor, AWallpaperPlugin *desktop_plugin)
{
- gint x, y,
- speed[4] = {7, 10, 5, 14},
- i;
+ gint x, y, i;
Actor *a;
if (!desktop_plugin->priv->rich_animation) return;
a = g_ptr_array_index(actor->child, i);
if (a->scale == 100) a->scale = ang;
if (abs(a->scale - ang) > 10){
- if (a->scale > ang)
+ if (a->scale > ang){
if ((a->scale - ang) < (ang + (360-a->scale))) a->scale--;
else a->scale++;
- if (a->scale < ang)
+ }
+ if (a->scale < ang) {
if (ang - a->scale < (a->scale+(360-ang))) a->scale++;
else a->scale--;
+ }
if (a->scale > 360) a->scale = 0;
if (a->scale < 0) a->scale = 360;
}
- x = round(a->x - (float)cos(a->scale*M_PI/180)*a->z);
- y = round(a->y - (float)sin(a->scale*M_PI/180)*a->z);
+ x = a->x - (float)cos(a->scale*M_PI/180)*a->z;
+ y = a->y - (float)sin(a->scale*M_PI/180)*a->z;
+ //x = round(a->x - (float)cos(a->scale*M_PI/180)*a->z);
+ //y = round(a->y - (float)sin(a->scale*M_PI/180)*a->z);
//x = a->x - cos(angle)*a->z;
//y = a->y - sin(angle)*a->z;
if ((a->scale > 270 || a->scale < 90) && x < -a->width*cos(a->scale*M_PI/180)){