[gnome-games] Fixed bonus, worms now recognize which type of bonus they eat



commit b4b6bb577e6a11bfd50954a88bc452000caf8ed3
Author: Guillaume Beland <guillaume beland gmail com>
Date:   Tue Aug 11 14:37:50 2009 -0400

    Fixed bonus, worms now recognize which type of bonus they eat

 gnibbles/boni.c         |   16 ++++++++--------
 gnibbles/worm-clutter.c |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gnibbles/boni.c b/gnibbles/boni.c
index c571429..c46f167 100644
--- a/gnibbles/boni.c
+++ b/gnibbles/boni.c
@@ -75,10 +75,10 @@ gnibbles_boni_add_bonus (GnibblesBoni * boni, gint t_x, gint t_y,
   boni->bonuses[boni->numbonuses] = gnibbles_bonus_new (t_x, t_y,
 							                                          t_type, t_fake,
 							                                          t_countdown);
-  board->walls[t_x][t_y] = t_type = 'A';
-  board->walls[t_x + 1][t_y] = t_type + 'A';
-  board->walls[t_x][t_y + 1] = t_type + 'A';
-  board->walls[t_x + 1][t_y + 1] = t_type + 'A';
+  board->walls[t_x][t_y] = (gchar) t_type + 'A';
+  board->walls[t_x + 1][t_y] = (gchar) t_type + 'A';
+  board->walls[t_x][t_y + 1] = (gchar) t_type + 'A';
+  board->walls[t_x + 1][t_y + 1] = (gchar) t_type + 'A';
 
   gnibbles_bonus_draw (boni->bonuses[boni->numbonuses]);
   
@@ -101,10 +101,10 @@ gnibbles_boni_add_bonus_final (GnibblesBoni * boni, gint t_x, gint t_y,
   boni->bonuses[boni->numbonuses] = gnibbles_bonus_new (t_x, t_y, 
                                                         t_type, t_fake, 
                                                         t_countdown);
-  board->walls[t_x][t_y] = t_type + 'A';
-  board->walls[t_x + 1][t_y] = t_type + 'A';
-  board->walls[t_x][t_y + 1] = t_type + 'A';
-  board->walls[t_x + 1][t_y + 1] = t_type + 'A';
+  board->walls[t_x][t_y] = (gchar) t_type + 'A';
+  board->walls[t_x + 1][t_y] = (gchar) t_type + 'A';
+  board->walls[t_x][t_y + 1] = (gchar) t_type + 'A';
+  board->walls[t_x + 1][t_y + 1] = (gchar) t_type + 'A';
 
   gnibbles_bonus_draw (boni->bonuses[boni->numbonuses]);
   boni->numbonuses++;
diff --git a/gnibbles/worm-clutter.c b/gnibbles/worm-clutter.c
index 3df553a..4bd1933 100644
--- a/gnibbles/worm-clutter.c
+++ b/gnibbles/worm-clutter.c
@@ -301,7 +301,7 @@ gnibbles_worm_grok_bonus (GnibblesWorm *worm)
     games_sound_play ("reverse");
     return;
   }
-  
+ 
   switch (board->walls[worm->xhead][worm->yhead] - 'A') {
     case BONUSREGULAR:
       boni->numleft--;



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