mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
Fix disabling background sound on main menu
This commit is contained in:
parent
dcd3665b7a
commit
3b17faf320
2 changed files with 11 additions and 11 deletions
|
@ -1493,11 +1493,11 @@ void update_menu_level(void) {
|
|||
stop_cap_music();
|
||||
if (!configMenuSound || configMenuStaffRoll || curLevel == LEVEL_CASTLE_GROUNDS) {
|
||||
reset_volume();
|
||||
disable_background_sound();
|
||||
sound_banks_disable(SEQ_PLAYER_SFX, SOUND_BANKS_BACKGROUND);
|
||||
set_background_music(0, SEQ_MENU_TITLE_SCREEN, 0);
|
||||
} else {
|
||||
reset_volume();
|
||||
disable_background_sound();
|
||||
sound_banks_disable(SEQ_PLAYER_SFX, SOUND_BANKS_BACKGROUND);
|
||||
set_background_music(gCurrentArea->musicParam, gCurrentArea->musicParam2, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ static OSMesgQueue sSoundMesgQueue;
|
|||
static OSMesg sSoundMesgBuf[1];
|
||||
static struct VblankHandler sSoundVblankHandler;
|
||||
|
||||
static u8 D_8032C6C0 = 0;
|
||||
static u8 D_8032C6C4 = 0;
|
||||
static u8 sVolumeLoweredState = 0;
|
||||
static u8 sBackgroundMusicDisabled = FALSE;
|
||||
static u16 sCurrentMusic = MUSIC_NONE;
|
||||
static u16 sCurrentShellMusic = MUSIC_NONE;
|
||||
static u16 sCurrentCapMusic = MUSIC_NONE;
|
||||
|
@ -80,7 +80,7 @@ void play_menu_sounds_extra(s32 a, void *b);
|
|||
* Called from threads: thread5_game_loop
|
||||
*/
|
||||
void reset_volume(void) {
|
||||
D_8032C6C0 = 0;
|
||||
sVolumeLoweredState = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -95,7 +95,7 @@ void lower_background_noise(s32 a) {
|
|||
seq_player_lower_volume(SEQ_PLAYER_LEVEL, 60, 40);
|
||||
break;
|
||||
}
|
||||
D_8032C6C0 |= a;
|
||||
sVolumeLoweredState |= a;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -110,15 +110,15 @@ void raise_background_noise(s32 a) {
|
|||
seq_player_unlower_volume(SEQ_PLAYER_LEVEL, 60);
|
||||
break;
|
||||
}
|
||||
D_8032C6C0 &= ~a;
|
||||
sVolumeLoweredState &= ~a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called from threads: thread5_game_loop
|
||||
*/
|
||||
void disable_background_sound(void) {
|
||||
if (D_8032C6C4 == 0) {
|
||||
D_8032C6C4 = 1;
|
||||
if (!sBackgroundMusicDisabled) {
|
||||
sBackgroundMusicDisabled = TRUE;
|
||||
sound_banks_disable(SEQ_PLAYER_SFX, SOUND_BANKS_BACKGROUND);
|
||||
}
|
||||
}
|
||||
|
@ -127,8 +127,8 @@ void disable_background_sound(void) {
|
|||
* Called from threads: thread5_game_loop
|
||||
*/
|
||||
void enable_background_sound(void) {
|
||||
if (D_8032C6C4 == 1) {
|
||||
D_8032C6C4 = 0;
|
||||
if (sBackgroundMusicDisabled) {
|
||||
sBackgroundMusicDisabled = FALSE;
|
||||
sound_banks_enable(SEQ_PLAYER_SFX, SOUND_BANKS_BACKGROUND);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue