actor->name = g_strdup(name);
actor->func_change = (gpointer)pfunc_change;
actor->func_probability = (gpointer)pfunc_probability;
- if (visible)
+ if (visible){
create_hildon_actor(actor, desktop_plugin);
- else
+ if (!strcmp(actor->name, "window") || !strcmp(actor->name, "moon")){
+ hildon_animation_actor_set_show (HILDON_ANIMATION_ACTOR(actor->widget), FALSE);
+ }
+ }else
actor->widget = NULL;
actor->time_start_animation = 0;
actor->duration_animation = 0;
g_free(actor->filename);
actor->filename = newfile;
#endif
- create_hildon_actor(actor, desktop_plugin);
+ //create_hildon_actor(actor, desktop_plugin);
+ hildon_animation_actor_set_show (HILDON_ANIMATION_ACTOR(actor->widget), actor->visible);
}
//actor->x = 400;
//actor->y = 10;
//fprintf(stderr, "after change sun %d\n", actor->time_start_animation);
}else if (actor->visible){
actor->visible = FALSE;
- fprintf(stderr, "destroy moon \n");
- destroy_hildon_actor(actor);
+ //fprintf(stderr, "destroy moon \n");
+ //destroy_hildon_actor(actor);
+ hildon_animation_actor_set_show (HILDON_ANIMATION_ACTOR(actor->widget), actor->visible);
/* TO DO make moonrise*/
actor->time_start_animation = 0;
}
if (scene.daytime == TIME_DAY){
if (actor->visible){
actor->visible = FALSE;
- destroy_hildon_actor(actor);
+ //destroy_hildon_actor(actor);
+ hildon_animation_actor_set_show (HILDON_ANIMATION_ACTOR(actor->widget), actor->visible);
}
actor->time_start_animation = 0;
return;
if (!actor->visible){
actor->visible = TRUE;
- create_hildon_actor(actor, desktop_plugin);
+ //create_hildon_actor(actor, desktop_plugin);
+ hildon_animation_actor_set_show (HILDON_ANIMATION_ACTOR(actor->widget), actor->visible);
actor->time_start_animation = now + 5;
}else {
actor->visible = FALSE;
- destroy_hildon_actor(actor);
+ //destroy_hildon_actor(actor);
+ hildon_animation_actor_set_show (HILDON_ANIMATION_ACTOR(actor->widget), actor->visible);
actor->time_start_animation = now + 5;
}
actor = init_object(desktop_plugin, "cloud1", "cloud1.png", 0, 0, 7, 150, 97,
FALSE, 100, 255, (gpointer)&change_cloud, NULL);
actor->time_start_animation = now;
- actor->duration_animation = 1*60;
+ actor->duration_animation = 40;
scene.actors = g_slist_append(scene.actors, actor);
actor = init_object(desktop_plugin, "cloud2", "cloud2.png", 0, 80, 7, 188, 75,
actor = init_object(desktop_plugin, "cloud4", "cloud4.png", 0, 30, 7, 150, 75,
FALSE, 100, 255, (gpointer)&change_cloud, NULL);
actor->time_start_animation = now + 40;
- actor->duration_animation = 1*60;
+ actor->duration_animation = 50;
scene.actors = g_slist_append(scene.actors, actor);
actor = init_object(desktop_plugin, "tram", "tram.png", -300, 225, 9, 350, 210,
FALSE, 100, 255, (gpointer)&change_tram, NULL);
actor->time_start_animation = now;
- actor->duration_animation = 40;
+ actor->duration_animation = 32;
scene.actors = g_slist_append(scene.actors, actor);
actor = init_object(desktop_plugin, "border", "border0.png", 0, 480-79, 10, 800, 79,
scene.actors = g_slist_append(scene.actors, actor);
actor = init_object(desktop_plugin, "moon", "moon5.png", 400, 20, 6, 60, 60,
- FALSE, 100, 255, (gpointer)&change_moon, NULL);
+ TRUE, 100, 255, (gpointer)&change_moon, NULL);
change_moon(actor, desktop_plugin);
scene.actors = g_slist_append(scene.actors, actor);
/*
winds[9][0] = 495;
winds[9][1] = 241;
-
- winds[10][0] = 495;
- winds[10][1] = 252;
-
- winds[11][0] = 482;
- winds[11][1] = 273;
-
- winds[12][0] = 495;
- winds[12][1] = 303;
- for (i=0; i<13; i++){
- actor = init_object(desktop_plugin, "window1", "window1.png",
+ for (i=0; i<10; i++){
+ actor = init_object(desktop_plugin, "window", "window1.png",
winds[i][0], winds[i][1], 8, 8, 10,
- FALSE, 100, 255, (gpointer)&change_window1, NULL);
+ TRUE, 100, 255, (gpointer)&change_window1, NULL);
//change_window1(actor, desktop_plugin);
actor->time_start_animation = now + fast_rnd(30);
scene.actors = g_slist_append(scene.actors, actor);
winds[5][0] = 94;
winds[5][1] = 243;
-
- winds[6][0] = 94;
- winds[6][1] = 265;
-
- winds[7][0] = 94;
- winds[7][1] = 331;
- for (i=0; i<8; i++){
- actor = init_object(desktop_plugin, "window2", "window2.png",
+ for (i=0; i<6; i++){
+ actor = init_object(desktop_plugin, "window", "window2.png",
winds[i][0], winds[i][1], 8, 8, 10,
- FALSE, 100, 255, (gpointer)&change_window1, NULL);
+ TRUE, 100, 255, (gpointer)&change_window1, NULL);
//change_window1(actor, desktop_plugin);
actor->time_start_animation = now + fast_rnd(30);
scene.actors = g_slist_append(scene.actors, actor);
winds[7][0] = 322;
winds[7][1] = 224;
-
- winds[8][0] = 323;
- winds[8][1] = 217;
-
- winds[9][0] = 322;
- winds[9][1] = 288;
-
- for (i=0; i<10; i++){
- actor = init_object(desktop_plugin, "window3", "window3.png",
+
+ for (i=0; i<8; i++){
+ actor = init_object(desktop_plugin, "window", "window3.png",
winds[i][0], winds[i][1], 8, 8, 10,
- FALSE, 100, 255, (gpointer)&change_window1, NULL);
+ TRUE, 100, 255, (gpointer)&change_window1, NULL);
//change_window1(actor, desktop_plugin);
actor->time_start_animation = now + fast_rnd(30);
scene.actors = g_slist_append(scene.actors, actor);
winds[4][0] = 610;
winds[4][1] = 320;
-
- winds[5][0] = 593;
- winds[5][1] = 352;
-
- winds[6][0] = 610;
- winds[6][1] = 368;
-
- for (i=0; i<7; i++){
- actor = init_object(desktop_plugin, "window4", "window4.png",
+
+ for (i=0; i<5; i++){
+ actor = init_object(desktop_plugin, "window", "window4.png",
winds[i][0], winds[i][1], 8, 8, 10,
- FALSE, 100, 255, (gpointer)&change_window1, NULL);
+ TRUE, 100, 255, (gpointer)&change_window1, NULL);
//change_window1(actor, desktop_plugin);
actor->time_start_animation = now + fast_rnd(30);
scene.actors = g_slist_append(scene.actors, actor);
winds[3][0] = 717;
winds[3][1] = 323;
- winds[4][0] = 698;
- winds[4][1] = 362;
-
- winds[5][0] = 698;
- winds[5][1] = 400;
-
- for (i=0; i<6; i++){
- actor = init_object(desktop_plugin, "window5", "window5.png",
+ for (i=0; i<4; i++){
+ actor = init_object(desktop_plugin, "window", "window5.png",
winds[i][0], winds[i][1], 8, 8, 10,
- FALSE, 100, 255, (gpointer)&change_window1, NULL);
+ TRUE, 100, 255, (gpointer)&change_window1, NULL);
//change_window1(actor, desktop_plugin);
actor->time_start_animation = now + fast_rnd(30);
scene.actors = g_slist_append(scene.actors, actor);
#endif
actor = init_object(desktop_plugin, "moon", "moon4.png", 400, 15, 6, 60, 60,
- FALSE, 100, 255, (gpointer)&change_moon, NULL);
+ TRUE, 100, 255, (gpointer)&change_moon, NULL);
change_moon(actor, desktop_plugin);
scene.actors = g_slist_append(scene.actors, actor);
actor = init_object(desktop_plugin, "signal", "red.png", 486, 425, 10, 18, 38,
TRUE, 100, 255, (gpointer)&change_signal, NULL);
actor->time_start_animation = now;
- scene.actors = g_slist_append(scene.actors, actor);winds[0][0] = 717;
+ scene.actors = g_slist_append(scene.actors, actor);
winds[0][0] = 389;
winds[0][1] = 305;
for (i=0; i<13; i++){
actor = init_object(desktop_plugin, "window", "window.png",
winds[i][0], winds[i][1], 10, 8, 9,
- FALSE, 100, 255, (gpointer)&change_window1, NULL);
+ TRUE, 100, 255, (gpointer)&change_window1, NULL);
//change_window1(actor, desktop_plugin);
actor->time_start_animation = now + fast_rnd(30);
scene.actors = g_slist_append(scene.actors, actor);