[gnome-games] gnibbles: remote all trailing whitespace to make git happy



commit cd17f95994b289fed65313ef104beef5f588d262
Author: Jason D. Clinton <me jasonclinton com>
Date:   Wed Oct 14 15:24:11 2009 -0500

    gnibbles: remote all trailing whitespace to make git happy

 gnibbles/board.c       |   32 ++++++++--------
 gnibbles/board.h       |    2 +-
 gnibbles/boni.c        |   18 ++++----
 gnibbles/boni.h        |    4 +-
 gnibbles/bonus.c       |    2 +-
 gnibbles/bonus.h       |    4 +-
 gnibbles/ggz-network.c |    4 +-
 gnibbles/gnibbles.c    |   34 ++++++++--------
 gnibbles/gnibbles.h    |    4 +-
 gnibbles/main.c        |   92 +++++++++++++++++++++++-----------------------
 gnibbles/main.h        |    4 +-
 gnibbles/preferences.c |    8 ++--
 gnibbles/preferences.h |    4 +-
 gnibbles/properties.c  |   28 +++++++-------
 gnibbles/properties.h  |    4 +-
 gnibbles/scoreboard.c  |    6 +-
 gnibbles/scoreboard.h  |    4 +-
 gnibbles/server.c      |    2 +-
 gnibbles/warp.c        |    2 +-
 gnibbles/warp.h        |    4 +-
 gnibbles/warpmanager.c |   22 +++++-----
 gnibbles/warpmanager.h |    6 +-
 gnibbles/worm.c        |   96 ++++++++++++++++++++++++------------------------
 gnibbles/worm.h        |    2 +-
 24 files changed, 194 insertions(+), 194 deletions(-)
---
diff --git a/gnibbles/board.c b/gnibbles/board.c
index 2b31c23..df83c40 100644
--- a/gnibbles/board.c
+++ b/gnibbles/board.c
@@ -1,10 +1,10 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *              Guillaume Beland <guillaume beland gmail com>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
@@ -49,7 +49,7 @@ extern GdkPixbuf *wall_pixmaps[];
 extern ClutterActor *stage;
 
 GnibblesBoard *
-gnibbles_board_new (void) 
+gnibbles_board_new (void)
 {
   gchar *filename;
   const char *dirname;
@@ -65,7 +65,7 @@ gnibbles_board_new (void)
   filename = g_build_filename (dirname, "wall-small-empty.svg", NULL);
 
   board->surface = clutter_texture_new_from_file (filename, NULL);
- 
+
   clutter_actor_set_opacity (CLUTTER_ACTOR (board->surface), 100);
   g_value_init (&val, G_TYPE_BOOLEAN);
   g_value_set_boolean ( &val, TRUE);
@@ -77,26 +77,26 @@ gnibbles_board_new (void)
   clutter_actor_set_size (CLUTTER_ACTOR (board->surface),
                           properties->tilesize * BOARDWIDTH,
                           properties->tilesize * BOARDHEIGHT);
-  clutter_container_add_actor (CLUTTER_CONTAINER (stage), 
+  clutter_container_add_actor (CLUTTER_CONTAINER (stage),
                                CLUTTER_ACTOR (board->surface));
   clutter_actor_show (CLUTTER_ACTOR (board->surface));
 
   return board;
 }
 
-static void 
-gnibbles_board_load_level (GnibblesBoard *board) 
+static void
+gnibbles_board_load_level (GnibblesBoard *board)
 {
   gint i,j;
   gint x_pos, y_pos;
-  ClutterActor *tmp;  
+  ClutterActor *tmp;
   gboolean is_wall = TRUE;
 
   if (board->level) {
     clutter_group_remove_all (CLUTTER_GROUP (board->level));
     clutter_container_remove_actor (CLUTTER_CONTAINER (stage), board->level);
   }
-  
+
   board->level = clutter_group_new ();
 
   /* Load wall_pixmaps onto the surface*/
@@ -155,7 +155,7 @@ gnibbles_board_load_level (GnibblesBoard *board)
 
         clutter_actor_set_position (CLUTTER_ACTOR (tmp), x_pos, y_pos);
         clutter_actor_show (CLUTTER_ACTOR (tmp));
-        clutter_container_add_actor (CLUTTER_CONTAINER (board->level), 
+        clutter_container_add_actor (CLUTTER_CONTAINER (board->level),
                                      CLUTTER_ACTOR (tmp));
       }
     }
@@ -219,7 +219,7 @@ gnibbles_board_level_new (GnibblesBoard *board, gint level)
   gint count = 0;
 
   tmp = g_strdup_printf("level%03d.gnl", level);
-  
+
   dirname = games_runtime_get_directory (GAMES_RUNTIME_GAME_GAMES_DIRECTORY);
   filename = g_build_filename (dirname, tmp, NULL);
 
@@ -263,7 +263,7 @@ gnibbles_board_level_new (GnibblesBoard *board, gint level)
           break;
         case 'n':
           board->walls[j][i] = EMPTYCHAR;
-          if (count < properties->numworms) 
+          if (count < properties->numworms)
             gnibbles_worm_set_start(worms[count++], j, i, WORMLEFT);
           break;
         case 'o':
@@ -313,7 +313,7 @@ gnibbles_board_level_new (GnibblesBoard *board, gint level)
 
   for (i = 0; i < count; i++) {
     if (worms[i]->direction == WORMRIGHT) {
-      for (j = 0; j < worms[i]->length; j++) 
+      for (j = 0; j < worms[i]->length; j++)
         gnibbles_worm_move_head_pointer (worms[i]);
       worms[i]->xtail++;
     } else if ( worms[i]->direction == WORMLEFT) {
@@ -321,17 +321,17 @@ gnibbles_board_level_new (GnibblesBoard *board, gint level)
         gnibbles_worm_move_head_pointer (worms[i]);
       worms[i]->xtail--;
     } else if (worms[i]->direction == WORMDOWN) {
-      for (j = 0; j < worms[i]->length; j++) 
+      for (j = 0; j < worms[i]->length; j++)
         gnibbles_worm_move_head_pointer (worms[i]);
       worms[i]->ytail++;
     } else if (worms[i]->direction == WORMUP) {
-      for (j = 0; j < worms[i]->length; j++) 
+      for (j = 0; j < worms[i]->length; j++)
         gnibbles_worm_move_head_pointer (worms[i]);
       worms[i]->ytail--;
     }
     board->walls[worms[i]->xtail][worms[i]->ytail] = EMPTYCHAR;
   }
-  gnibbles_board_load_level (board); 
+  gnibbles_board_load_level (board);
 }
 
 void
diff --git a/gnibbles/board.h b/gnibbles/board.h
index f8cf990..b7a561e 100644
--- a/gnibbles/board.h
+++ b/gnibbles/board.h
@@ -1,6 +1,6 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *                 Guillaume Beland <guillaume beland gmail com>
diff --git a/gnibbles/boni.c b/gnibbles/boni.c
index aafbbb2..3861a17 100644
--- a/gnibbles/boni.c
+++ b/gnibbles/boni.c
@@ -1,4 +1,4 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *              Guillaume Beland <guillaume beland gmail com>
@@ -83,12 +83,12 @@ gnibbles_boni_add_bonus (GnibblesBoni * boni, gint t_x, gint t_y,
   board->walls[t_x + 1][t_y + 1] = (gchar) t_type + 'A';
 
   gnibbles_bonus_draw (boni->bonuses[boni->numbonuses]);
-  
+
   boni->numbonuses++;
   if (t_type != BONUSREGULAR)
     games_sound_play ("appear");
 #ifdef GGZ_CLIENT
-  if (ggz_network_mode) { 
+  if (ggz_network_mode) {
     network_add_bonus (t_x, t_y, t_type, t_fake, t_countdown);
   }
 #endif
@@ -100,8 +100,8 @@ gnibbles_boni_add_bonus_final (GnibblesBoni * boni, gint t_x, gint t_y,
 {
   if (boni->numbonuses == MAXBONUSES)
     return;
-  boni->bonuses[boni->numbonuses] = gnibbles_bonus_new (t_x, t_y, 
-                                                        t_type, t_fake, 
+  boni->bonuses[boni->numbonuses] = gnibbles_bonus_new (t_x, t_y,
+                                                        t_type, t_fake,
                                                         t_countdown);
   board->walls[t_x][t_y] = (gchar) t_type + 'A';
   board->walls[t_x + 1][t_y] = (gchar) t_type + 'A';
@@ -140,7 +140,7 @@ gnibbles_boni_remove_bonus (GnibblesBoni * boni, gint x, gint y)
   int i;
 
 #ifdef GGZ_CLIENT
-  if (ggz_network_mode) { 
+  if (ggz_network_mode) {
     network_remove_bonus (x, y);
   }
 #endif
@@ -191,11 +191,11 @@ gnibbles_boni_remove_bonus_final (GnibblesBoni * boni, gint x, gint y)
   }
 }
 
-void 
+void
 gnibbles_boni_rescale (GnibblesBoni *boni, gint tilesize)
 {
   int i;
-  gfloat x_pos, y_pos;  
+  gfloat x_pos, y_pos;
   GError *err = NULL;
 
   for (i = 0; i < boni->numbonuses; i++) {
@@ -203,7 +203,7 @@ gnibbles_boni_rescale (GnibblesBoni *boni, gint tilesize)
     clutter_actor_set_position (boni->bonuses[i]->actor,
                                 (x_pos / properties->tilesize) * tilesize,
                                 (y_pos / properties->tilesize) * tilesize);
-    gtk_clutter_texture_set_from_pixbuf (CLUTTER_TEXTURE(boni->bonuses[i]->actor), 
+    gtk_clutter_texture_set_from_pixbuf (CLUTTER_TEXTURE(boni->bonuses[i]->actor),
                                          boni_pixmaps[boni->bonuses[i]->type],
                                          &err);
     if (err)
diff --git a/gnibbles/boni.h b/gnibbles/boni.h
index dc7e14f..a5dad0f 100644
--- a/gnibbles/boni.h
+++ b/gnibbles/boni.h
@@ -1,7 +1,7 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
diff --git a/gnibbles/bonus.c b/gnibbles/bonus.c
index f2fc48e..afe4d23 100644
--- a/gnibbles/bonus.c
+++ b/gnibbles/bonus.c
@@ -1,4 +1,4 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *              Guillaume Beland <guillaume beland gmail com>
diff --git a/gnibbles/bonus.h b/gnibbles/bonus.h
index 6571a08..692db0d 100644
--- a/gnibbles/bonus.h
+++ b/gnibbles/bonus.h
@@ -1,8 +1,8 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *              Guillaume Beland <guillaume beland gmail com>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
diff --git a/gnibbles/ggz-network.c b/gnibbles/ggz-network.c
index ddade1c..049dc0c 100644
--- a/gnibbles/ggz-network.c
+++ b/gnibbles/ggz-network.c
@@ -140,7 +140,7 @@ get_players (void)
         add_chat_text (tmp);
         g_free (tmp);
       }
-    } 
+    }
 
     if (seats[i] == GGZ_SEAT_ABANDONED) {
       if (i == 0) {
@@ -392,7 +392,7 @@ void
 on_network_game (void)
 {
   GtkWidget *ggzbox;
-  struct passwd *pwent;  
+  struct passwd *pwent;
   static gboolean ggz_initialized = FALSE;
 
   if (ggz_network_mode) {
diff --git a/gnibbles/gnibbles.c b/gnibbles/gnibbles.c
index 8820c47..690bcf8 100644
--- a/gnibbles/gnibbles.c
+++ b/gnibbles/gnibbles.c
@@ -1,6 +1,6 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *              Guillaume Beland <guillaume beland gmail com>
@@ -105,7 +105,7 @@ gnibbles_load_pixmap_file (const gchar * pixmap, gint xsize, gint ysize)
   return image;
 }
 
-void 
+void
 gnibbles_load_pixmap (gint tilesize)
 {
   gchar *bonus_files[] = {
@@ -133,7 +133,7 @@ gnibbles_load_pixmap (gint tilesize)
     "wall-tee-down.svg",
     "wall-cross.svg"
   };
-  
+
   gchar *worm_files[] = {
     "snake-red.svg",
     "snake-green.svg",
@@ -157,7 +157,7 @@ gnibbles_load_pixmap (gint tilesize)
   for (i = 0; i < 11; i++) {
     if (wall_pixmaps[i])
       g_object_unref (wall_pixmaps[i]);
-      
+
     wall_pixmaps[i] = gnibbles_load_pixmap_file (small_files[i],
                                                  2 * tilesize, 2 * tilesize);
   }
@@ -166,7 +166,7 @@ gnibbles_load_pixmap (gint tilesize)
     if (worm_pixmaps[i])
       g_object_unref (worm_pixmaps[i]);
 
-    worm_pixmaps[i] = gnibbles_load_pixmap_file (worm_files[i], 
+    worm_pixmaps[i] = gnibbles_load_pixmap_file (worm_files[i],
                                                  tilesize, tilesize);
   }
 }
@@ -189,7 +189,7 @@ gnibbles_load_logo (gint tilesize)
     g_object_unref (logo_pixmap);
 
   logo_pixmap = gnibbles_load_pixmap_file ("gnibbles-logo.svg",
-                                           board->width * tilesize, 
+                                           board->width * tilesize,
                                            board->height * tilesize);
 }
 
@@ -210,7 +210,7 @@ gnibbles_init ()
 
   for (i = 0; i < properties->numworms; i++) {
     worms[i] = gnibbles_worm_new (i);
-    gnibbles_scoreboard_register (scoreboard, worms[i], 
+    gnibbles_scoreboard_register (scoreboard, worms[i],
                    colorval_name (properties->wormprops[i]->color));
   }
 
@@ -244,14 +244,14 @@ gnibbles_move_worms (void)
   for (i = 0; i < boni->numbonuses; i++) {
     if (!(boni->bonuses[i]->countdown--)) {
       if (boni->bonuses[i]->type == BONUSREGULAR && !boni->bonuses[i]->fake) {
-        gnibbles_boni_remove_bonus (boni, 
-                                    boni->bonuses[i]->x, 
+        gnibbles_boni_remove_bonus (boni,
+                                    boni->bonuses[i]->x,
                                     boni->bonuses[i]->y);
         boni->missed++;
         gnibbles_board_level_add_bonus (board, 1);
       } else {
-        gnibbles_boni_remove_bonus (boni, 
-                                    boni->bonuses[i]->x, 
+        gnibbles_boni_remove_bonus (boni,
+                                    boni->bonuses[i]->x,
                                     boni->bonuses[i]->y);
       }
     }
@@ -261,12 +261,12 @@ gnibbles_move_worms (void)
     dead[i] = !gnibbles_worm_test_move_head (worms[i]);
     status &= !dead[i];
   }
- 
+
   for (i = 0; i < properties->numworms; i++) {
     if (!dead[i] && worms[i]->lives > 0 && !worms[i]->stop)
       gnibbles_worm_move_tail (worms[i]);
   }
-  
+
   for (i = 0; i < properties->numworms; i++) {
     if (!dead[i] && worms[i]->lives > 0 && !worms[i]->stop)
       gnibbles_worm_move_head (worms[i]);
@@ -274,7 +274,7 @@ gnibbles_move_worms (void)
 
   for (i = 0; i < properties->numworms; i++) {
     for (j = 0; j < properties->numworms; j++) {
-      if (i != j 
+      if (i != j
           && worms[i]->xhead == worms[j]->xhead
           && worms[i]->yhead == worms[j]->yhead
           && worms[i]->lives > 0
@@ -313,7 +313,7 @@ gnibbles_move_worms (void)
   }
 
   if (nlives == 1 && (properties->ai + properties->human > 1)) {
-    /* There is one player left, the other AI players are dead, 
+    /* There is one player left, the other AI players are dead,
      * and that player has won! */
     return VICTORY;
   } else if (nlives == 0) {
@@ -362,8 +362,8 @@ gnibbles_show_scores (GtkWidget * window, gint pos)
   gchar *message;
 
   if (!scoresdialog) {
-    scoresdialog = games_scores_dialog_new (GTK_WINDOW (window), 
-                                            highscores, 
+    scoresdialog = games_scores_dialog_new (GTK_WINDOW (window),
+                                            highscores,
                                             _("Nibbles Scores"));
     games_scores_dialog_set_category_description (GAMES_SCORES_DIALOG
                                                   (scoresdialog),
diff --git a/gnibbles/gnibbles.h b/gnibbles/gnibbles.h
index 3d2dc84..a6059db 100644
--- a/gnibbles/gnibbles.h
+++ b/gnibbles/gnibbles.h
@@ -1,7 +1,7 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
diff --git a/gnibbles/main.c b/gnibbles/main.c
index e71612e..a462de7 100644
--- a/gnibbles/main.c
+++ b/gnibbles/main.c
@@ -1,6 +1,6 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *              Guillaume Beland <guillaume beland gmail com>
@@ -85,7 +85,7 @@ extern GdkPixbuf *logo_pixmap;
 
 GnibblesProperties *properties;
 
-GnibblesBoard *board; 
+GnibblesBoard *board;
 
 GnibblesScoreboard *scoreboard;
 
@@ -174,7 +174,7 @@ window_state_cb (GtkWidget * widget, GdkEventWindowState * event)
   if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN)
     set_fullscreen_actions (event->new_window_state
                             & GDK_WINDOW_STATE_FULLSCREEN);
-    
+
   return FALSE;
 }
 
@@ -224,7 +224,7 @@ quit_cb (GObject * object, gpointer data)
 static void
 about_cb (GtkAction * action, gpointer data)
 {
-  const gchar *authors[] = { "Sean MacIsaac", "Ian Peters", "Andreas Røsdal", 
+  const gchar *authors[] = { "Sean MacIsaac", "Ian Peters", "Andreas Røsdal",
                              "Guillaume Beland", NULL };
 
   const gchar *documenters[] = { "Kevin Breit", NULL };
@@ -241,7 +241,7 @@ about_cb (GtkAction * action, gpointer data)
        "Copyright \xc2\xa9 1999-2008 Sean MacIsaac, Ian Peters, Andreas Røsdal"
        "2009 Guillaume Beland",
        "license", license, "comments",
-       _("A worm game for GNOME.\n\nNibbles is a part of GNOME Games."), 
+       _("A worm game for GNOME.\n\nNibbles is a part of GNOME Games."),
        "authors", authors,
        "documenters", documenters, "translator-credits",
        _("translator-credits"), "logo-icon-name",
@@ -282,14 +282,14 @@ configure_event_cb (GtkWidget *widget, GdkEventConfigure *event, gpointer data)
   gnibbles_load_pixmap (tilesize);
   gnibbles_load_logo (tilesize);
 
-  clutter_actor_set_size (CLUTTER_ACTOR (stage), 
+  clutter_actor_set_size (CLUTTER_ACTOR (stage),
                           BOARDWIDTH * tilesize,
                           BOARDWIDTH * tilesize);
   if (game_running ()) {
     if (board) {
       gnibbles_board_rescale (board, tilesize);
       gnibbles_boni_rescale (boni, tilesize);
-      
+
       for (i=0; i<properties->numworms; i++)
         gnibbles_worm_rescale (worms[i], tilesize);
 
@@ -315,7 +315,7 @@ configure_event_cb (GtkWidget *widget, GdkEventConfigure *event, gpointer data)
 
   properties->tilesize = tilesize;
   gnibbles_properties_set_tile_size (tilesize);
-  
+
   return FALSE;
 }
 
@@ -323,7 +323,7 @@ configure_event_cb (GtkWidget *widget, GdkEventConfigure *event, gpointer data)
 static gboolean
 network_loop (gpointer data)
 {
-  if (ggz_network_mode) { 
+  if (ggz_network_mode) {
     network_move_worms ();
   }
   return TRUE;
@@ -400,7 +400,7 @@ new_game (void)
       clutter_container_add_actor (CLUTTER_CONTAINER (stage), worms[i]->actors);
     gnibbles_worm_show (worms[i]);
   }
-  
+
   paused = 0;
   gtk_action_set_visible (pause_action, !paused);
   gtk_action_set_visible (resume_action, paused);
@@ -541,7 +541,7 @@ restart_game (gpointer data)
 
   gnibbles_board_level_new (board, current_level);
   gnibbles_board_level_add_bonus (board, 1);
- 
+
   for (i = 0; i < properties->numworms; i++) {
     if (!clutter_actor_get_stage (worms[i]->actors))
       clutter_container_add_actor (CLUTTER_CONTAINER (stage), worms[i]->actors);
@@ -553,12 +553,12 @@ restart_game (gpointer data)
 
   dummy_id = g_timeout_add_seconds (1, (GSourceFunc) new_game_2_cb, NULL);
   restart_id = 0;
-  
+
   return FALSE;
 }
 
 static void
-end_game_anim_cb (ClutterAnimation *animation, ClutterActor *actor) 
+end_game_anim_cb (ClutterAnimation *animation, ClutterActor *actor)
 {
   if (!restart_id)
     end_game (TRUE);
@@ -572,7 +572,7 @@ animate_end_game (void)
     clutter_actor_animate (worms[i]->actors, CLUTTER_EASE_IN_QUAD, 500,
                            "opacity", 0,
                            "scale-x", 0.4, "scale-y", 0.4,
-                           "fixed::scale-center-x", 
+                           "fixed::scale-center-x",
                            (gfloat) worms[i]->xhead * properties->tilesize,
                            "fixed::scale-center-y",
                            (gfloat) worms[i]->yhead * properties->tilesize,
@@ -630,7 +630,7 @@ main_loop (gpointer data)
       g_source_remove (main_id);
       main_id = 0;
     }
-    if (add_bonus_id) 
+    if (add_bonus_id)
       g_source_remove (add_bonus_id);
 
     add_bonus_id = 0;
@@ -650,7 +650,7 @@ main_loop (gpointer data)
     main_id = 0;
     if (add_bonus_id)
       g_source_remove (add_bonus_id);
-    
+
     add_bonus_id = 0;
 
     animate_end_game ();
@@ -674,7 +674,7 @@ main_loop (gpointer data)
     }
     if (add_bonus_id)
       g_source_remove (add_bonus_id);
-    
+
     if (main_id) {
       g_source_remove (main_id);
       main_id = 0;
@@ -691,7 +691,7 @@ main_loop (gpointer data)
     if (restart_id)
       return TRUE;
 
-    if (keyboard_id) 
+    if (keyboard_id)
       g_signal_handler_disconnect (G_OBJECT (stage), keyboard_id);
 
     keyboard_id = 0;
@@ -793,9 +793,9 @@ static const char ui_description[] =
   "    </menu>"
   "    <menu action='HelpMenu'>"
   "      <menuitem action='Contents'/>"
-  "      <menuitem action='About'/>" 
-  "    </menu>" 
-  "  </menubar>" 
+  "      <menuitem action='About'/>"
+  "    </menu>"
+  "  </menubar>"
   "</ui>";
 
 static void
@@ -818,13 +818,13 @@ create_menus (GtkUIManager * ui_manager)
   pause_action = gtk_action_group_get_action (action_group, "Pause");
   resume_action = gtk_action_group_get_action (action_group, "Resume");
 
-  preferences_action = gtk_action_group_get_action (action_group, 
+  preferences_action = gtk_action_group_get_action (action_group,
                                                     "Preferences");
-  fullscreen_action = gtk_action_group_get_action (action_group, 
+  fullscreen_action = gtk_action_group_get_action (action_group,
                                                    "Fullscreen");
   leave_fullscreen_action = gtk_action_group_get_action (action_group,
                                                          "LeaveFullscreen");
-  new_network_action = gtk_action_group_get_action (action_group, 
+  new_network_action = gtk_action_group_get_action (action_group,
                                                     "NewNetworkGame");
 #ifndef GGZ_CLIENT
   gtk_action_set_sensitive (new_network_action, FALSE);
@@ -850,20 +850,20 @@ setup_window ()
 
   clutter_stage_set_color (CLUTTER_STAGE(stage), &stage_color);
 
-  clutter_actor_set_size (CLUTTER_ACTOR (stage), 
+  clutter_actor_set_size (CLUTTER_ACTOR (stage),
                           properties->tilesize * BOARDWIDTH,
                           properties->tilesize * BOARDHEIGHT);
   clutter_stage_set_user_resizable (CLUTTER_STAGE (stage), FALSE);
-  
+
   board = gnibbles_board_new ();
 
   gtk_window_set_title (GTK_WINDOW (window), _("Nibbles"));
 
-  gtk_window_set_default_size (GTK_WINDOW (window), 
+  gtk_window_set_default_size (GTK_WINDOW (window),
                                DEFAULT_WIDTH, DEFAULT_HEIGHT);
   games_conf_add_window (GTK_WINDOW (window), KEY_PREFERENCES_GROUP);
 
-  g_signal_connect (G_OBJECT (window), "destroy", 
+  g_signal_connect (G_OBJECT (window), "destroy",
                     G_CALLBACK (gtk_main_quit), NULL);
   g_signal_connect (G_OBJECT (window), "delete_event",
                     G_CALLBACK (delete_cb), NULL);
@@ -921,9 +921,9 @@ setup_window ()
   scoreboard = gnibbles_scoreboard_new (statusbar);
 }
 
-static void 
+static void
 render_logo (void)
-{ 
+{
   ClutterActor *image;
   ClutterActor *text, *text_shadow;
   ClutterActor *desc, *desc_shadow;
@@ -931,24 +931,24 @@ render_logo (void)
   ClutterColor shadow_color = {0x00, 0x00, 0x00, 0x88};
   ClutterActor *text_group;
   static gint width, height;
-  gint size; 
+  gint size;
   gfloat stage_w, stage_h;
   PangoFontDescription *pfd;
   PangoLayout *layout;
   PangoContext *context;
-  
+
   gchar *nibbles = _("Nibbles");
   /* Translators: This string will be included in the intro screen, so don't make sure it fits! */
   gchar *description = _("A worm game for GNOME.");
 
   logo = clutter_group_new ();
   text_group = clutter_group_new ();
- 
+
   if (!logo_pixmap)
     gnibbles_load_logo (properties->tilesize);
 
   image = gtk_clutter_texture_new_from_pixbuf (logo_pixmap);
-  
+
   stage_w = board->width * properties->tilesize;
   stage_h = board->height * properties->tilesize;
 
@@ -959,15 +959,15 @@ render_logo (void)
 
   text = clutter_text_new ();
   clutter_text_set_color (CLUTTER_TEXT (text), &actor_color);
-  
+
   context = gdk_pango_context_get ();
   layout = clutter_text_get_layout (CLUTTER_TEXT (text));
   pfd = pango_context_get_font_description (context);
   size = pango_font_description_get_size (pfd);
-  
+
   pango_font_description_set_size (pfd, (size * stage_w) / 100);
   pango_font_description_set_family (pfd, "Sans");
-  pango_font_description_set_weight(pfd, PANGO_WEIGHT_BOLD); 
+  pango_font_description_set_weight(pfd, PANGO_WEIGHT_BOLD);
   pango_layout_set_font_description (layout, pfd);
   pango_layout_set_text (layout, nibbles, -1);
   pango_layout_get_pixel_size (layout, &width, &height);
@@ -979,8 +979,8 @@ render_logo (void)
   pango_layout_set_font_description (layout, pfd);
   pango_layout_set_text (layout, nibbles, -1);
 
-  clutter_actor_set_position (CLUTTER_ACTOR (text), 
-                              (stage_w - width) * 0.5 , 
+  clutter_actor_set_position (CLUTTER_ACTOR (text),
+                              (stage_w - width) * 0.5 ,
                               stage_h * .72);
   clutter_actor_set_position (CLUTTER_ACTOR (text_shadow),
                               (stage_w - width) * 0.5 + 5,
@@ -988,12 +988,12 @@ render_logo (void)
 
   desc = clutter_text_new ();
   layout = clutter_text_get_layout (CLUTTER_TEXT (desc));
-  
+
   clutter_text_set_color (CLUTTER_TEXT (desc), &actor_color);
   pango_font_description_set_size (pfd, (size * stage_w) / 400);
   pango_layout_set_font_description (layout, pfd);
   pango_layout_set_text (layout, description, -1);
-  pango_layout_get_pixel_size(layout, &width, &height); 
+  pango_layout_get_pixel_size(layout, &width, &height);
 
   desc_shadow = clutter_text_new ();
   layout = clutter_text_get_layout (CLUTTER_TEXT (desc_shadow));
@@ -1003,12 +1003,12 @@ render_logo (void)
   pango_layout_set_font_description (layout, pfd);
   pango_layout_set_text (layout, description, -1);
 
-  clutter_actor_set_position (CLUTTER_ACTOR (desc), 
+  clutter_actor_set_position (CLUTTER_ACTOR (desc),
                               (stage_w - width) * 0.5,
                               stage_h* .93);
   clutter_actor_set_position (CLUTTER_ACTOR (desc_shadow),
                               (stage_w - width) * 0.5 + 3,
-                              stage_h * .93 + 3);  
+                              stage_h * .93 + 3);
 
   clutter_container_add (CLUTTER_CONTAINER (text_group),
                          CLUTTER_ACTOR (text_shadow),
@@ -1020,7 +1020,7 @@ render_logo (void)
                          CLUTTER_ACTOR (image),
                          CLUTTER_ACTOR (text_group),
                          NULL);
- 
+
   clutter_actor_set_opacity (CLUTTER_ACTOR (text_group), 0);
   clutter_actor_set_scale (CLUTTER_ACTOR (text_group), 0.0, 0.0);
   clutter_actor_animate (text_group, CLUTTER_EASE_OUT_CIRC, 800,
@@ -1031,7 +1031,7 @@ render_logo (void)
                           "fixed::scale-center-x", stage_h / 2,
                           NULL);
 
-  clutter_container_add_actor (CLUTTER_CONTAINER (stage), 
+  clutter_container_add_actor (CLUTTER_CONTAINER (stage),
                                CLUTTER_ACTOR (logo));
 }
 
@@ -1071,7 +1071,7 @@ main (int argc, char **argv)
 
 #if GLIB_CHECK_VERSION (2, 12, 0)
   g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
-#endif 
+#endif
 
   g_option_context_add_group (context, gtk_get_option_group (TRUE));
 
diff --git a/gnibbles/main.h b/gnibbles/main.h
index fcc5bd0..9a3f1ef 100644
--- a/gnibbles/main.h
+++ b/gnibbles/main.h
@@ -1,8 +1,8 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *              Guillaume Beland <guillaume beland gmail com>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
diff --git a/gnibbles/preferences.c b/gnibbles/preferences.c
index f1fe7b2..4d367bc 100644
--- a/gnibbles/preferences.c
+++ b/gnibbles/preferences.c
@@ -3,7 +3,7 @@
 /*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
@@ -184,7 +184,7 @@ set_worm_controls_sensitivity (gint i, gboolean value)
 {
   /* FIXME */
 
-  /* This is meant to make the up and down controls 
+  /* This is meant to make the up and down controls
    * unavailable if we are in relative mode. However
    * The new key selection API doesn't support this
    * yet. */
@@ -239,7 +239,7 @@ gnibbles_preferences_cb (GtkWidget * widget, gpointer data)
     running = 1;
 
   pref_dialog = gtk_dialog_new_with_buttons (_("Nibbles Preferences"),
-                                             GTK_WINDOW (window), 0,  
+                                             GTK_WINDOW (window), 0,
                                              GTK_STOCK_CLOSE,
                                              GTK_RESPONSE_CLOSE, NULL);
   gtk_dialog_set_has_separator (GTK_DIALOG (pref_dialog), FALSE);
@@ -445,7 +445,7 @@ gnibbles_preferences_cb (GtkWidget * widget, gpointer data)
                                       left_key, _("Move left"), GDK_Left,
                                       right_key, _("Move right"), GDK_Right,
                                       up_key, _("Move up"), GDK_Up,
-                                      down_key, _("Move down"), GDK_Down, 
+                                      down_key, _("Move down"), GDK_Down,
                                       NULL);
     gtk_container_add (GTK_CONTAINER (frame), controls);
 
diff --git a/gnibbles/preferences.h b/gnibbles/preferences.h
index 87652d4..8afe9e6 100644
--- a/gnibbles/preferences.h
+++ b/gnibbles/preferences.h
@@ -1,7 +1,7 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
diff --git a/gnibbles/properties.c b/gnibbles/properties.c
index 05b8164..81c2b39 100644
--- a/gnibbles/properties.c
+++ b/gnibbles/properties.c
@@ -1,9 +1,9 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
@@ -84,7 +84,7 @@ gnibbles_properties_update (GnibblesProperties * tmp)
   gchar *category;
   gchar *color_name;
 
-  tmp->human = games_conf_get_integer (KEY_PREFERENCES_GROUP, 
+  tmp->human = games_conf_get_integer (KEY_PREFERENCES_GROUP,
                                        KEY_NUM_WORMS, NULL);
   if (tmp->human < 0)
     tmp->human = 0;
@@ -99,20 +99,20 @@ gnibbles_properties_update (GnibblesProperties * tmp)
 
   tmp->numworms = tmp->human + tmp->ai;
 
-  tmp->gamespeed = games_conf_get_integer (KEY_PREFERENCES_GROUP, 
+  tmp->gamespeed = games_conf_get_integer (KEY_PREFERENCES_GROUP,
                                            KEY_SPEED, NULL);
   if (tmp->gamespeed < 1)
     tmp->gamespeed = 2;
   else if (tmp->gamespeed > MAX_SPEED)
     tmp->gamespeed = MAX_SPEED;
 
-  tmp->fakes = games_conf_get_boolean (KEY_PREFERENCES_GROUP, 
+  tmp->fakes = games_conf_get_boolean (KEY_PREFERENCES_GROUP,
                                        KEY_FAKES, NULL);
 
-  tmp->random = games_conf_get_boolean (KEY_PREFERENCES_GROUP, 
+  tmp->random = games_conf_get_boolean (KEY_PREFERENCES_GROUP,
                                         KEY_RANDOM, NULL);
 
-  tmp->startlevel = games_conf_get_integer (KEY_PREFERENCES_GROUP, 
+  tmp->startlevel = games_conf_get_integer (KEY_PREFERENCES_GROUP,
                                             KEY_START_LEVEL, NULL);
   if (tmp->startlevel < 1)
     tmp->startlevel = 1;
@@ -122,7 +122,7 @@ gnibbles_properties_update (GnibblesProperties * tmp)
   tmp->sound = games_conf_get_boolean (KEY_PREFERENCES_GROUP, KEY_SOUND, NULL);
   games_sound_enable (tmp->sound);
 
-  tmp->tilesize = games_conf_get_integer (KEY_PREFERENCES_GROUP, 
+  tmp->tilesize = games_conf_get_integer (KEY_PREFERENCES_GROUP,
                                           KEY_TILE_SIZE, NULL);
   if (tmp->tilesize < 1)
     tmp->tilesize = 5;
@@ -144,27 +144,27 @@ gnibbles_properties_update (GnibblesProperties * tmp)
       tmp->wormprops[i]->color = (i % NUM_COLORS) + WORMRED;
 
     g_snprintf (buffer, sizeof (buffer), KEY_WORM_REL_MOVE, i);
-    tmp->wormprops[i]->relmove = 
+    tmp->wormprops[i]->relmove =
                  games_conf_get_boolean (KEY_PREFERENCES_GROUP,
                                          buffer, NULL);
 
     g_snprintf (buffer, sizeof (buffer), KEY_WORM_UP, i);
-    tmp->wormprops[i]->up = 
+    tmp->wormprops[i]->up =
                  games_conf_get_keyval_with_default (KEY_PREFERENCES_GROUP,
                                                      buffer, GDK_Up);
 
     g_snprintf (buffer, sizeof (buffer), KEY_WORM_DOWN, i);
-    tmp->wormprops[i]->down = 
+    tmp->wormprops[i]->down =
                  games_conf_get_keyval_with_default (KEY_PREFERENCES_GROUP,
                                                      buffer, GDK_Down);
 
     g_snprintf (buffer, sizeof (buffer), KEY_WORM_LEFT, i);
-    tmp->wormprops[i]->left = 
+    tmp->wormprops[i]->left =
                  games_conf_get_keyval_with_default (KEY_PREFERENCES_GROUP,
                                                      buffer, GDK_Left);
 
     g_snprintf (buffer, sizeof (buffer), KEY_WORM_RIGHT, i);
-    tmp->wormprops[i]->right = 
+    tmp->wormprops[i]->right =
                  games_conf_get_keyval_with_default (KEY_PREFERENCES_GROUP,
                                                      buffer, GDK_Right);
   }
@@ -213,7 +213,7 @@ gnibbles_properties_destroy (GnibblesProperties * props)
   for (i = 0; i < NUMWORMS; i++)
     g_slice_free (GnibblesWormProps, props->wormprops[i]);
 
-  g_signal_handler_disconnect (games_conf_get_default (), 
+  g_signal_handler_disconnect (games_conf_get_default (),
                                props->conf_notify_id);
 
   g_slice_free (GnibblesProperties, props);
diff --git a/gnibbles/properties.h b/gnibbles/properties.h
index 9ff698b..7c5275a 100644
--- a/gnibbles/properties.h
+++ b/gnibbles/properties.h
@@ -1,9 +1,9 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
diff --git a/gnibbles/scoreboard.c b/gnibbles/scoreboard.c
index 404aa0e..8eb75c8 100644
--- a/gnibbles/scoreboard.c
+++ b/gnibbles/scoreboard.c
@@ -1,9 +1,9 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
@@ -69,7 +69,7 @@ gnibbles_scoreboard_register (GnibblesScoreboard * scoreboard,
 
   scoreboard->worms[scoreboard->count] = t_worm;
   gtk_widget_set_sensitive (scoreboard->names[scoreboard->count], TRUE);
-  gtk_widget_modify_fg (scoreboard->names[scoreboard->count], GTK_STATE_NORMAL, &color); 
+  gtk_widget_modify_fg (scoreboard->names[scoreboard->count], GTK_STATE_NORMAL, &color);
   gtk_widget_set_sensitive (scoreboard->data[scoreboard->count], TRUE);
   gtk_widget_show (scoreboard->names[scoreboard->count]);
   gtk_widget_show (scoreboard->data[scoreboard->count]);
diff --git a/gnibbles/scoreboard.h b/gnibbles/scoreboard.h
index 1c91a26..914733d 100644
--- a/gnibbles/scoreboard.h
+++ b/gnibbles/scoreboard.h
@@ -1,7 +1,7 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
diff --git a/gnibbles/server.c b/gnibbles/server.c
index f9f05eb..2ee44f4 100644
--- a/gnibbles/server.c
+++ b/gnibbles/server.c
@@ -299,7 +299,7 @@ game_handle_boni (int seat)
       continue;
     if (ggz_write_int (fd, GN_MSG_BONI) < 0 || ggz_write_int (fd, x) < 0
         || ggz_write_int (fd, y) < 0
-        || ggz_write_int (fd, type) < 0 
+        || ggz_write_int (fd, type) < 0
         || ggz_write_int (fd, fake) < 0 || ggz_write_int (fd, countdown) < 0)
       return -1;
   }
diff --git a/gnibbles/warp.c b/gnibbles/warp.c
index a5a258d..75cc14f 100644
--- a/gnibbles/warp.c
+++ b/gnibbles/warp.c
@@ -1,4 +1,4 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *              Guillaume Beland <guillaume beland gmail com>
diff --git a/gnibbles/warp.h b/gnibbles/warp.h
index 804bc34..4edadbf 100644
--- a/gnibbles/warp.h
+++ b/gnibbles/warp.h
@@ -1,7 +1,7 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
diff --git a/gnibbles/warpmanager.c b/gnibbles/warpmanager.c
index 55146cc..5e50e6e 100644
--- a/gnibbles/warpmanager.c
+++ b/gnibbles/warpmanager.c
@@ -1,8 +1,8 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *              Guillaume Beland <guillaume beland gmail com>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
@@ -83,7 +83,7 @@ gnibbles_warpmanager_add_warp (GnibblesWarpManager * warpmanager, gint t_x,
 
     if (warpmanager->numwarps == MAXWARPS)
       return;
-    warpmanager->warps[warpmanager->numwarps] = 
+    warpmanager->warps[warpmanager->numwarps] =
                 gnibbles_warp_new (t_x, t_y, t_wx, t_wy);
     warpmanager->numwarps++;
   } else {
@@ -98,7 +98,7 @@ gnibbles_warpmanager_add_warp (GnibblesWarpManager * warpmanager, gint t_x,
     if (add) {
       if (warpmanager->numwarps == MAXWARPS)
         return;
-      warpmanager->warps[warpmanager->numwarps] = 
+      warpmanager->warps[warpmanager->numwarps] =
                     gnibbles_warp_new (t_x, t_y, t_wx, t_wy);
       draw = warpmanager->numwarps;
       warpmanager->numwarps++;
@@ -128,11 +128,11 @@ gnibbles_warpmanager_worm_change_pos (GnibblesWarpManager * warpmanager,
         worm->yhead == warpmanager->warps[i]->y + 1) ||
         (worm->xhead == warpmanager->warps[i]->x + 1 &&
         worm->yhead == warpmanager->warps[i]->y + 1)) {
-      
+
       if (warpmanager->warps[i]->wx == -1) {
          good = 0;
         while (!good) {
-        // In network games, warps should be fair. 
+        // In network games, warps should be fair.
           if (ggz_network_mode) {
             x = 10 % BOARDWIDTH;
             y = 10 % BOARDHEIGHT;
@@ -180,11 +180,11 @@ gnibbles_warpmanager_worm_change_tail_pos (GnibblesWarpManager * warpmanager,
         worm->ytail == warpmanager->warps[i]->y + 1) ||
         (worm->xtail == warpmanager->warps[i]->x + 1 &&
         worm->ytail == warpmanager->warps[i]->y + 1)) {
-      
+
       if (warpmanager->warps[i]->wx == -1) {
          good = 0;
         while (!good) {
-        // In network games, warps should be fair. 
+        // In network games, warps should be fair.
           if (ggz_network_mode) {
             x = 10 % BOARDWIDTH;
             y = 10 % BOARDHEIGHT;
@@ -217,11 +217,11 @@ gnibbles_warpmanager_worm_change_tail_pos (GnibblesWarpManager * warpmanager,
   }
 }
 
-void 
+void
 gnibbles_warpmanager_rescale (GnibblesWarpManager *warpmanager, gint tilesize)
 {
   int i;
-  gfloat x_pos, y_pos;  
+  gfloat x_pos, y_pos;
   GError *err = NULL;
 
   for (i = 0; i < warpmanager->numwarps; i++) {
@@ -229,7 +229,7 @@ gnibbles_warpmanager_rescale (GnibblesWarpManager *warpmanager, gint tilesize)
     clutter_actor_set_position (warpmanager->warps[i]->actor,
                                 (x_pos / properties->tilesize) * tilesize,
                                 (y_pos / properties->tilesize) * tilesize);
-    gtk_clutter_texture_set_from_pixbuf 
+    gtk_clutter_texture_set_from_pixbuf
       (CLUTTER_TEXTURE (warpmanager->warps[i]->actor), boni_pixmaps[WARP], &err);
     if (err)
       gnibbles_error (err->message);
diff --git a/gnibbles/warpmanager.h b/gnibbles/warpmanager.h
index 54caceb..d056f92 100644
--- a/gnibbles/warpmanager.h
+++ b/gnibbles/warpmanager.h
@@ -1,7 +1,7 @@
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>
- * 
+ *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
  *   the Free Software Foundation; either version 2 of the License, or
@@ -43,7 +43,7 @@ void gnibbles_warpmanager_worm_change_pos (GnibblesWarpManager *warpmanager,
 					                                 GnibblesWorm *worm);
 void gnibbles_warpmanager_worm_change_tail_pos (GnibblesWarpManager *warpmanager,
                                                 GnibblesWorm *worm);
-void gnibbles_warpmanager_rescale (GnibblesWarpManager *warpmanager, 
+void gnibbles_warpmanager_rescale (GnibblesWarpManager *warpmanager,
                                   gint tilesize);
 
 #endif
diff --git a/gnibbles/worm.c b/gnibbles/worm.c
index 88d0137..8010975 100644
--- a/gnibbles/worm.c
+++ b/gnibbles/worm.c
@@ -1,6 +1,6 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *              Guillaume Béland <guillaume beland gmail com>
@@ -166,14 +166,14 @@ static void
 gnibbles_worm_add_actor (GnibblesWorm *worm)
 {
   ClutterActor *actor;
-  
+
   actor = gtk_clutter_texture_new_from_pixbuf (
             worm_pixmaps[properties->wormprops[worm->number]->color - 12]);
   clutter_actor_set_size (actor, properties->tilesize, properties->tilesize);
-  clutter_actor_set_position (actor, 
-                              worm->xhead * properties->tilesize, 
+  clutter_actor_set_position (actor,
+                              worm->xhead * properties->tilesize,
                               worm->yhead * properties->tilesize);
-  
+
   clutter_container_add_actor (CLUTTER_CONTAINER (worm->actors), actor);
   worm->list = g_list_prepend (worm->list, actor);
   board->walls[worm->xhead][worm->yhead] = WORMCHAR + worm->number;
@@ -254,7 +254,7 @@ gnibbles_worm_get_tail_direction (GnibblesWorm *worm)
 
   xdiff = MAX (x2,x1) - MIN (x2,x1);
   ydiff = MAX (y2,y1) - MIN (y2,y1);
-  
+
   if (x2 > x1 && y1 == y2)
     return xdiff > properties->tilesize ? WORMLEFT : WORMRIGHT;
   else if (x2 < x1 && y1 == y2)
@@ -263,7 +263,7 @@ gnibbles_worm_get_tail_direction (GnibblesWorm *worm)
     return ydiff > properties->tilesize ? WORMUP: WORMDOWN;
   else if (y2 < y1 && x1 == x2)
     return ydiff > properties->tilesize ? WORMDOWN : WORMUP;
-  else 
+  else
     return -1;
 }
 
@@ -273,7 +273,7 @@ gnibbles_worm_reverse (gpointer data)
   GnibblesWorm *worm = (GnibblesWorm *) data;
 
   worm->list = g_list_reverse (worm->list);
-  
+
   gint old_dir = gnibbles_worm_get_tail_direction (worm);
 
   gint tmp;
@@ -308,7 +308,7 @@ gnibbles_worm_grok_bonus (GnibblesWorm *worm)
     games_sound_play ("reverse");
     return;
   }
- 
+
   switch (board->walls[worm->xhead][worm->yhead] - 'A') {
     case BONUSREGULAR:
       boni->numleft--;
@@ -324,8 +324,8 @@ gnibbles_worm_grok_bonus (GnibblesWorm *worm)
     case BONUSHALF:
       if (worm->length + worm->change > 2) {
         worm->score += ((worm->length + worm->change) / 2) * current_level;
-        gnibbles_worm_reduce_tail (worm, 
-                                  (g_list_length (worm->list) 
+        gnibbles_worm_reduce_tail (worm,
+                                  (g_list_length (worm->list)
                                   + worm->change) / 2);
         worm->change -= (g_list_length (worm->list) + worm->change) / 2;
         games_sound_play ("bonus");
@@ -372,9 +372,9 @@ gnibbles_worm_handle_bonus (GnibblesWorm *worm)
 
     if ((board->walls[worm->xhead][worm->yhead] == BONUSREGULAR + 'A') &&
         !gnibbles_boni_fake (boni, worm->xhead, worm->yhead)) {
-      
+
       gnibbles_boni_remove_bonus_final (boni, worm->xhead, worm->yhead);
-      
+
       if (boni->numleft != 0)
         gnibbles_board_level_add_bonus (board, 1);
 
@@ -414,10 +414,10 @@ gnibbles_worm_move_head_pointer (GnibblesWorm *worm)
     worm->yhead = BOARDHEIGHT - 1;
   if (worm->xhead >= BOARDWIDTH)
     worm->xhead = 0;
-  if (worm->yhead >= BOARDHEIGHT) 
+  if (worm->yhead >= BOARDHEIGHT)
     worm->yhead = 0;
 
-  gnibbles_worm_handle_bonus (worm);  
+  gnibbles_worm_handle_bonus (worm);
   gnibbles_worm_add_actor (worm);
 }
 
@@ -450,9 +450,9 @@ gnibbles_worm_move_tail_pointer (GnibblesWorm *worm)
     worm->ytail = BOARDHEIGHT - 1;
   if (worm->xtail >= BOARDWIDTH)
     worm->xtail = 0;
-  if (worm->ytail >= BOARDHEIGHT) 
+  if (worm->ytail >= BOARDHEIGHT)
     worm->ytail = 0;
- 
+
   if (board->walls[worm->xtail][worm->ytail] == WARPLETTER) {
     gnibbles_warpmanager_worm_change_tail_pos (warpmanager, worm);
     tail_dir = gnibbles_worm_get_tail_direction (worm);
@@ -477,7 +477,7 @@ gnibbles_worm_move_tail_pointer (GnibblesWorm *worm)
 
 }
 
-static void 
+static void
 gnibbles_worm_animate_death (GnibblesWorm *worm)
 {
   ClutterActor *group = clutter_group_new ();
@@ -494,7 +494,7 @@ gnibbles_worm_animate_death (GnibblesWorm *worm)
                                 &x, &y);
 
     clutter_actor_set_position (CLUTTER_ACTOR (tmp), x, y);
-    clutter_actor_set_size (CLUTTER_ACTOR (tmp), 
+    clutter_actor_set_size (CLUTTER_ACTOR (tmp),
                             properties->tilesize,
                             properties->tilesize);
     clutter_container_add_actor (CLUTTER_CONTAINER (group), tmp);
@@ -516,7 +516,7 @@ gnibbles_worm_animate_death (GnibblesWorm *worm)
                          "opacity", 0,
                          "scale-x", 2.0,
                          "scale-y", 2.0,
-                         "fixed::scale-center-x", 
+                         "fixed::scale-center-x",
                          (gfloat) worm->xhead * properties->tilesize,
                          "fixed::scale-center-y",
                          (gfloat) worm->yhead * properties->tilesize,
@@ -527,7 +527,7 @@ GnibblesWorm*
 gnibbles_worm_new (guint number)
 {
   GnibblesWorm *worm = g_new (GnibblesWorm, 1);
- 
+
   worm->actors = clutter_group_new ();
   worm->list = NULL;
   worm->number = number;
@@ -540,7 +540,7 @@ gnibbles_worm_new (guint number)
 
 void
 gnibbles_worm_set_start (GnibblesWorm *worm, guint t_xhead,
-                         guint t_yhead, gint t_direction) 
+                         guint t_yhead, gint t_direction)
 {
   int i;
   worm->length = g_list_length (worm->list);
@@ -637,7 +637,7 @@ gnibbles_worm_destroy (GnibblesWorm *worm)
   g_free (worm);
 }
 
-void 
+void
 gnibbles_worm_rescale (GnibblesWorm *worm, gint tilesize)
 {
   if (!worm)
@@ -647,7 +647,7 @@ gnibbles_worm_rescale (GnibblesWorm *worm, gint tilesize)
 
   int i;
   gfloat x_pos, y_pos;
-  gint count;    
+  gint count;
   ClutterActor *tmp;
   GError *err = NULL;
 
@@ -662,7 +662,7 @@ gnibbles_worm_rescale (GnibblesWorm *worm, gint tilesize)
                                 (y_pos / properties->tilesize) * tilesize);
 
     gtk_clutter_texture_set_from_pixbuf (
-       CLUTTER_TEXTURE (tmp), 
+       CLUTTER_TEXTURE (tmp),
        worm_pixmaps[properties->wormprops[worm->number]->color - 12],
        &err);
     if (err)
@@ -679,7 +679,7 @@ gnibbles_worm_move_head (GnibblesWorm *worm)
 
   if (worm->human)
     worm->keypress = 0;
-  
+
   gnibbles_worm_move_head_pointer (worm);
 
   if (key_queue[worm->number] && !g_queue_is_empty (key_queue[worm->number])) {
@@ -701,7 +701,7 @@ gnibbles_worm_move_tail (GnibblesWorm *worm)
   }
 }
 
-void 
+void
 gnibbles_worm_reduce_tail (GnibblesWorm *worm, gint erasesize)
 {
   gint i;
@@ -718,7 +718,7 @@ gnibbles_worm_reduce_tail (GnibblesWorm *worm, gint erasesize)
     for (i = 0; i < erasesize; i++) {
       tmp = gtk_clutter_texture_new_from_pixbuf (
               worm_pixmaps[properties->wormprops[worm->number]->color - 12]);
-      clutter_actor_get_position 
+      clutter_actor_get_position
         (CLUTTER_ACTOR (g_list_last (worm->list)->data), &x, &y);
       clutter_actor_set_position (CLUTTER_ACTOR (tmp), x, y);
       clutter_actor_set_size (CLUTTER_ACTOR (tmp),
@@ -778,13 +778,13 @@ gnibbles_worm_position_move_head (GnibblesWorm * worm, gint *x, gint *y)
       break;
   }
 
-  if (*x == BOARDWIDTH) 
+  if (*x == BOARDWIDTH)
     *x = 0;
-  if (*x < 0) 
+  if (*x < 0)
     *x = BOARDWIDTH - 1;
-  if (*y == BOARDHEIGHT) 
+  if (*y == BOARDHEIGHT)
     *y = 0;
-  if (*y < 0) 
+  if (*y < 0)
     *y = BOARDHEIGHT - 1;
 }
 
@@ -795,7 +795,7 @@ gnibbles_worm_test_move_head (GnibblesWorm * worm)
 
   gnibbles_worm_position_move_head(worm, &x, &y);
 
-  if (board->walls[x][y] > EMPTYCHAR 
+  if (board->walls[x][y] > EMPTYCHAR
       && board->walls[x][y] < 'z' + properties->numworms)
     return FALSE;
 
@@ -882,7 +882,7 @@ gnibbles_worm_ai_deadend (gint x, gint y, gint lengthleft)
     if ((board->walls[cx][cy] <= EMPTYCHAR
         || board->walls[x][y] >= 'z' + properties->numworms)
         && deadendboard[cx][cy] != deadend_runnumber) {
-       
+
       deadendboard[cx][cy] = deadend_runnumber;
       lengthleft = gnibbles_worm_ai_deadend(cx, cy, lengthleft - 1);
       if (!lengthleft)
@@ -921,13 +921,13 @@ gnibbles_worm_ai_deadend_after (gint x, gint y, gint dir, gint length)
     cx = worms[i]->xhead;
     cy = worms[i]->yhead;
     if(cx != x || cy != y) {
-      if(cx > 0) 
+      if(cx > 0)
         deadendboard[cx-1][cy] = deadend_runnumber;
-      if(cy > 0) 
+      if(cy > 0)
         deadendboard[cx][cy-1] = deadend_runnumber;
-      if(cx < BOARDWIDTH-1) 
+      if(cx < BOARDWIDTH-1)
         deadendboard[cx+1][cy] = deadend_runnumber;
-      if(cy < BOARDHEIGHT-1) 
+      if(cy < BOARDHEIGHT-1)
         deadendboard[cx][cy+1] = deadend_runnumber;
     }
   }
@@ -975,7 +975,7 @@ gnibbles_worm_ai_tooclose (GnibblesWorm * worm)
 {
   gint i = properties->numworms;
   gint dx, dy;
-  
+
   while (i--) {
     dx = worm->xhead - worms[i]->xhead;
     dy = worm->yhead - worms[i]->yhead;
@@ -1044,8 +1044,8 @@ gnibbles_worm_ai_wander (gint x, gint y, gint dir, gint ox, gint oy)
     case BONUSHALF:
       return 0;
       break;
-    default: 
-      if (board->walls[x][y] > EMPTYCHAR 
+    default:
+      if (board->walls[x][y] > EMPTYCHAR
           && board->walls[x][y] < 'z' + properties->numworms) {
         return 0;
       } else {
@@ -1068,11 +1068,11 @@ gnibbles_worm_ai_move (GnibblesWorm * worm)
 
   front = gnibbles_worm_ai_wander (worm->xhead, worm->yhead,
                                    worm->direction, worm->xhead, worm->yhead);
-  left = gnibbles_worm_ai_wander (worm->xhead, worm->yhead, 
-                                  worm->direction - 1, 
+  left = gnibbles_worm_ai_wander (worm->xhead, worm->yhead,
+                                  worm->direction - 1,
                                   worm->xhead, worm->yhead);
-  right = gnibbles_worm_ai_wander (worm->xhead, worm->yhead, 
-                                   worm->direction + 1, 
+  right = gnibbles_worm_ai_wander (worm->xhead, worm->yhead,
+                                   worm->direction + 1,
                                    worm->xhead, worm->yhead);
 
   if (!front) {
@@ -1098,7 +1098,7 @@ gnibbles_worm_ai_move (GnibblesWorm * worm)
           if (dir < 1)
             dir = 4;
           worm->direction = dir;
-          
+
         }
       }
     }
@@ -1121,7 +1121,7 @@ gnibbles_worm_ai_move (GnibblesWorm * worm)
   for (dir = 1; dir <= 4; dir++) {
     worm->direction = dir;
 
-    if (dir == opposite) 
+    if (dir == opposite)
       continue;
     thislen = 0;
 
@@ -1159,7 +1159,7 @@ gnibbles_worm_ai_move (GnibblesWorm * worm)
   /* Make sure we are at least avoiding walls.
    * Mostly other snakes should avoid our head. */
   for (dir = 1; dir <= 4; dir++) {
-    if (dir == opposite) 
+    if (dir == opposite)
       continue;
     if (!gnibbles_worm_test_move_head (worm))
       worm->direction = dir;
diff --git a/gnibbles/worm.h b/gnibbles/worm.h
index f847e63..ca429cc 100644
--- a/gnibbles/worm.h
+++ b/gnibbles/worm.h
@@ -1,6 +1,6 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
-/* 
+/*
  *   Gnome Nibbles: Gnome Worm Game
  *   Written by Sean MacIsaac <sjm acm org>, Ian Peters <itp gnu org>,
  *              Guillaume Béland <guillaume beland gmail com>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]