[gcompris-devel] Re: `Divide by zero' bug...

Bruno Coudoin bcoudoin at anfora.fr
Mon Oct 15 01:06:01 UTC 2001


Herman,
The difference here is in the use of sublevel.
If you look a clickgame (the fishes), each time you click on a fish, a
sublevel is incremented and it is displayed in the status scale bar.
After 10 sublevel, I go to the next level (and the dice in the control
bar moves on).
But some boards like the paratrooper do not need to use sublevel.
That is the difference you see here.

Hope this clarify.
Bruno.

le mer 10-10-2001 at 22:54 Herman Bruyninckx a écrit :
> Bruno,
> 
> I've been looking a bit through the code again...
> 
> And I have the following question: each board has a `start_board'
> function, but there is quite some difference in what exactly is
> included in that function. Of course, there are the board-specific
> things, but also in the level functions there is a difference for which I don't understand the reason. For example, clockgame.c has
> 
>       gcomprisBoard->level=1;
>       gcomprisBoard->maxlevel=6;
>       gcomprisBoard->sublevel=0;
>       gcomprisBoard->number_of_sublevel=3;
>       gcompris_bar_set_maxtimer(gcomprisBoard->number_of_sublevel);
>       gcompris_bar_set(GCOMPRIS_BAR_LEVEL|GCOMPRIS_BAR_OK);
>       gcompris_bar_set_timer(0);
> 
>       clockgame_next_level();
> 
> while paratrooper.c has
> 
>       gcomprisBoard->level = 1;
>       gcomprisBoard->maxlevel = 6;
>       gcompris_bar_set(GCOMPRIS_BAR_LEVEL|GCOMPRIS_BAR_HELP);
>       paratrooper_next_level();
> 
> Also in the XXX_next_level there are differences in the placing of the
> same functions, which is quite confusing... Is there a reason for
> this?
> 
> Since some of these calls involve calls to the timer function, they
> could have influence on the divide by zero bug...
> 
> What exactly is the meaning of timer and maxtimer?
> 
> Herman
-- 
Bruno Coudoin
ANFORA - http://www.anfora.fr
Tel: (33)5 61 00 34 67





More information about the Gcompris-devel mailing list