Added scene level to defines
authortanya <tanya@tanin.oblgaz>
Sat, 10 Apr 2010 05:20:52 +0000 (08:20 +0300)
committertanya <tanya@tanin.oblgaz>
Sat, 10 Apr 2010 05:20:52 +0000 (08:20 +0300)
applet/src/livewp-common.h
applet/src/livewp-home-widget.c

index 4288553..407a5db 100644 (file)
 //#define LONG_TIMER 10*60*1000 /* 10 minutes */
 #define LONG_TIMER  10*1000 /* 10 minutes */
 enum { SHORT_TIMER_TYPE, LONG_TIMER_TYPE };
+#define SKY_LEVEL 0
+#define SUN_LEVEL 2
+#define TOWN_LEVEL 4
+#define TRAM_LEVEL 6
 
 
 typedef struct _AWallpaperPlugin AWallpaperPlugin;
index fa9144c..cdc79b5 100644 (file)
@@ -512,31 +512,31 @@ fprintf(stderr, "init scene \n");
   //get_sun_pos(&alt, &azm);
   //get_sun_screen_pos(alt, azm, &x, &y);
   
-  actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, -4, 88, 88, 
-                      TRUE, 100, 255, &change_sun, &probability_sun);
-  actor->time_start_animation = time(NULL);
-  actor->duration_animation = G_MAXINT;
-  change_sun(actor, desktop_plugin);
-  scene.actors = g_slist_append(scene.actors, actor);
-  //scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
  
-  actor = init_object(desktop_plugin, "sky", "sky0.png", 0, 0, -5, 800, 480, 
+  //scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
+  actor = init_object(desktop_plugin, "sky", "sky0.png", 0, 0, SKY_LEVEL, 800, 480, 
                       TRUE, 100, 255, &change_static_actor, NULL);
   change_static_actor(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
 
+  actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, SUN_LEVEL, 88, 88, 
+                      TRUE, 100, 255, &change_sun, &probability_sun);
+  actor->time_start_animation = time(NULL);
+  actor->duration_animation = G_MAXINT;
+  change_sun(actor, desktop_plugin);
+  scene.actors = g_slist_append(scene.actors, actor);
 
-  actor = init_object(desktop_plugin, "town", "town0.png", 0, 480-374, -3, 800, 374, 
+  actor = init_object(desktop_plugin, "town", "town0.png", 0, 480-374, TOWN_LEVEL, 800, 374, 
                       TRUE, 100, 255, &change_static_actor, NULL);
   change_static_actor(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
   
-  actor = init_object(desktop_plugin, "border", "border0.png", 0, 480-79, -1, 800, 79, 
+  actor = init_object(desktop_plugin, "border", "border0.png", 0, 480-79, TOWN_LEVEL+5, 800, 79, 
                       TRUE, 100, 255, &change_static_actor, NULL);
   change_static_actor(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
 
-  actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 20, -5, 60, 60, 
+  actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 20, SUN_LEVEL, 60, 60, 
                       FALSE, 100, 255, &change_moon, NULL);
   change_moon(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
@@ -546,12 +546,11 @@ fprintf(stderr, "init scene \n");
   //else snprintf(str, 255, "tram_dark.png");
   //actor = init_object("tram", "tram.png", -300, 191, 25, 350, 210, 1, 100, 255, NULL);
   
-  actor = init_object(desktop_plugin, "tram", "tram.png", -300, 225, -2, 350, 210, 
+  actor = init_object(desktop_plugin, "tram", "tram.png", -300, 225, TRAM_LEVEL, 350, 210, 
                       FALSE, 100, 255, &change_tram, NULL);
   actor->time_start_animation = time(NULL) + 10;
   actor->duration_animation = 60;
   scene.actors = g_slist_append(scene.actors, actor);
-
 #if 0    
   anim = g_new0(Animation, 1);
   anim->count = 1;
@@ -577,25 +576,25 @@ init_scene1(AWallpaperPlugin *desktop_plugin)
   scene.daytime = get_daytime();
   scene.actors = NULL;
   
-  actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, -4, 88, 88, 
+  actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, SUN_LEVEL, 88, 88, 
                       TRUE, 100, 255, &change_sun, &probability_sun);
   actor->time_start_animation = time(NULL);
   actor->duration_animation = G_MAXINT;
   change_sun(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
   
-  actor = init_object(desktop_plugin, "sky", "sky.png", 0, 0, -5, 800, 480, 
+  actor = init_object(desktop_plugin, "sky", "sky.png", 0, 0, SKY_LEVEL, 800, 480, 
                       TRUE, 100, 255, &change_static_actor, NULL);
   change_static_actor(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
 
 
-  actor = init_object(desktop_plugin, "town", "town.png", 0, 0, -3, 800, 480, 
+  actor = init_object(desktop_plugin, "town", "town.png", 0, 0, TOWN_LEVEL, 800, 480, 
                       TRUE, 100, 255, &change_static_actor, NULL);
   change_static_actor(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
 
-  actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 20, -5, 60, 60, 
+  actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 20, SUN_LEVEL, 60, 60, 
                       FALSE, 100, 255, &change_moon, NULL);
   change_moon(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);