4
* Copyright (C) 2005, 2008 Frederic Mazzarol
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 3 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, see <http://www.gnu.org/licenses/>.
21
#define BOUTON "awele/bouton1.png" //Chemin relatif vers fichiers boutons
22
#define BOUTON_NOTIFY "awele/bouton1_notify.png" //Chemin relatif vers fichiers boutons cliqu�s
23
#define BOUTON_CLIC "awele/bouton1_clic.png" //Chemin relatif vers fichiers boutons cliqu�s
24
#define BEAN "awele/graine1.png" //Chemin relatif vers fichiers graines
26
#define WIDTH 800 // Largeur Fenetre
27
#define HEIGHT 600 // Hauteur Fenetre
32
GooCanvasItem *beanPixbuf;
38
GooCanvasItem *msg; //Item message pour dialogue avec utilisateur
39
GooCanvasItem *nbBeansHole[12]; //Tableau d'item affichant le nbre de graine par trou.
40
BEANHOLE_LINK *ptBeansHoleLink; //pointeur sur structures stockant les item graines et la case dans laquelle elles se trouvent.
41
GooCanvasItem *button[6]; //Item des boutons (affich�s avec pixbufButton)
42
GdkPixbuf *pixbufButtonNotify[6]; //pixbux des boutons notifi�s
43
GdkPixbuf *pixbufButton[6]; //pixbuf des boutons(selection de la case a jouer)
44
GdkPixbuf *pixbufButtonClicked[6]; //pixbuf des boutons cliqu�s
45
GooCanvasItem *Captures[2]; //Tableau d'item affichage nbre graine captur�es.
46
GdkPixbuf *pixbufBeans[4]; //pixbufs des graines
51
GRAPHICS_ELT *graphsElt;
55
* Fonctions de traitement des events, signaux et rappels
57
static gboolean buttonClick (GooCanvasItem *item,
58
GooCanvasItem *target,
59
GdkEventButton *event,
63
* Fonctions Mise a jour de l'affichage
65
static BEANHOLE_LINK * updateNbBeans (int alpha);
66
static void updateCapturedBeans (void);
67
static void initBoardGraphics (GRAPHICS_ELT *graphsElt);