[gnome-games/gnibbles-clutter-rebased: 125/129] More work on reducing CPU usage



commit c54bdbc70fee17da3803aeb14fcabe7580b15838
Author: Guillaume Beland <guillaume beland gmail com>
Date:   Wed Sep 23 17:39:55 2009 -0400

    More work on reducing CPU usage

 gnibbles/worm.c |   17 +----------------
 1 files changed, 1 insertions(+), 16 deletions(-)
---
diff --git a/gnibbles/worm.c b/gnibbles/worm.c
index b219863..1de6ff2 100644
--- a/gnibbles/worm.c
+++ b/gnibbles/worm.c
@@ -163,20 +163,6 @@ gnibbles_worm_get_tail_actor (GnibblesWorm *worm)
 }
 
 static void
-gnibbles_worm_move_actor (GnibblesWorm *worm)
-{
-  ClutterActor *tmp;
-  tmp = gnibbles_worm_get_tail_actor (worm);
-  clutter_actor_set_position (tmp,
-                             worm->xhead * properties->tilesize,
-                             worm->yhead * properties->tilesize);
-  worm->list = g_list_prepend (worm->list, tmp);
-  worm->list = g_list_delete_link (worm->list, g_list_last (worm->list));
-  board->walls[worm->xtail][worm->ytail] = EMPTYCHAR;
-  board->walls[worm->xhead][worm->yhead] = WORMCHAR + worm->number;
-}
-
-static void
 gnibbles_worm_add_actor (GnibblesWorm *worm)
 {
   ClutterActor *actor;
@@ -431,9 +417,8 @@ gnibbles_worm_move_head_pointer (GnibblesWorm *worm)
   if (worm->yhead >= BOARDHEIGHT) 
     worm->yhead = 0;
 
-  gnibbles_worm_handle_bonus (worm);
+  gnibbles_worm_handle_bonus (worm);  
   gnibbles_worm_add_actor (worm);
-  //gnibbles_worm_move_actor (worm);
 }
 
 static void



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