Commit 1247ad3c authored by Bruno Coudoin's avatar Bruno Coudoin

some changes in algebra and shapegame

parent 1d3040bc
2001-11-29 Bruno Coudoin <bruno.coudoin@free.fr>
* Makefile.am: added remove of xml-i18n generated files
* src/boards/shapegame.c: fixed the last board file loading. now the boards loops.
* src/boards/algebra.c: fixed minus rules to match + and * rules
2001-11-25 Bruno Coudoin <bruno.coudoin@free.fr>
* boards/scales/*.png: Complete redraw by Renaud Blanchard
* src/gcompris/bar.c: shifted all buttons on the left to free the home
......
......@@ -39,3 +39,5 @@ dist-hook:
fi
clean-local:
rm -f xml-i18n-extract xml-i18n-merge xml-i18n-update
......@@ -458,7 +458,7 @@ mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am clean-local
clean: clean-recursive
......@@ -509,6 +509,9 @@ dist-hook:
cd @PACKAGE_DATA_DIR@ ; tar cf - --exclude CVS --exclude .xvpics * | ( cd ../$(distdir)/@PACKAGE_DATA_DIR@ ; tar xf -) ; cd .. ; \
fi
clean-local:
rm -f xml-i18n-extract xml-i18n-merge xml-i18n-update
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
/* gcompris - algebra.c
*
* Time-stamp: <2001/11/06 22:23:00 bruno>
* Time-stamp: <2001/11/29 03:56:31 bruno>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -822,38 +822,8 @@ static void get_random_number(guint *first_operand, guint *second_operand)
*second_operand = get_operand();
break;
case MINUSSIGNFILE:
switch(gcomprisBoard->level)
{
case 1 :
min = 0;
max = 2;
break;
case 2 :
min = 2;
max = 3;
break;
case 3 :
min = 4;
max = 5;
break;
case 4 :
min = 6;
max = 7;
break;
case 5 :
min = 8;
max = 9;
break;
case 6 :
min = 1;
max = 10;
break;
default :
min = 1;
max = 10;
}
*second_operand = (min+rand()%(max-min+1));
*first_operand = *second_operand+rand()%(20-*second_operand);
*first_operand = gcomprisBoard->level+9;
*second_operand = get_operand();
break;
case DIVIDESIGNFILE:
switch(gcomprisBoard->level)
......
/* gcompris - shapegame.c
*
* Time-stamp: <2001/11/06 22:20:54 bruno>
* Time-stamp: <2001/11/29 03:34:04 bruno>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -245,7 +245,7 @@ static void increment_sublevel()
/* Try the next level */
gcomprisBoard->level++;
if(gcomprisBoard->level>gcomprisBoard->maxlevel)
gcomprisBoard->level=gcomprisBoard->maxlevel;
gcomprisBoard->level=1;
gcomprisBoard->sublevel=0;
}
......@@ -269,19 +269,20 @@ static void shapegame_next_level()
PACKAGE_DATA_DIR, gcomprisBoard->boarddir,
gcomprisBoard->level, gcomprisBoard->sublevel);
if(!g_file_exists(filename))
while(!g_file_exists(filename)
&& (gcomprisBoard->level != 1) || (gcomprisBoard->sublevel!=0))
{
/* Try the next level */
gcomprisBoard->sublevel=gcomprisBoard->number_of_sublevel;
increment_sublevel();
g_free(filename);
filename = g_strdup_printf("%s/%s/board%d_%d.xml",
PACKAGE_DATA_DIR, gcomprisBoard->boarddir,
gcomprisBoard->level, gcomprisBoard->sublevel);
}
read_xml_file(filename);
g_free(filename);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment