From: Tanya Date: Sun, 18 Apr 2010 21:31:26 +0000 (+0300) Subject: theme Matrix with 2 layers X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=d159e11657afafccf80a859f4cc6abcb37895ddf;p=livewp theme Matrix with 2 layers --- diff --git a/applet/data/theme/Matrix/11.png b/applet/data/theme/Matrix/11.png deleted file mode 100644 index 1967d0e..0000000 Binary files a/applet/data/theme/Matrix/11.png and /dev/null differ diff --git a/applet/data/theme/Matrix/111.png b/applet/data/theme/Matrix/111.png deleted file mode 100644 index 1967d0e..0000000 Binary files a/applet/data/theme/Matrix/111.png and /dev/null differ diff --git a/applet/data/theme/Matrix/22.png b/applet/data/theme/Matrix/22.png deleted file mode 100644 index 0fdb880..0000000 Binary files a/applet/data/theme/Matrix/22.png and /dev/null differ diff --git a/applet/data/theme/Matrix/33.png b/applet/data/theme/Matrix/33.png deleted file mode 100644 index f305da9..0000000 Binary files a/applet/data/theme/Matrix/33.png and /dev/null differ diff --git a/applet/data/theme/Matrix/bg.png b/applet/data/theme/Matrix/bg.png new file mode 100644 index 0000000..4eab16c Binary files /dev/null and b/applet/data/theme/Matrix/bg.png differ diff --git a/applet/data/theme/Matrix/layer1_0.png b/applet/data/theme/Matrix/layer1_0.png new file mode 100644 index 0000000..1967d0e Binary files /dev/null and b/applet/data/theme/Matrix/layer1_0.png differ diff --git a/applet/data/theme/Matrix/layer1_1.png b/applet/data/theme/Matrix/layer1_1.png new file mode 100644 index 0000000..1967d0e Binary files /dev/null and b/applet/data/theme/Matrix/layer1_1.png differ diff --git a/applet/data/theme/Matrix/layer2_0.png b/applet/data/theme/Matrix/layer2_0.png new file mode 100644 index 0000000..9bc3315 Binary files /dev/null and b/applet/data/theme/Matrix/layer2_0.png differ diff --git a/applet/data/theme/Matrix/layer2_1.png b/applet/data/theme/Matrix/layer2_1.png new file mode 100644 index 0000000..9bc3315 Binary files /dev/null and b/applet/data/theme/Matrix/layer2_1.png differ diff --git a/applet/data/theme/Matrix/symbols.png b/applet/data/theme/Matrix/symbols.png new file mode 100644 index 0000000..0fdb880 Binary files /dev/null and b/applet/data/theme/Matrix/symbols.png differ diff --git a/applet/src/livewp-home-widget.c b/applet/src/livewp-home-widget.c index 3cde353..9073a68 100644 --- a/applet/src/livewp-home-widget.c +++ b/applet/src/livewp-home-widget.c @@ -704,6 +704,17 @@ change_layer1(Actor * actor, AWallpaperPlugin *desktop_plugin) actor->y = y; } +void +change_layer2(Actor * actor, AWallpaperPlugin *desktop_plugin) +{ + gint y; + y = actor->y + 30; + 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 get_time(gint t){ @@ -741,8 +752,8 @@ reload_scene(AWallpaperPlugin *desktop_plugin) init_scene(desktop_plugin); else if (!strcmp(desktop_plugin->priv->theme,"Berlin")) init_scene1(desktop_plugin); - else if (!strcmp(desktop_plugin->priv->theme,"Modern")) - init_scene1(desktop_plugin); + else if (!strcmp(desktop_plugin->priv->theme,"Matrix")) + init_scene2(desktop_plugin); } @@ -761,28 +772,47 @@ init_scene2(AWallpaperPlugin *desktop_plugin) scene.seed = time(NULL); - - actor = init_object(desktop_plugin, "background", "33.png", 0, 0, 5, 800, 480, + actor = init_object(desktop_plugin, "background", "bg.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, + actor = init_object(desktop_plugin, "layer1", "layer1_0.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, + actor = init_object(desktop_plugin, "layer1", "layer1_1.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, + actor = init_object(desktop_plugin, "layer2", "layer2_0.png", + 0, -480, 7, 800, 2640, + TRUE, 100, 255, (gpointer)&change_layer2, 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", "layer2_1.png", + 0, -480 - 480, 7, 800, 2640, + TRUE, 100, 255, (gpointer)&change_layer2, 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", "symbols.png", + 0, 0, 8, 800, 480, TRUE, 100, 255, NULL, NULL); scene.actors = g_slist_append(scene.actors, actor); + run_long_timeout(desktop_plugin); } /* Init Modern Scene */ diff --git a/applet/src/livewp-home-widget.h b/applet/src/livewp-home-widget.h index fd3b159..cbe14a5 100644 --- a/applet/src/livewp-home-widget.h +++ b/applet/src/livewp-home-widget.h @@ -76,6 +76,7 @@ gint read_config(Animation_WallpaperPrivate *priv); void save_config(Animation_WallpaperPrivate *priv); static void init_scene(AWallpaperPlugin *desktop_plugin); static void init_scene1(AWallpaperPlugin *desktop_plugin); +static void init_scene2(AWallpaperPlugin *desktop_plugin); void create_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin); void get_sun_screen_pos(double alt, double azm, gint * x, gint * y);