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)){
//void set_actor_visible(Actor *actor, gboolean visible);
//void set_actor_scale(Actor *actor, double scalex, double scaley);
void create_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin);
+void create_hildon_actor_text(Actor *actor, AWallpaperPlugin *desktop_plugin);
void get_sun_screen_pos(double alt, double azm, gint * x, gint * y);
void show_settings(GtkWidget *widget, Animation_WallpaperPrivate *priv);
void livewp_initialize_dbus(Animation_WallpaperPrivate *priv);
GPtrArray *child;
gint now = time(NULL);
gchar *str;
- gint sizes[4] = {170, 229, 130, 150},
- sizes1[4] = {57, 76, 43, 50},
- heights[4] = {0, 100, 200, 300},
- n, i, j;
+ gint sizes1[4] = {57, 76, 43, 50},
+ n, j;
fprintf(stderr, "init scene accel\n");
scene = g_new0(Scene, 1);
for (j= 0; j<4; j++){
for (n=0; n<4; n++){
- //for (i=0; i<3; i++){
- str = g_strdup_printf("tape%i.png", n+1);
- actor = init_object(desktop_plugin, "tape", str,
- fast_rnd(800), fast_rnd(480), 2+fast_rnd(6), 800, sizes1[n],
- TRUE, TRUE, 100, 255,
- NULL, NULL, NULL);
- scene->actors = g_slist_append(scene->actors, actor);
- g_ptr_array_add(child, actor);
- g_free(str);
- //}
+ str = g_strdup_printf("tape%i.png", n+1);
+ actor = init_object(desktop_plugin, "tape", str,
+ fast_rnd(800), fast_rnd(480), 2+fast_rnd(6), 800, sizes1[n],
+ TRUE, TRUE, 100, 255,
+ NULL, NULL, NULL);
+ scene->actors = g_slist_append(scene->actors, actor);
+ g_ptr_array_add(child, actor);
+ g_free(str);
}
}
actor = init_object(desktop_plugin, "tape", "",
fprintf(stderr,"init_scene_Xsnow\n");
char* child_argv[128];
char *run_string = NULL;
-
-// fprintf(stderr, "PARAMETR %s\n", desktop_plugin->priv->theme_string_parametr1);
-// run_string = g_strdup_printf("/usr/bin/mplayer -vo x11 -wid %d %s\n", \
+#if 0
+ fprintf(stderr, "PARAMETR %s\n", desktop_plugin->priv->theme_string_parametr1);
+ run_string = g_strdup_printf("/usr/bin/mplayer -vo x11 -wid %d %s\n", \
GDK_WINDOW_XID(desktop_plugin->priv->window->window), desktop_plugin->priv->theme_string_parametr1);
+#endif
if (!desktop_plugin->priv->visible)
return;
run_string= g_strdup_printf("/usr/bin/xsnow");