From: Holger Schemel Date: Wed, 13 Apr 2016 18:56:55 +0000 (+0200) Subject: fade sounds and music for main menu when entering other screen or menu X-Git-Tag: 4.0.0.0-rc1~5 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=828af85e37a01763c0bf7e0d639e959d45b4a84d;p=rocksndiamonds.git fade sounds and music for main menu when entering other screen or menu --- diff --git a/src/editor.c b/src/editor.c index 862a1866..04d03e1b 100644 --- a/src/editor.c +++ b/src/editor.c @@ -7623,6 +7623,8 @@ void DrawLevelEd() { int fade_mask = REDRAW_FIELD; + FadeSoundsAndMusic(); + /* needed if different viewport properties defined for editor */ ChangeViewportPropertiesIfNeeded(); diff --git a/src/game.c b/src/game.c index 29303a7e..c754fc18 100644 --- a/src/game.c +++ b/src/game.c @@ -3113,6 +3113,8 @@ void InitGame() if (CheckIfGlobalBorderHasChanged()) fade_mask = REDRAW_ALL; + FadeSoundsAndMusic(); + ExpireSoundLoops(TRUE); FadeOut(fade_mask); diff --git a/src/screens.c b/src/screens.c index d6377c1d..c6e3c645 100644 --- a/src/screens.c +++ b/src/screens.c @@ -2170,6 +2170,7 @@ static void DrawInfoScreen_Main() fade_mask = REDRAW_ALL; UnmapAllGadgets(); + FadeSoundsAndMusic(); FreeScreenGadgets(); CreateScreenGadgets(); @@ -4075,6 +4076,8 @@ static void HandleChooseTree(int mx, int my, int dx, int dy, int button, void DrawChooseLevelSet() { + FadeSoundsAndMusic(); + SetMainBackgroundImage(IMG_BACKGROUND_LEVELS); DrawChooseTree(&leveldir_current); @@ -4092,6 +4095,8 @@ void DrawChooseLevelNr() { int i; + FadeSoundsAndMusic(); + if (level_number != NULL) { freeTreeInfo(level_number); @@ -5787,6 +5792,7 @@ static void DrawSetupScreen_Generic() fade_mask = REDRAW_ALL; UnmapAllGadgets(); + FadeSoundsAndMusic(); FreeScreenGadgets(); CreateScreenGadgets();