Exemple #1
0
  /* =====================================================================
 *	Submarine explosion
 * =====================================================================*/
static void submarine_explosion()
{
  GdkPixbuf *pixmap = NULL;

  if (submarine_destroyed)
    return;

  submarine_destroyed = TRUE;
  gamewon = FALSE;
  gc_sound_play_ogg("sounds/crash.wav", NULL);

  /* make the submarine die */
  setSpeed(speed_ordered = submarine_horizontal_speed = 0.0);
  setBattery(battery = 0.0);
  setAir(air = 0.0);
  regleur = MAX_REGLEUR;
  weight = 2000.0;

  /* Stop the frigate */
  goo_canvas_item_stop_animation (frigate_item);

  /* display the boken submarine */
  pixmap = gc_pixmap_load("submarine/submarine-broken.png");
  g_object_set(submarine_item,
	       "pixbuf", pixmap,
	       NULL);
#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
  gdk_pixbuf_unref(pixmap);
#else
  g_object_unref(pixmap);
#endif

  ok();
}
Exemple #2
0
static void stop_frigate_anim()
{
  if (frigate_item)
    {
      goo_canvas_item_stop_animation (frigate_item);
      goo_canvas_item_remove(frigate_item);
    }
  frigate_item = NULL;
}
static void
stop_animation_clicked (GtkWidget *button, gpointer data)
{
  goo_canvas_item_stop_animation (ellipse1);
  goo_canvas_item_stop_animation (ellipse2);
  goo_canvas_item_stop_animation (rect1);
  goo_canvas_item_stop_animation (rect2);
  goo_canvas_item_stop_animation (rect3);
  goo_canvas_item_stop_animation (rect4);
}
Exemple #4
0
static VALUE
rg_stop_animation(VALUE self)
{
    goo_canvas_item_stop_animation(SELF(self));
    return self;
}