From 17174bc8010a1bab297aad8f7d978bcf990b4f77 Mon Sep 17 00:00:00 2001 From: Bruno Coudoin Date: Tue, 24 Mar 2009 23:39:03 +0000 Subject: fixed a cased in which the memory sound was in a fuzzy state if the level * src/boards/memory.c: (start_board), (memory_next_level): fixed a cased in which the memory sound was in a fuzzy state if the level was changed by the user. Merged from trunk 3795 By the way in this branch this is not enough, tux play more than he should when we change the level during the game. svn path=/branches/GCOMPRIS_8_3/; revision=3797 --- diff --git a/ChangeLog b/ChangeLog index 58d6652..7b7618a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-03-25 Bruno coudoin + + * src/boards/memory.c: (start_board), (memory_next_level): fixed a cased in which + the memory sound was in a fuzzy state if the level was changed by the user. + Merged from trunk 3795 + By the way in this branch this is not enough, tux play more than he should + when we change the level during the game. + 2009-03-24 Bruno coudoin - Replaced a level in memory sound to make the difficulty always increasing diff --git a/src/boards/memory.c b/src/boards/memory.c index 56d6527..037946b 100644 --- a/src/boards/memory.c +++ b/src/boards/memory.c @@ -868,14 +868,6 @@ static void start_board (GcomprisBoard *agcomprisBoard) Paused = FALSE; - to_tux = FALSE; - if (currentUiMode == UIMODE_SOUND){ - playing_sound = TRUE; - gc_sound_play_ogg_cb("sounds/LuneRouge/musique/LRBuddhist_gong_05_by_Lionel_Allorge.ogg", - start_callback); - } else - playing_sound = FALSE; - memory_next_level(); } } @@ -961,6 +953,15 @@ static void memory_next_level() { gc_bar_set_level(gcomprisBoard); + to_tux = FALSE; + if (currentUiMode == UIMODE_SOUND){ + /* We play a sound here to cancel any pending sounds callback from a previous play */ + playing_sound = TRUE; + gc_sound_play_ogg_cb("sounds/LuneRouge/musique/LRBuddhist_gong_05_by_Lionel_Allorge.ogg", + start_callback); + } else + playing_sound = FALSE; + memory_destroy_all_items(); boardRootItem = GNOME_CANVAS_GROUP( -- cgit v0.9.1