Commit 40504cab authored by Bruno Coudoin's avatar Bruno Coudoin

- Added more sound effects. All taken from tuxpaints.


	- Added more sound effects. All taken from tuxpaints.
parent ca804614
2006-12-07 Bruno coudoin <bruno.coudoin@free.fr>
- Added more sound effects. All taken from tuxpaints.
* Makefile.mingw.in:
* README.mingw:
* boards/sounds/grow.wav:
* boards/sounds/paint1.wav:
* boards/sounds/prompt.wav:
* src/boards/advanced_colors.c: (item_event):
* src/boards/colors.c: (item_event):
* src/boards/maze.c: (movePos), (key_press),
(key_press_2D_relative), (key_press_3D), (twoDdisplay),
(threeDdisplay), (update_tux):
* src/boards/memory.c: (end_board), (create_item), (check_win),
(item_event), (tux_play):
* src/boards/python/mosaic.py:
* src/boards/railroad.c: (item_event), (answer_event):
* src/boards/read_colors.c: (item_event):
* src/boards/shapegame.c: (shape_goes_back_to_list),
(item_event_drag), (item_event_ok):
2006-12-06 Bruno coudoin <bruno.coudoin@free.fr>
- Fixed 2 annoying bug in anim/draw:
......
......@@ -69,7 +69,7 @@ NEEDED_DLLS = $(GNUCHESS_TOP)/bin/pthreadGC.dll \
/c/WINDOWS/system32/msvcr71.dll
NEEDED_FILES = README \
COPYING \
README.mingw \
COPYING \
Changelog
......
......@@ -25,6 +25,13 @@ to upgrade to newer versions, and (2) they show up as /opt/gtk, /opt/libxml,
and so on from msys, which is reasonably clear. If you choose a different
hierarchy make sure to tweak your Makefile.mingw.
WARNING: Library Microsoft mscrt71.dll.
This library is needed only due to python.
Based on microsoft wev site, it is freely redistributable if you get
the free Microsoft Visual C++ 2005 Express Edition:
http://support.microsoft.com/kb/326922/fr
This library is not free software.
2.1 GTK
=======
+ gcompris needs gtk to run.
......
......@@ -384,6 +384,7 @@ static gint item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data) {
}
}
if (clicked >= 0) {
gc_sound_play_ogg ("sounds/bleep.wav", NULL);
board_paused = TRUE;
highlight_selected(clicked);
gamewon = (clicked == GPOINTER_TO_INT(g_list_nth_data(listColors,0)));
......
......@@ -449,6 +449,7 @@ static gint item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data) {
clicked = 9;
if (clicked >= 0) {
gc_sound_play_ogg ("sounds/bleep.wav", NULL);
board_paused = TRUE;
highlight_selected(clicked);
gamewon = (clicked == GPOINTER_TO_INT(g_list_nth_data(listColors,0)));
......
......@@ -804,9 +804,14 @@ static void movePos(int x1, int y1, int x2,int y2, int richting)
int ret,wall,i,bo=1;
ret=1;
wall=Maze[x1][y1];
if (wall&richting) ret=0;
if (wall&richting)
{
gc_sound_play_ogg ("sounds/brick.wav", NULL);
ret=0;
}
if (ret)
{
gc_sound_play_ogg ("sounds/prompt.wav", NULL);
if (Maze[x2][y2]&SET)
{
for (i=(ind); i>=0 && bo; i--)
......@@ -924,6 +929,7 @@ static gint key_press(guint keyval, gchar *commit_str, gchar *preedit_str)
case GDK_3:
case GDK_space:
if(modeIsInvisible) {
gc_sound_play_ogg ("sounds/flip.wav", NULL);
if(mapActive) {
gnome_canvas_item_hide(GNOME_CANVAS_ITEM(wallgroup));
/* Hide the warning */
......@@ -943,7 +949,11 @@ static gint key_press(guint keyval, gchar *commit_str, gchar *preedit_str)
return TRUE;
default: return FALSE;
}
if (Maze[position[ind][0]][position[ind][1]]&richting) return TRUE;
if (Maze[position[ind][0]][position[ind][1]]&richting)
{
gc_sound_play_ogg ("sounds/brick.wav", NULL);
return TRUE;
}
one_step(richting);
viewing_direction=richting;
......@@ -983,16 +993,19 @@ static gint key_press_2D_relative(guint keyval, gchar *commit_str, gchar *preedi
switch (keyval)
{
case GDK_Left: viewing_direction=TURN_LEFT(viewing_direction);
gc_sound_play_ogg ("sounds/grow.wav", NULL);
update_tux(viewing_direction);
return TRUE;
break;
case GDK_Right: viewing_direction=TURN_RIGHT(viewing_direction);
gc_sound_play_ogg ("sounds/grow.wav", NULL);
update_tux(viewing_direction);
return TRUE;
break;
case GDK_Up: one_step(viewing_direction);
break;
case GDK_Down:
gc_sound_play_ogg ("sounds/grow.wav", NULL);
viewing_direction=TURN_RIGHT(viewing_direction);
viewing_direction=TURN_RIGHT(viewing_direction);
update_tux(viewing_direction);
......@@ -1018,15 +1031,17 @@ static gint key_press_3D(guint keyval, gchar *commit_str, gchar *preedit_str)
switch (keyval)
{
case GDK_Left: viewing_direction=TURN_LEFT(viewing_direction);
gc_sound_play_ogg ("sounds/grow.wav", NULL);
break;
case GDK_Right: viewing_direction=TURN_RIGHT(viewing_direction);
gc_sound_play_ogg ("sounds/grow.wav", NULL);
break;
case GDK_Up: one_step(viewing_direction);
break;
case GDK_Down:
viewing_direction=TURN_RIGHT(viewing_direction);
viewing_direction=TURN_RIGHT(viewing_direction);
update_tux(viewing_direction);
gc_sound_play_ogg ("sounds/grow.wav", NULL);
break;
case GDK_2:
case GDK_space:
......@@ -1379,6 +1394,7 @@ static void draw3D()
static void twoDdisplay()
{
char *fileskin;
gc_sound_play_ogg ("sounds/flip.wav", NULL);
fileskin = gc_skin_image_get("gcompris-bg.jpg");
gc_set_background(gnome_canvas_root(gcomprisBoard->canvas), fileskin);
g_free(fileskin);
......@@ -1391,6 +1407,7 @@ static void twoDdisplay()
static void threeDdisplay()
{
gc_sound_play_ogg ("sounds/flip.wav", NULL);
gc_set_background(gnome_canvas_root(gcomprisBoard->canvas), "images/maze-bg.jpg");
gnome_canvas_item_hide(GNOME_CANVAS_ITEM(boardRootItem));
threeDactive=TRUE;
......@@ -1424,6 +1441,4 @@ static void update_tux(gint direction)
NULL);
gdk_pixbuf_unref(pixmap);
}
}
......@@ -921,7 +921,7 @@ end_board ()
g_free(op_minus);
g_free(op_mult);
g_free(op_div);
gcomprisBoard = NULL;
}
......@@ -1235,7 +1235,7 @@ static void create_item(GnomeCanvasGroup *parent)
"y", (double) 20,
NULL);
gdk_pixbuf_unref(pixmap_tux);
tux_score_s = gnome_canvas_item_new (GNOME_CANVAS_GROUP(parent),
gnome_canvas_text_get_type (),
"font", gc_skin_font_board_huge_bold,
......@@ -1543,7 +1543,7 @@ static void check_win()
// Check win
if (compare_card((gpointer) firstCard, (gpointer) secondCard) == 0) {
gc_sound_play_ogg ("sounds/gobble.ogg", NULL);
gc_sound_play_ogg ("sounds/flip.wav", NULL);
win_id = g_timeout_add (timeout,
(GSourceFunc) hide_card, NULL);
return;
......@@ -1589,6 +1589,9 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, MemoryItem *memoryItem)
if(win_id)
return FALSE;
if (currentUiMode == UIMODE_NORMAL)
gc_sound_play_ogg ("sounds/bleep.wav", NULL);
if(secondCard)
{
display_card(firstCard, ON_BACK);
......@@ -1735,7 +1738,7 @@ static gint tux_play(){
if (currentUiMode == UIMODE_SOUND)
return FALSE;
else {
gc_sound_play_ogg ("sounds/gobble.ogg", NULL);
gc_sound_play_ogg ("sounds/flip.wav", NULL);
win_id = g_timeout_add (1000,
(GSourceFunc) hide_card, NULL);
return TRUE;
......@@ -1789,7 +1792,7 @@ static gint tux_play(){
return FALSE;
else {
if (compare_card(firstCard, secondCard)==0){
gc_sound_play_ogg ("sounds/gobble.ogg", NULL);
gc_sound_play_ogg ("sounds/flip.wav", NULL);
g_warning("Now tux win !");
win_id = g_timeout_add (1000,
(GSourceFunc) hide_card, NULL);
......
......@@ -23,6 +23,7 @@ import gcompris.utils
import gcompris.skin
import gcompris.admin
import gcompris.bonus
import gcompris.sound
import gtk
import gtk.gdk
import random
......@@ -342,6 +343,7 @@ class Gcompris_mosaic:
if event.type == gtk.gdk.BUTTON_PRESS:
# A color is selected
gcompris.sound.play_ogg("sounds/bleep.wav");
if(self.current_index_x >= 0):
image = palette.subpixbuf(self.current_index_x * self.palette_item_width,
......@@ -363,6 +365,7 @@ class Gcompris_mosaic:
def set_color_item_event(self, item, event, data):
if event.type == gtk.gdk.BUTTON_PRESS:
gcompris.sound.play_ogg("sounds/paint1.wav");
(box_item, color_index_x, color_index_y, coord_x, coord_y) = data
self.current_index_x = color_index_x
......
......@@ -461,6 +461,7 @@ static gint item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data) {
{
case GDK_BUTTON_PRESS:
g_warning("GDK_BUTTON_PRESS item %d\tlength answer = %d\n",item_number,g_list_length(item_answer_list));
gc_sound_play_ogg ("sounds/bleep.wav", NULL);
xOffset = 0;
for (i=0; i<g_list_length(item_answer_list); i++) {
gnome_canvas_item_get_bounds(g_list_nth_data(item_answer_list,i), &dx1, &dy1, &dx2, &dy2);
......@@ -509,6 +510,7 @@ static gint answer_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
switch (event->type)
{
case GDK_BUTTON_PRESS:
gc_sound_play_ogg ("sounds/smudge.wav", NULL);
g_warning("Deleting %d\n",item_number);
local_item = g_list_nth_data(item_answer_list,item_number);
item_answer_list = g_list_remove( item_answer_list, local_item );
......
......@@ -371,6 +371,7 @@ static gint item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data) {
}
if (clicked >= 0) {
gc_sound_play_ogg ("sounds/bleep.wav", NULL);
board_paused = TRUE;
highlight_selected(clicked);
gamewon = (clicked == GPOINTER_TO_INT(g_list_nth_data(listColors,0)));
......
......@@ -930,7 +930,7 @@ static void shape_goes_back_to_list(Shape *shape)
update_shapelist_item();
gc_sound_play_ogg ("sounds/gobble.ogg", NULL);
gc_sound_play_ogg ("sounds/flip.wav", NULL);
}
static Shape * item_to_shape(GnomeCanvasItem *item)
......@@ -977,6 +977,7 @@ static gint item_event_drag(GnomeCanvasItem *item, GdkEvent *event, gpointer dat
switch(event->type)
{
case GDK_BUTTON_PRESS:
gc_sound_play_ogg ("sounds/bleep.wav", NULL);
switch(shape -> type)
{
case SHAPE_ICON:
......@@ -1084,6 +1085,9 @@ static gint item_event_drag(GnomeCanvasItem *item, GdkEvent *event, gpointer dat
{
if(found_shape->shape_place)
shape_goes_back_to_list(found_shape->shape_place);
gc_sound_play_ogg ("sounds/line_end.wav", NULL);
/* place the target item */
gnome_canvas_item_set(shape->target_shape->item,
"x", found_shape->x - shape->target_shape->w/2,
......@@ -1231,6 +1235,7 @@ item_event_ok(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
switch (event->type)
{
case GDK_BUTTON_PRESS:
gc_sound_play_ogg ("sounds/bleep.wav", NULL);
root_item = g_list_nth_data(shape_list_group, current_shapelistgroup_index);
gnome_canvas_item_hide(root_item);
......
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