Commit 8db3d70f authored by Bruno Coudoin's avatar Bruno Coudoin

*** RELEASE 8.2BETA1 ***


        - fixed all boards/Makefile.am, the transformation for i18n was not good enough
          and was breaking the game missing_letter.
        - added support for py2exe on windows which allow us to create an embedded package
          with python, pygtk and pycairo all together
        - cleanup in boards/* to replace assert by g_assert and remove uneeded includes.
        - fixed awele to run on windows replace font "12x24" by "sans 12"
parent 8925dc92
......@@ -20,7 +20,7 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
CLEANFILES = $(xml_DATA)
......@@ -18,7 +18,7 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
......
......@@ -18,7 +18,7 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
......
......@@ -24,7 +24,7 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
......
......@@ -14,7 +14,7 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
......
......@@ -26,7 +26,7 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
......
......@@ -12,6 +12,6 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
CLEANFILES = $(xml_DATA)
......@@ -17,7 +17,7 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
......
......@@ -12,7 +12,7 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
CLEANFILES = $(xml_DATA)
......@@ -18,7 +18,7 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
......
......@@ -11,6 +11,6 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
CLEANFILES = $(xml_DATA)
......@@ -29,7 +29,7 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(\<\)\/*_//g" $< > $@
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
CLEANFILES = $(xml_DATA)
......@@ -17,8 +17,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <ctype.h>
#include <assert.h>
#include <string.h>
/* libxml includes */
......@@ -429,7 +427,7 @@ static void update_clock() {
static void highlight_selected(int c) {
int x, y;
assert(c>=0 && c<8);
g_assert(c>=0 && c<8);
x = (X[c*2] + X[c*2+1]) /2;
y = (Y[(int)(c/4)*2] + Y[(int)(c/4)*2+1]) /2;
......@@ -451,7 +449,7 @@ static void init_xml()
gcomprisBoard->boarddir,
gcomprisBoard->level);
assert(read_xml_file(filename)== TRUE);
g_assert(read_xml_file(filename)== TRUE);
g_free(filename);
}
......
......@@ -17,14 +17,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <ctype.h>
#include <math.h>
#include <assert.h>
#include "gcompris/gcompris.h"
#define SOUNDLISTFILE PACKAGE
static GcomprisBoard *gcomprisBoard = NULL;
static gboolean board_paused = TRUE;
......@@ -67,7 +61,10 @@ static void destroy_board(void);
#define HORIZONTAL_SEPARATION 20
#define VERTICAL_SEPARATION 20
static char* background_images[] = {"gcompris/animals/tiger1_by_Ralf_Schmode","gcompris/animals/tigerdrink001.jpg","gcompris/animals/tigercub003.jpg", "gcompris/animals/tigerplay001.jpg"};
static char* background_images[] = {"gcompris/animals/tiger1_by_Ralf_Schmode",
"gcompris/animals/tigerdrink001.jpg",
"gcompris/animals/tigercub003.jpg",
"gcompris/animals/tigerplay001.jpg"};
static const char oper_values[] = {'+', '-', 'x', ':', '='};
static const char *oper_images[] = {"plus", "minus", "by", "div", "equal"};
static const int num_values[] = {1,2,3,4,5,6,7,8,9,10,25,50,100};
......@@ -285,11 +282,11 @@ static int token_result() {
if (token_count < 2)
return NO_RESULT;
assert(ptr_token_selected[0]->isNumber);
g_assert(ptr_token_selected[0]->isNumber);
result = num_values[ptr_token_selected[0]->num];
for (i=2; i<token_count; i+=2) {
assert(!ptr_token_selected[i-1]->isNumber);
g_assert(!ptr_token_selected[i-1]->isNumber);
switch (ptr_token_selected[i-1]->oper) {
case '+' : result += num_values[ptr_token_selected[i]->num];
break;
......@@ -354,7 +351,7 @@ static int generate_numbers() {
r = 2 + minus + divide;
switch (RAND(1,r)) {
case 1 :
case 1 :
answer_oper[i] = '+';
result += num_values[answer_num_index[i+1]];
break;
......@@ -372,21 +369,21 @@ static int generate_numbers() {
if (minus) {
answer_oper[i] = '-';
result -= num_values[answer_num_index[i+1]];
assert(result >= 0);
g_assert(result >= 0);
} else {
answer_oper[i] = ':';
assert(result%num_values[answer_num_index[i+1]] == 0);
g_assert(result%num_values[answer_num_index[i+1]] == 0);
result /= num_values[answer_num_index[i+1]];
}
break;
case 4 :
case 4 :
if ( RAND(0,1) == 0) {
answer_oper[i] = '-';
result -= num_values[answer_num_index[i+1]];
assert(result >= 0);
g_assert(result >= 0);
} else {
answer_oper[i] = ':';
assert(result%num_values[answer_num_index[i+1]] == 0);
g_assert(result%num_values[answer_num_index[i+1]] == 0);
result /= num_values[answer_num_index[i+1]];
}
break;
......@@ -567,7 +564,7 @@ static void process_time(){
static int oper_char_to_pixmap_index(char oper) {
int i;
assert(oper == '+' || oper == '-' || oper == 'x' || oper == ':' || oper == '=');
g_assert(oper == '+' || oper == '-' || oper == 'x' || oper == ':' || oper == '=');
for (i=0; i<5; i++)
if (oper_values[i] == oper)
......@@ -661,7 +658,7 @@ static gint item_event_num(GnomeCanvasItem *item, GdkEvent *event, gpointer data
// update result text items
if (token_count != 1 && token_count % 2 == 1) {
sprintf(str,"%d",token_result());
gnome_canvas_item_set(calcul_line_item[token_count-3], "text", str, NULL);
gnome_canvas_item_set(calcul_line_item_back[token_count-3], "text", str, NULL);
......
/*
* gcompris - awele.c Copyright (C) 2005 Frederic Mazzarol This program is
* free software; you can redistribute it and/or modify it under the terms
* free software; you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any
* later version. This program is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. You should have received a
* copy of the GNU General Public License along with this program; if not,
* copy of the GNU General Public License along with this program; if not,
* write to the Free Software Foundation, Inc., 59 Temple Place, Suite
* 330, Boston, MA 02111-1307 USA
* 330, Boston, MA 02111-1307 USA
*/
#include "gcompris/gcompris.h"
......@@ -52,7 +52,7 @@ static GcomprisAnimation *animation;
static GcomprisAnimCanvasItem *anim_item;
/*
* Description of this plugin
* Description of this plugin
*/
static BoardPlugin menu_bp = {
NULL,
......@@ -160,7 +160,7 @@ start_board (GcomprisBoard * agcomprisBoard)
}
/*
* =======================================
* =======================================
*/
static void
end_board ()
......@@ -182,7 +182,7 @@ is_our_board (GcomprisBoard * gcomprisBoard)
if (g_strcasecmp (gcomprisBoard->type, "awele") == 0)
{
/*
* Set the plugin entry
* Set the plugin entry
*/
gcomprisBoard->plugin = &menu_bp;
......@@ -225,7 +225,7 @@ set_level (guint level)
}
}
awele_next_level();
}
}
......@@ -233,7 +233,7 @@ set_level (guint level)
/*-------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------*/
/*
* set initial values for the next level
* set initial values for the next level
*/
static void
awele_next_level ()
......@@ -252,10 +252,10 @@ awele_next_level ()
computer_turn = FALSE;
/*
* Create the level
* Create the level
*/
awele_create_item (gnome_canvas_root (gcomprisBoard->canvas));
if ((gcomprisBoard->level % 2) ==0){
computer_turn = TRUE;
staticAwale->player = HUMAN;
......@@ -272,10 +272,10 @@ awele_next_level ()
}
/*
* ====================================
* ====================================
*/
/*
* Destroy all the items
* Destroy all the items
*/
static void
awele_destroy_all_items ()
......@@ -302,7 +302,7 @@ awele_destroy_all_items ()
}
/*
* ====================================
* ====================================
*/
static GnomeCanvasItem *
awele_create_item (GnomeCanvasGroup * parent)
......@@ -323,7 +323,7 @@ awele_create_item (GnomeCanvasGroup * parent)
(double) 0, "y", (double) 0, NULL));
/*
* Load the cute frame
* Load the cute frame
*/
pixmap = gc_pixmap_load ("awele/awele_frame.png");
......@@ -413,7 +413,7 @@ awele_create_item (GnomeCanvasGroup * parent)
graphsElt = (GRAPHICS_ELT *) g_malloc (sizeof (GRAPHICS_ELT));
/*
* Boucle pour creer et positionner les boutons qui serviront
* Boucle pour creer et positionner les boutons qui serviront
* a selectionner la case a jouer
*/
for (i = 0; i < NBHOLE / 2; i++)
......@@ -493,11 +493,11 @@ awele_create_item (GnomeCanvasGroup * parent)
graphsElt->nbBeansHole[i] =
gnome_canvas_item_new (boardRootItem,
gnome_canvas_text_get_type (),
"text", buffer, "font",
"12x24", "size", 14000, "x",
(double) (caseCoord[i] + 45),
"y",
(double) ((i < 6) ? 378 : 94),
"text", buffer,
"font", "sans 12",
"size", 14000,
"x", (double) (caseCoord[i] + 45),
"y", (double) ((i < 6) ? 378 : 94),
"fill_color", "black", NULL);
}
......@@ -518,7 +518,7 @@ awele_create_item (GnomeCanvasGroup * parent)
(), "text",
buffer,
"font",
"12x24",
"sans 12",
"size", 20000,
"x",
(double) x1,
......@@ -551,7 +551,7 @@ awele_create_item (GnomeCanvasGroup * parent)
graphsElt->msg = gnome_canvas_item_new (boardRootItem,
gnome_canvas_text_get_type (),
"text", _("Choose a house"),
"font", "12x24",
"font", "sans 12",
"size", 20000,
"x", (double) 400,
"y", (double) 500,
......@@ -564,33 +564,33 @@ awele_create_item (GnomeCanvasGroup * parent)
/*
* ====================================
* ====================================
*/
static void
game_won ()
{
if (sublevel_finished){
gcomprisBoard->sublevel++;
if (gcomprisBoard->sublevel > gcomprisBoard->number_of_sublevel)
{
/*
* Try the next level
* Try the next level
*/
gcomprisBoard->sublevel = 1;
gcomprisBoard->level++;
if (gcomprisBoard->level > gcomprisBoard->maxlevel)
{ // the
// current
// current
// board
// is
// finished
// finished
// : bail
// out
gc_bonus_end_display (BOARD_FINISHED_RANDOM);
return;
}
}
}
sublevel_finished = FALSE;
......@@ -612,7 +612,7 @@ initBoardGraphics (GRAPHICS_ELT * graphsElt)
//if (graphsElt->ptBeansHoleLink != NULL)
// free(graphsElt->ptBeansHoleLink);
// free(graphsElt->ptBeansHoleLink);
graphsElt->ptBeansHoleLink =
(BEANHOLE_LINK *) malloc (NBTOTALBEAN *
......@@ -687,7 +687,7 @@ static gboolean to_computer(gpointer data)
gc_bonus_display(TRUE, BONUS_FLOWER);
}
} else {
/* computer can't play. Why? human is hungry and i cannot give it
/* computer can't play. Why? human is hungry and i cannot give it
to eat */
/* if human has 24 beans, it's draw (human win in gcompris) */
/* if not, all staying are captured by computer and computer win */
......@@ -695,7 +695,7 @@ static gboolean to_computer(gpointer data)
sublevel_finished = (staticAwale->CapturedBeans[HUMAN] == 24);
gc_bonus_display(sublevel_finished, BONUS_FLOWER);
}
timeout = 0;
return FALSE;
}
......@@ -741,7 +741,7 @@ buttonClick (GtkWidget * item, GdkEvent * event, gpointer data)
"pixbuf",
graphsElt->pixbufButtonClicked[numeroCase],
"y", (double) Y_BOUTONS + 3, NULL);
g_object_set (graphsElt->msg, "text", "", NULL);
AWALE *tmpaw = moveAwale (numeroCase, staticAwale);
......@@ -765,7 +765,7 @@ buttonClick (GtkWidget * item, GdkEvent * event, gpointer data)
animation );
}
}
break;
case GDK_BUTTON_RELEASE:
g_object_set (GTK_OBJECT
......@@ -797,15 +797,15 @@ static BEANHOLE_LINK *
updateNbBeans (int alpha)
{
char buffer[3]; //Manipulation chaines de caracteres
char buffer[3]; //Manipulation chaines de caracteres
int i, j, k, idxTabBeans = 0; //Compteur Boucle Manipulation Elements graphiques
static short int nbActiveBean = NBTOTALBEAN; //nbre graine restant sur plateau
static short int nbOldActiveBean; //nbre graine restant sur plateau au tour precedent
BEANHOLE_LINK *ptBeansHoleLink = NULL; //pointeur sur structures stockant les item graines et la case dans laquelle elles se trouvent.
/**
* Sauvegarde du nombre de graines restantes sur le plateau de jeu
* pour le prochain appel a la fonction.
* Sauvegarde du nombre de graines restantes sur le plateau de jeu
* pour le prochain appel a la fonction.
* Mise a jour de nbActiveBean avec nouvelle configuration du plateau de jeu.
*/
if (alpha)
......@@ -816,11 +816,11 @@ updateNbBeans (int alpha)
{
nbOldActiveBean = nbActiveBean;
}
nbActiveBean =
NBTOTALBEAN - (staticAwale->CapturedBeans[HUMAN] +
staticAwale->CapturedBeans[COMPUTER]);
/**
* Destruction d'autant d'elements graphiques graines
* qu'il y a eu de captures pdt ce tour de jeu
......@@ -830,21 +830,21 @@ updateNbBeans (int alpha)
{
gtk_object_destroy (GTK_OBJECT (ptBeansHoleLink->beanPixbuf));
}
/**
* Allocation d'un nouvel espace memoire stockant les item graines
* et la case dans laquelle elles se trouvent. Puis liberation de la fin de
* Allocation d'un nouvel espace memoire stockant les item graines
* et la case dans laquelle elles se trouvent. Puis liberation de la fin de
* l'ancien espace memoire.
*/
ptBeansHoleLink =
(BEANHOLE_LINK *) realloc (graphsElt->ptBeansHoleLink,
nbActiveBean *
sizeof (BEANHOLE_LINK));
/**
* Pour chaque case du plateau, mise a jour du nbre de graines qu'elle contient.
* Pour chaque case du plateau, mise a jour du nbre de graines qu'elle contient.
* Et pour chaque graine de cette case, deplacement d'un element graphique type graine
* dans cette case. Et mise a jour de l'information hole dans la structure BEANHOLE_LINK.
*/
......@@ -852,14 +852,14 @@ updateNbBeans (int alpha)
{
sprintf (buffer, "%d", staticAwale->board[i]);
gnome_canvas_item_set (graphsElt->nbBeansHole[i], "text", buffer, NULL);
for (j = 0;
j < staticAwale->board[i] && idxTabBeans < nbActiveBean;
j++, idxTabBeans++)
{
k = 0 + rand () % 4;
gnome_canvas_item_set (ptBeansHoleLink[idxTabBeans].
beanPixbuf, "x",
(double) caseCoord[i] +
......@@ -867,16 +867,16 @@ updateNbBeans (int alpha)
(double) (((i <
6) ? 260 : 130) +
rand () % 60), NULL);
ptBeansHoleLink[idxTabBeans].hole = i;
}
}
/**
* Renvoi du pointeur sur la zone memoire retaillee (n'a probablement pas change d'adresse).
*/
graphsElt->ptBeansHoleLink = ptBeansHoleLink;
return ptBeansHoleLink;
}
......@@ -900,11 +900,11 @@ updateCapturedBeans ()
sprintf (buffer, "%d", staticAwale->CapturedBeans[i]);
g_object_set (graphsElt->Captures[i], "text", buffer, NULL);
if (staticAwale->CapturedBeans[i] > 24)
{
{
gamewon = TRUE;
sublevel_finished = (i==0);
gc_bonus_display(sublevel_finished, BONUS_FLOWER);
}
}
}
}
......@@ -17,10 +17,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <ctype.h>
#include <math.h>
#include <assert.h>
#include "gcompris/gcompris.h"
#define SOUNDLISTFILE PACKAGE
......@@ -276,7 +272,7 @@ static GnomeCanvasItem *canal_lock_create_item(GnomeCanvasGroup *parent)
tuxboat_item = gnome_canvas_item_new (boardRootItem,
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixmap,
"pixbuf", pixmap,
"x", (double) (LEFT_CANAL_WIDTH - gdk_pixbuf_get_width(pixmap)) / 2,
"y", (double) BASE_LINE - LEFT_CANAL_HEIGHT - gdk_pixbuf_get_height(pixmap)*0.9,
NULL);
......@@ -406,7 +402,7 @@ static GnomeCanvasItem *canal_lock_create_item(GnomeCanvasGroup *parent)
NULL);
/* And to finish, the 2 canal locks */
canallock_left_item =
canallock_left_item =
gnome_canvas_item_new (boardRootItem,
gnome_canvas_rect_get_type (),
"x1", (double) LEFT_CANAL_WIDTH + MIDDLE_CANAL_WIDTH * 0.1,
......@@ -420,7 +416,7 @@ static GnomeCanvasItem *canal_lock_create_item(GnomeCanvasGroup *parent)
(GtkSignalFunc) item_event,
NULL);
canallock_right_item =
canallock_right_item =
gnome_canvas_item_new (boardRootItem,
gnome_canvas_rect_get_type (),
"x1", (double) LEFT_CANAL_WIDTH + MIDDLE_CANAL_WIDTH * 0.9,
......@@ -498,7 +494,7 @@ static void move_boat()
return;
}
gnome_canvas_item_get_bounds(tuxboat_item, &timer_item_x1, &timer_item_y1,
gnome_canvas_item_get_bounds(tuxboat_item, &timer_item_x1, &timer_item_y1,
&timer_item_x2, &timer_item_y2);
timer_item = tuxboat_item;
......@@ -527,14 +523,14 @@ static void update_water()
lock_water_low = !lock_water_low;
y1 = BASE_LINE - RIGHT_CANAL_HEIGHT;
}
else
else
{
/* The water level is correct */
animation = FALSE;
return;
}
gnome_canvas_item_get_bounds(canal_middle_item, &timer_item_x1, &timer_item_y1,
gnome_canvas_item_get_bounds(canal_middle_item, &timer_item_x1, &timer_item_y1,
&timer_item_x2, &timer_item_y2);
timer_item = canal_middle_item;
......@@ -560,7 +556,7 @@ static void toggle_lock(GnomeCanvasItem *item)
return;
animation = TRUE;
gnome_canvas_item_get_bounds(item, &timer_item_x1, &timer_item_y1,
gnome_canvas_item_get_bounds(item, &timer_item_x1, &timer_item_y1,
&timer_item_x2, &timer_item_y2);
if(item == lock_left_item)
......@@ -608,7 +604,7 @@ static void toggle_lock(GnomeCanvasItem *item)
/* ==================================== */
static gboolean animate_step()
static gboolean animate_step()
{
if(!gcomprisBoard)
......@@ -618,12 +614,12 @@ static gboolean animate_step()
timer_item_y1 += timer_step_y1;
if(GNOME_IS_CANVAS_PIXBUF(timer_item))
gnome_canvas_item_set(timer_item,
gnome_canvas_item_set(timer_item,
"x", timer_item_x1,
"y", timer_item_y1,
NULL);
else if(GNOME_IS_CANVAS_RECT(timer_item))
gnome_canvas_item_set(timer_item,
gnome_canvas_item_set(timer_item,
"x1", timer_item_x1,
"y1", timer_item_y1,
NULL);
......@@ -633,10 +629,10 @@ static gboolean animate_step()
{
double item_x1, item_y1, item_x2, item_y2;
gnome_canvas_item_get_bounds(tuxboat_item, &item_x1, &item_y1,
gnome_canvas_item_get_bounds(tuxboat_item, &item_x1, &item_y1,
&item_x2, &item_y2);
gnome_canvas_item_set(tuxboat_item,
gnome_canvas_item_set(tuxboat_item,
"y", item_y1 + timer_step_y1,
NULL);
}
......@@ -668,7 +664,7 @@ static gboolean animate_step()
static void hightlight(GnomeCanvasItem *item, gboolean status)
{
guint color = 0;
/* This is an image, not a rectangle */
if(item == tuxboat_item)
return;
......@@ -703,7 +699,7 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
if(board_paused)
return FALSE;
switch (event->type)
switch (event->type)
{
case GDK_ENTER_NOTIFY:
hightlight(item, TRUE);
......@@ -716,7 +712,7 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
/* If there is already an animation do nothing */
if(animation)
return FALSE;
if(item == lock_left_item)
{
if(lock_water_low && canallock_right_up)
......
......@@ -17,10 +17,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <ctype.h>
#include <math.h>
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
......
......@@ -17,9 +17,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <ctype.h>
#include <math.h>
#include <assert.h>
#include <glib.h>
#include <string.h>
......@@ -265,7 +262,7 @@ static gboolean sounds_are_fine()
/* TRANSLATORS: Put here the alphabet in your language */
alphabet=_("abcdefghijklmnopqrstuvwxyz");
assert(g_utf8_validate(alphabet, -1, NULL)); // require by all utf8-functions
g_assert(g_utf8_validate(alphabet, -1, NULL)); // require by all utf8-functions
gchar *letter = g_new0(gchar, 8);
g_unichar_to_utf8(g_utf8_get_char(alphabet), letter);
......@@ -353,7 +350,7 @@ static GnomeCanvasItem *click_on_letter_create_item(GnomeCanvasGroup *parent)
int numbers[number_of_letters];
gchar *letters[number_of_letters];
assert(number_of_letters<=length_of_aphabet); // because we must set unique letter on every "vagon"