try to do matrix
authorTanya <tanya@bookdmitri.oblgaz>
Sun, 18 Apr 2010 19:22:47 +0000 (22:22 +0300)
committerTanya <tanya@bookdmitri.oblgaz>
Sun, 18 Apr 2010 19:22:47 +0000 (22:22 +0300)
applet/data/theme/Modern/11.png [new file with mode: 0644]
applet/data/theme/Modern/111.png [new file with mode: 0644]
applet/data/theme/Modern/22.png [new file with mode: 0644]
applet/data/theme/Modern/33.png [new file with mode: 0644]
applet/src/livewp-home-widget.c

diff --git a/applet/data/theme/Modern/11.png b/applet/data/theme/Modern/11.png
new file mode 100644 (file)
index 0000000..1967d0e
Binary files /dev/null and b/applet/data/theme/Modern/11.png differ
diff --git a/applet/data/theme/Modern/111.png b/applet/data/theme/Modern/111.png
new file mode 100644 (file)
index 0000000..1967d0e
Binary files /dev/null and b/applet/data/theme/Modern/111.png differ
diff --git a/applet/data/theme/Modern/22.png b/applet/data/theme/Modern/22.png
new file mode 100644 (file)
index 0000000..0fdb880
Binary files /dev/null and b/applet/data/theme/Modern/22.png differ
diff --git a/applet/data/theme/Modern/33.png b/applet/data/theme/Modern/33.png
new file mode 100644 (file)
index 0000000..f305da9
Binary files /dev/null and b/applet/data/theme/Modern/33.png differ
index f309794..625ee66 100644 (file)
@@ -693,6 +693,16 @@ change_static_actor_with_corner(Actor * actor, AWallpaperPlugin *desktop_plugin)
 
 }
 
+void
+change_layer1(Actor * actor, AWallpaperPlugin *desktop_plugin)
+{
+    gint y;
+    y = actor->y + 20;
+    if (y > 480) y = -480;
+    //fprintf(stderr, "!! %s - %d\n", actor->name, y);
+    actor_set_position_full(actor->widget, actor->x, y, actor->z);
+    actor->y = y;
+}
 
 /*
 static gint 
@@ -733,10 +743,48 @@ reload_scene(AWallpaperPlugin *desktop_plugin)
         init_scene1(desktop_plugin);
 }
 
+static void
+init_scene(AWallpaperPlugin *desktop_plugin)
+{
+  Actor *actor;
+  gint now = time(NULL);
+
+  /* fprintf(stderr, "init scene \n");*/
+  scene.daytime = get_daytime();
+  scene.actors = NULL;
+  scene.wind_orientation = -1;
+  scene.wind_angle = 0.3;
+  /* init value for random */
+  scene.seed = time(NULL);
+
+  
+
+  actor = init_object(desktop_plugin, "background", "33.png", 0, 0, 5, 800, 480, 
+                      TRUE, 100, 255, NULL, NULL);
+  scene.actors = g_slist_append(scene.actors, actor);
+
+  actor = init_object(desktop_plugin, "layer1", "11.png", 0, -480, 6, 800, 1920, 
+                      TRUE, 100, 255, (gpointer)&change_layer1, NULL);
+  actor->time_start_animation = now;
+  actor->duration_animation = G_MAXINT;
+  scene.actors = g_slist_append(scene.actors, actor);
+
+  actor = init_object(desktop_plugin, "layer2", "111.png", 0, -480 - 480, 6, 800, 1920, 
+                      TRUE, 100, 255, (gpointer)&change_layer1, NULL);
+  actor->time_start_animation = now;
+  actor->duration_animation = G_MAXINT;
+  scene.actors = g_slist_append(scene.actors, actor);
+
+  actor = init_object(desktop_plugin, "symbols", "22.png", 0, 0, 7, 800, 480, 
+                      TRUE, 100, 255, NULL, NULL);
+  scene.actors = g_slist_append(scene.actors, actor);
+  
 
+    run_long_timeout(desktop_plugin);
+}
 /* Init Modern Scene */
 static void
-init_scene(AWallpaperPlugin *desktop_plugin)
+init_scene2(AWallpaperPlugin *desktop_plugin)
 {
   Actor *actor;
   gint now = time(NULL);