[gnome-games] More work on reducing CPU usage
- From: Jason Clinton <jclinton src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games] More work on reducing CPU usage
- Date: Wed, 14 Oct 2009 02:56:42 +0000 (UTC)
commit 331ffdffd07472668a695ff1ad1b9408edf94c28
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]