if (!actor->visible){
actor->visible = TRUE;
- if (daytime == TIME_NIGHT){
- if (scene.daytime == TIME_NIGHT)
++ if (scene.daytime == TIME_NIGHT){
+ if (actor->filename)
+ g_free(actor->filename);
actor->filename = g_strdup("tram_dark.png");
- else
+ } else{
+ if (actor->filename)
+ g_free(actor->filename);
actor->filename = g_strdup("tram.png");
+ }
create_hildon_actor(actor, desktop_plugin);
}
t = (double)((double)sec+(double)ms/1000000 - actor->time_start_animation) / actor->duration_animation;
if (!actor->visible){
actor->visible = TRUE;
- if (daytime == TIME_NIGHT){
- if (scene.daytime == TIME_NIGHT)
++ if (scene.daytime == TIME_NIGHT){
+ if (actor->filename)
+ g_free(actor->filename);
actor->filename = g_strdup("tu154.png");
- else
+ }else{
+ if (actor->filename)
+ g_free(actor->filename);
actor->filename = g_strdup("tu154.png");
+ }
create_hildon_actor(actor, desktop_plugin);
}
t = (double)((double)sec+(double)ms/1000000 - actor->time_start_animation) / actor->duration_animation;
if (!actor->visible){
actor->visible = TRUE;
- if (daytime == TIME_NIGHT){
++ if (scene.daytime == TIME_NIGHT){
+ if (actor->filename)
+ g_free(actor->filename);
+ if (scene.daytime == TIME_NIGHT)
actor->filename = g_strdup("plane3.png");
- else
+ }else{
+ if (actor->filename)
+ g_free(actor->filename);
actor->filename = g_strdup("plane3.png");
+ }
create_hildon_actor(actor, desktop_plugin);
}
t = (double)((double)sec+(double)ms/1000000 - actor->time_start_animation) / actor->duration_animation;