diff --git a/cfg/Tomb1Main.json5 b/cfg/Tomb1Main.json5 index 7987db384..d25c43cf8 100644 --- a/cfg/Tomb1Main.json5 +++ b/cfg/Tomb1Main.json5 @@ -146,6 +146,9 @@ // Disables ingame cinematics. "disable_cine": false, + // Disables music in the main menu. + "disable_music_in_menu": false, + // Overrides game resolution. Leave at 0 or negative values to // automatically guess from the screen size. Note: these values // only override the last position in the game resolutions menu that diff --git a/src/config.c b/src/config.c index cd1c7b9bd..b0ad33da8 100644 --- a/src/config.c +++ b/src/config.c @@ -149,6 +149,7 @@ int8_t T1MReadConfigFromJson(const char *cfg_data) READ_BOOL(disable_demo, 0); READ_BOOL(disable_fmv, 0); READ_BOOL(disable_cine, 0); + READ_BOOL(disable_music_in_menu, 0); READ_BAR_SHOWING_MODE(healthbar_showing_mode, T1M_BSM_FLASHING_OR_DEFAULT); READ_BAR_SHOWING_MODE(airbar_showing_mode, T1M_BSM_DEFAULT); diff --git a/src/config.h b/src/config.h index fe312e38b..5b0f07e9f 100644 --- a/src/config.h +++ b/src/config.h @@ -64,6 +64,7 @@ typedef struct { int8_t disable_demo; int8_t disable_fmv; int8_t disable_cine; + int8_t disable_music_in_menu; int32_t resolution_width; int32_t resolution_height; } T1MConfigStruct; diff --git a/src/specific/sndpc.c b/src/specific/sndpc.c index da105b3f7..fb8a4a6eb 100644 --- a/src/specific/sndpc.c +++ b/src/specific/sndpc.c @@ -358,6 +358,10 @@ void S_MusicUnpause() // original name: CDPlay int32_t MusicPlay(int16_t track) { + if (CurrentLevel == GF.title_level_num && T1MConfig.disable_music_in_menu) { + return 0; + } + if (track < 2) { return 0; }