started theme with tape
authortanya <tanya@moshkanov.oblgaz>
Mon, 19 Jul 2010 20:45:51 +0000 (23:45 +0300)
committertanya <tanya@moshkanov.oblgaz>
Mon, 19 Jul 2010 20:45:51 +0000 (23:45 +0300)
applet/data/theme/Accel/bg.png [new file with mode: 0644]
applet/data/theme/Accel/sun.png [new file with mode: 0755]
applet/data/theme/Accel/tape1_0.png [new file with mode: 0644]
applet/data/theme/Accel/tape1_1.png [new file with mode: 0644]
applet/data/theme/Accel/tel 1.png [new file with mode: 0644]
applet/src/livewp-actor.c
applet/src/livewp-actor.h
applet/src/livewp-scene.c

diff --git a/applet/data/theme/Accel/bg.png b/applet/data/theme/Accel/bg.png
new file mode 100644 (file)
index 0000000..4eab16c
Binary files /dev/null and b/applet/data/theme/Accel/bg.png differ
diff --git a/applet/data/theme/Accel/sun.png b/applet/data/theme/Accel/sun.png
new file mode 100755 (executable)
index 0000000..10931cd
Binary files /dev/null and b/applet/data/theme/Accel/sun.png differ
diff --git a/applet/data/theme/Accel/tape1_0.png b/applet/data/theme/Accel/tape1_0.png
new file mode 100644 (file)
index 0000000..5c24da5
Binary files /dev/null and b/applet/data/theme/Accel/tape1_0.png differ
diff --git a/applet/data/theme/Accel/tape1_1.png b/applet/data/theme/Accel/tape1_1.png
new file mode 100644 (file)
index 0000000..2b982a1
Binary files /dev/null and b/applet/data/theme/Accel/tape1_1.png differ
diff --git a/applet/data/theme/Accel/tel 1.png b/applet/data/theme/Accel/tel 1.png
new file mode 100644 (file)
index 0000000..4a314b9
Binary files /dev/null and b/applet/data/theme/Accel/tel 1.png differ
index 822b642..80fcc60 100644 (file)
@@ -660,6 +660,30 @@ change_signal(Actor * actor, AWallpaperPlugin *desktop_plugin)
 }
 
 void
+change_tape(Actor *actor, AWallpaperPlugin *desktop_plugin)
+{
+    gint x, speed = 8;
+    Actor *a;
+    
+    if (!desktop_plugin->priv->rich_animation) return;
+
+    a = g_ptr_array_index(actor->child, 0);
+    x = a->x - speed;
+    if (x < -800) 
+        x = 2400;
+    set_actor_position(a, x, a->y, a->z, desktop_plugin);
+    a->x = x;
+    
+    a = g_ptr_array_index(actor->child, 1);
+    x = a->x - speed;
+    if (x < -800) 
+        x = 2400;
+    set_actor_position(a, x, a->y, a->z, desktop_plugin);
+    a->x = x;
+
+}
+
+void
 change_layer(Actor * actor, AWallpaperPlugin *desktop_plugin)
 {
     gint y, speed1 = 8, speed2 = 16;
index 817f6a6..bf49c0c 100644 (file)
@@ -75,6 +75,7 @@ void set_actor_position(Actor *actor, gint x, gint y, gint z, AWallpaperPlugin *
 void set_actor_scale(Actor *actor, double scalex, double scaley);
 void set_actor_visible(Actor *actor, gboolean visible);
 void change_obj(Actor * actor, AWallpaperPlugin *desktop_plugin);
+void change_tape(Actor * actor, AWallpaperPlugin *desktop_plugin);
 void change_billboard(Actor * actor, AWallpaperPlugin *desktop_plugin);
 void change_moon(Actor * actor, AWallpaperPlugin *desktop_plugin);
 void change_sun(Actor * actor, AWallpaperPlugin *desktop_plugin);
index c35ad54..53d0ecf 100644 (file)
@@ -66,12 +66,43 @@ init_scene_Accel(AWallpaperPlugin *desktop_plugin)
     fprintf(stderr,"init scene accel\n");  
     Actor *actor;
     Scene *scene;
+    GPtrArray *child;
     gint now = time(NULL);
     
     scene = g_new0(Scene, 1);
     scene->actors = NULL;
     desktop_plugin->priv->scene = scene;
     
+    actor = init_object(desktop_plugin, "background", "bg.png", 
+                      0, 0, 5, 800, 480, 
+                      TRUE, TRUE, 100, 255, 
+                      NULL, NULL, NULL);
+    scene->actors = g_slist_append(scene->actors, actor);
+
+    child = g_ptr_array_sized_new(2);
+    actor = init_object(desktop_plugin, "tape0", "tape1_0.png",
+                        800, 100, 5, 1600, 227,
+                        TRUE, TRUE, 100, 255,
+                        NULL, NULL, NULL);
+    scene->actors = g_slist_append(scene->actors, actor);
+    g_ptr_array_add(child, actor);
+    
+    actor = init_object(desktop_plugin, "tape1", "tape1_1.png",
+                        2400, 100, 5, 1600, 227,
+                        TRUE, TRUE, 100, 255,
+                        NULL, NULL, NULL);
+    scene->actors = g_slist_append(scene->actors, actor);
+    g_ptr_array_add(child, actor);
+
+    actor = init_object(desktop_plugin, "tape1", "", 
+                      0, 800, 5, 1600, 227, 
+                      FALSE, FALSE, 100, 255, 
+                      (gpointer)&change_tape, NULL, child);
+    actor->time_start_animation = now;
+    actor->duration_animation = G_MAXINT;
+    scene->actors = g_slist_append(scene->actors, actor);
+
+    /* 
     actor = init_object(desktop_plugin, "sky", "sky0.png", 
                       0, 0, 1, 800, 480, 
                       TRUE , TRUE, 100, 255, 
@@ -85,7 +116,7 @@ init_scene_Accel(AWallpaperPlugin *desktop_plugin)
     actor->time_start_animation = now;
     actor->duration_animation = G_MAXINT;
     scene->actors = g_slist_append(scene->actors, actor);
-    
+    */
     run_long_timeout(desktop_plugin);
 }