Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Georges <pgeorges@src.gnome.org>2002-02-12 21:47:14 (GMT)
committer Pascal Georges <pgeorges@src.gnome.org>2002-02-12 21:47:14 (GMT)
commitb78ba157dfbafb78a060b17bd67eceb1e98db296 (patch)
tree1b7b6a328d2944d0842e1623a5aa6d5bbd09fcf1
parentdb93d20a9d80bffe4155535bb48aca1465cc407a (diff)
*** empty log message ***
-rw-r--r--ChangeLog3
-rw-r--r--TESTS4
-rw-r--r--src/boards/shapegame.c22
3 files changed, 15 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 17e77b4..4435024 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2002-02-12 Pascal Georges <pascal.georges1@free.fr>
+ * src/boards/babyshape.c : level starts now at 1, and ends at 4 (coherent to the 4 xml files for this level)
+
2002-02-11 Bruno Coudoin <bruno.coudoin@free.fr>
* src/boards/imageid/board1.xml.in: created .in files to implement i18n
diff --git a/TESTS b/TESTS
index f7813e9..0ae3fd2 100644
--- a/TESTS
+++ b/TESTS
@@ -26,9 +26,7 @@ babymatch
Bruno: tested
----------------------------------------------
babyshapes
- - Tested (minor bug : First level starts at 2, and when clicking on the
- level dice, jumps from 4 to 6 directly, and consider the game is
- finished (it should go back to 1 instead)) (pascal georges)
+ - Tested (pascal georges)
----------------------------------------------
clickgame
diff --git a/src/boards/shapegame.c b/src/boards/shapegame.c
index 9e34845..ea0321d 100644
--- a/src/boards/shapegame.c
+++ b/src/boards/shapegame.c
@@ -180,8 +180,8 @@ static void start_board (GcomprisBoard *agcomprisBoard)
gcompris_set_background(gnome_canvas_root(gcomprisBoard->canvas), "gcompris/gcompris-shapebg.jpg");
/* set initial values for this level */
- gcomprisBoard->level = 1;
- gcomprisBoard->maxlevel=6;
+ gcomprisBoard->level = 0;
+ gcomprisBoard->maxlevel=4;
gcompris_bar_set(GCOMPRIS_BAR_LEVEL|GCOMPRIS_BAR_OK);
gcomprisBoard->number_of_sublevel=6;
@@ -249,7 +249,7 @@ is_our_board (GcomprisBoard *gcomprisBoard)
static gboolean increment_sublevel()
{
gcomprisBoard->sublevel++;
-
+
if(gcomprisBoard->sublevel>gcomprisBoard->number_of_sublevel) {
/* Try the next level */
gcomprisBoard->level++;
@@ -257,7 +257,7 @@ static gboolean increment_sublevel()
board_finished(BOARD_FINISHED_RANDOM);
return FALSE;
}
-
+
gcomprisBoard->sublevel=0;
}
@@ -266,7 +266,7 @@ static gboolean increment_sublevel()
}
/* set initial values for the next level */
-static void shapegame_next_level()
+static void shapegame_next_level()
{
char *filename;
@@ -276,8 +276,8 @@ static void shapegame_next_level()
shapegame_init_canvas(gnome_canvas_root(gcomprisBoard->canvas));
- filename = g_strdup_printf("%s/%s/board%d_%d.xml",
- PACKAGE_DATA_DIR, gcomprisBoard->boarddir,
+ filename = g_strdup_printf("%s/%s/board%d_%d.xml",
+ PACKAGE_DATA_DIR, gcomprisBoard->boarddir,
gcomprisBoard->level, gcomprisBoard->sublevel);
printf("1 gcomprisBoard->level %d filename=%s\n", gcomprisBoard->level, filename);
@@ -290,15 +290,15 @@ static void shapegame_next_level()
gcomprisBoard->sublevel=gcomprisBoard->number_of_sublevel;
if(!increment_sublevel())
return;
-
+
g_free(filename);
- filename = g_strdup_printf("%s/%s/board%d_%d.xml",
- PACKAGE_DATA_DIR, gcomprisBoard->boarddir,
+ filename = g_strdup_printf("%s/%s/board%d_%d.xml",
+ PACKAGE_DATA_DIR, gcomprisBoard->boarddir,
gcomprisBoard->level, gcomprisBoard->sublevel);
printf("3 gcomprisBoard->level %d filename=%s\n", gcomprisBoard->level, filename);
}
read_xml_file(filename);
-
+
g_free(filename);
}