gcompris r3578 - in trunk: . boards/skins/babytoy src/boards



Author: bcoudoin
Date: Sat Oct 25 19:15:32 2008
New Revision: 3578
URL: http://svn.gnome.org/viewvc/gcompris?rev=3578&view=rev

Log:
	* boards/skins/babytoy/skin.xml: selected a better text color in
	  clockgame text
	* src/boards/smallnumbers.c: (key_press), (player_win):fixed a major crash case
	  The crash happend when there are 2 or more dice at the sublevel 9. The first
	  die complete the game and the next die is processed but already deleted.



Modified:
   trunk/ChangeLog
   trunk/boards/skins/babytoy/skin.xml
   trunk/src/boards/smallnumbers.c

Modified: trunk/boards/skins/babytoy/skin.xml
==============================================================================
--- trunk/boards/skins/babytoy/skin.xml	(original)
+++ trunk/boards/skins/babytoy/skin.xml	Sat Oct 25 19:15:32 2008
@@ -39,14 +39,14 @@
     <font id="gcompris/board/title bold" name="Sans bold 20"/>
     <font id="gcompris/board/huge"       name="Sans 28"/>
     <font id="gcompris/board/huge bold"  name="Sans bold 28"/>
-    
+
     <color id="menu/text"             rgba="0xFFFFFFFF"/>
     <color id="menu/text_shadow"      rgba="0x000000FF"/>
 
     <!-- Here you may define some other properties that will -->
     <!-- affect a particular game. -->
     <!-- For example, in futur, the colors of the canal lock game will be -->
-    <!-- customisable with some lines like: --> 
+    <!-- customisable with some lines like: -->
     <!-- <color id="canal_lock/canal color"        rgba="0x0010FFFF"/>-->
     <!-- <color id="canal_lock/lock color"         rgba="0x8cc679FF"/>-->
     <!-- <color id="canal_lock/lock color h"       rgba="0x71A65FFF"/>-->
@@ -64,7 +64,7 @@
     <color id="erase/rectangle in3"   rgba="0xf49a9a66"/>
     <color id="erase/rectangle out3"  rgba="0XFFFFFFFF"/>
     <color id="maze/wall color"       rgba="0x0000FFFF"/>
-    <color id="clockgame/text"        rgba="0xFFFFFFFF"/>
+    <color id="clockgame/text"        rgba="0Xc20200FF"/>
   </Skin>
 </GCompris>
 

Modified: trunk/src/boards/smallnumbers.c
==============================================================================
--- trunk/src/boards/smallnumbers.c	(original)
+++ trunk/src/boards/smallnumbers.c	Sat Oct 25 19:15:32 2008
@@ -248,6 +248,24 @@
 		 (GFunc) smallnumbers_gotkey_item,
 		 GINT_TO_POINTER(keyval));
 
+  if(gcomprisBoard->sublevel>gcomprisBoard->number_of_sublevel)
+    {
+      /* Try the next level */
+      gcomprisBoard->level++;
+      if(gcomprisBoard->level>gcomprisBoard->maxlevel) { // the current board is finished : bail out
+	gc_score_end();
+	gc_bonus_end_display(GC_BOARD_FINISHED_RANDOM);
+	return TRUE;
+      }
+      gamewon = TRUE;
+      smallnumbers_destroy_all_items();
+      gc_bonus_display(gamewon, GC_BONUS_SMILEY);
+    }
+  else
+    {
+      gc_score_set(gcomprisBoard->sublevel);
+    }
+
   return TRUE;
 }
 
@@ -481,23 +499,6 @@
   gcomprisBoard->sublevel++;
   gc_score_set(gcomprisBoard->sublevel);
 
-  if(gcomprisBoard->sublevel>gcomprisBoard->number_of_sublevel)
-    {
-      /* Try the next level */
-      gcomprisBoard->level++;
-      if(gcomprisBoard->level>gcomprisBoard->maxlevel) { // the current board is finished : bail out
-	gc_score_end();
-	gc_bonus_end_display(GC_BOARD_FINISHED_RANDOM);
-	return;
-      }
-      gamewon = TRUE;
-      smallnumbers_destroy_all_items();
-      gc_bonus_display(gamewon, GC_BONUS_SMILEY);
-    }
-  else
-    {
-      gc_score_set(gcomprisBoard->sublevel);
-    }
 }
 
 static void player_loose()



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