Commit 96ba0397 authored by Bruno Coudoin's avatar Bruno Coudoin

updated for 7.4 windows

	* Makefile.mingw: updated for 7.4 windows
	* boards/images/README:
	* boards/images/enumerate_background.png: Remade by by Herve Chanal.
	* src/boards/click_on_letter.c: (start_board), (end_board),
	(sounds_are_fine), (click_on_letter_create_item), (conf_ok): now sounds is muted
	* src/boards/memory.c: (start_board): added a dialog when sounds is not activated that the activity cannot be played.
parent 9175bc2a
2006-04-18 Bruno coudoin <bruno.coudoin@free.fr>
* Makefile.mingw: updated for 7.4 windows
* boards/images/README:
* boards/images/enumerate_background.png: Remade by by Herve Chanal.
* src/boards/click_on_letter.c: (start_board), (end_board),
(sounds_are_fine), (click_on_letter_create_item), (conf_ok): now sounds is muted
* src/boards/memory.c: (start_board): added a dialog when sounds is not activated that the activity cannot be played.
2006-04-17 Bruno coudoin <bruno.coudoin@free.fr>
reviewed by: <delete if not using a buddy>
* Makefile.mingw:
* boards/images/README:
* boards/images/enumerate_background.png:
* po/fr.po:
* src/boards/click_on_letter.c: (start_board), (end_board),
(sounds_are_fine), (click_on_letter_create_item), (conf_ok):
* src/boards/memory.c: (start_board):
*** Release 7.4 ***
2006-04-10 Bruno coudoin <bruno.coudoin@free.fr>
......
......@@ -4,7 +4,7 @@
# Description: Top Makefile for win32 (mingw) port of GCompris
#
VERSION = "7.4BETA1"
VERSION = "7.4"
pkgdatadir = gcompris
......
......@@ -4,3 +4,4 @@ Released under GPL.
Images made by Herve CHANAL in 2006, Release under GPL.
- scenery2_background.png
- scenery7_background.png
- enumerate_background.png
boards/images/enumerate_background.png

8.52 KB | W: | H:

boards/images/enumerate_background.png

87.6 KB | W: | H:

boards/images/enumerate_background.png
boards/images/enumerate_background.png
boards/images/enumerate_background.png
boards/images/enumerate_background.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -21,6 +21,7 @@
#include <math.h>
#include <assert.h>
#include <glib.h>
#include <string.h>
#include "gcompris/gcompris.h"
......@@ -68,7 +69,6 @@ static GnomeCanvasItem *click_on_letter_create_item(GnomeCanvasGroup *parent);
static void click_on_letter_destroy_all_items(void);
static void click_on_letter_next_level(void);
static gint item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data);
static gint phone_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data);
static gboolean sounds_are_fine();
static int right_position;
......@@ -76,7 +76,6 @@ static int number_of_letters=MAX_NUMBER_OF_LETTERS;
static gchar *right_letter;
static gchar *alphabet;
static void quit_board();
static void sound_played(gchar *file);
......@@ -137,6 +136,7 @@ static void pause_board (gboolean pause)
static void start_board (GcomprisBoard *agcomprisBoard)
{
GHashTable *config = gcompris_get_board_conf();
int ready;
gcompris_change_locale(g_hash_table_lookup( config, "locale"));
......@@ -149,7 +149,9 @@ static void start_board (GcomprisBoard *agcomprisBoard)
g_hash_table_destroy(config);
sounds_are_fine();
ready = sounds_are_fine();
gcompris_pause_sound();
if (agcomprisBoard!=NULL)
{
......@@ -158,20 +160,27 @@ static void start_board (GcomprisBoard *agcomprisBoard)
gcomprisBoard->level=1;
gcomprisBoard->maxlevel=NUMBER_OF_LEVELS;
gcomprisBoard->sublevel=1;
gcomprisBoard->number_of_sublevel=NUMBER_OF_SUBLEVELS; /* Go to next level after this number of 'play' */
gcompris_bar_set(GCOMPRIS_BAR_CONFIG|GCOMPRIS_BAR_LEVEL|GCOMPRIS_BAR_REPEAT);
gcompris_score_start(SCORESTYLE_NOTE,
50,
50,
gcomprisBoard->number_of_sublevel);
click_on_letter_next_level();
/* Go to next level after this number of 'play' */
gcomprisBoard->number_of_sublevel=NUMBER_OF_SUBLEVELS;
gamewon = FALSE;
pause_board(FALSE);
if(ready)
{
gcompris_bar_set(GCOMPRIS_BAR_CONFIG|GCOMPRIS_BAR_LEVEL|GCOMPRIS_BAR_REPEAT);
gcompris_score_start(SCORESTYLE_NOTE,
50,
50,
gcomprisBoard->number_of_sublevel);
click_on_letter_next_level();
gamewon = FALSE;
pause_board(FALSE);
}
else
{
gcompris_bar_set(0);
}
}
}
......@@ -180,16 +189,13 @@ static void end_board ()
{
if(gcomprisBoard!=NULL)
{
printf("end_board 1\n");
pause_board(TRUE);
printf("end_board 1\n");
gcompris_score_end();
printf("end_board 1\n");
click_on_letter_destroy_all_items();
printf("end_board 1\n");
}
gcompris_reset_locale();
gcomprisBoard = NULL;
gcompris_resume_sound();
}
/* ======================================= */
......@@ -293,7 +299,8 @@ static gboolean sounds_are_fine ()
fine = TRUE;
if(!properties->fx) {
gcompris_dialog(_("Error: this activity cannot be played with the\nsound effects disabled.\nGo to the configuration dialogue to\nenable the sound"), board_stop);
gcompris_bar_set(0);
gcompris_dialog(_("Error: this activity cannot be played with the\nsound effects disabled.\nGo to the configuration dialog to\nenable the sound"), board_stop);
fine = FALSE;
}
......@@ -405,29 +412,29 @@ static GnomeCanvasItem *click_on_letter_create_item(GnomeCanvasGroup *parent)
for (i=0; i< number_of_letters; i++) {
buttons[i] = gnome_canvas_item_new (boardRootItem,
gnome_canvas_pixbuf_get_type (),
"pixbuf", button_pixmap,
"x", (double) xOffset,
"y", (double) yOffset,
NULL);
l_items[i] = gnome_canvas_item_new (boardRootItem,
gnome_canvas_text_get_type (),
"text", g_strdup(letters[i]),
"font", gcompris_skin_font_board_huge_bold,
"anchor", GTK_ANCHOR_CENTER,
"fill_color_rgba", 0x0000ffff,
"x", (double) xOffset + gdk_pixbuf_get_width(button_pixmap)/2,
"y", (double) yOffset + gdk_pixbuf_get_height(button_pixmap)/2 - 5,
NULL);
g_free(letters[i]);
xOffset +=HORIZONTAL_SEPARATION +gdk_pixbuf_get_width(button_pixmap);
gtk_signal_connect(GTK_OBJECT(l_items[i]), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(i));
gtk_signal_connect(GTK_OBJECT(buttons[i]), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(i));
// gtk_signal_connect(GTK_OBJECT(buttons[i]), "event", (GtkSignalFunc) gcompris_item_event_focus, NULL);
buttons[i] = gnome_canvas_item_new (boardRootItem,
gnome_canvas_pixbuf_get_type (),
"pixbuf", button_pixmap,
"x", (double) xOffset,
"y", (double) yOffset,
NULL);
l_items[i] = gnome_canvas_item_new (boardRootItem,
gnome_canvas_text_get_type (),
"text", g_strdup(letters[i]),
"font", gcompris_skin_font_board_huge_bold,
"anchor", GTK_ANCHOR_CENTER,
"fill_color_rgba", 0x0000ffff,
"x", (double) xOffset + gdk_pixbuf_get_width(button_pixmap)/2,
"y", (double) yOffset + gdk_pixbuf_get_height(button_pixmap)/2 - 5,
NULL);
g_free(letters[i]);
xOffset +=HORIZONTAL_SEPARATION +gdk_pixbuf_get_width(button_pixmap);
gtk_signal_connect(GTK_OBJECT(l_items[i]), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(i));
gtk_signal_connect(GTK_OBJECT(buttons[i]), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(i));
// gtk_signal_connect(GTK_OBJECT(buttons[i]), "event", (GtkSignalFunc) gcompris_item_event_focus, NULL);
}
......@@ -463,18 +470,6 @@ static void process_ok() {
g_timeout_add(TIME_CLICK_TO_BONUS, process_ok_timeout, NULL);
}
/* ==================================== */
static gint phone_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data) {
switch (event->type)
{
case GDK_BUTTON_PRESS:
repeat();
break;
default:
break;
}
return TRUE;
}
/* ==================================== */
static gint
item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
{
......@@ -566,12 +561,11 @@ static GHFunc save_table (gpointer key,
return NULL;
}
static GcomprisConfCallback conf_ok(GHashTable *table)
static void conf_ok(GHashTable *table)
{
if (!table){
if (gcomprisBoard)
pause_board(FALSE);
return;
}
......
/* gcompris - memory.c
*
* Time-stamp: <2006/03/31 22:46:09 yves>
* Time-stamp: <2006/04/17 22:28:15 bruno>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -813,6 +813,8 @@ static void start_board (GcomprisBoard *agcomprisBoard)
if (currentUiMode == UIMODE_SOUND)
{
GcomprisProperties *properties = gcompris_get_properties();
gcompris_pause_sound();
gcompris_set_background(gnome_canvas_root(gcomprisBoard->canvas), "images/gcompris_band.png");
base_x1 = BASE_SOUND_X1;
......@@ -820,6 +822,12 @@ static void start_board (GcomprisBoard *agcomprisBoard)
base_x2 = BASE_SOUND_X2;
base_y2 = BASE_SOUND_Y2;
base_x1_tux = BASE_SOUND_X1_TUX;
if(!properties->fx) {
gcompris_dialog(_("Error: this activity cannot be played with the\nsound effects disabled.\nGo to the configuration dialog to\nenable the sound"), board_stop);
return;
}
}
else
{
......
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