From 92989af5d5884cbc8a1a9a62c9d05e109eaf78d0 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 16 Nov 2003 19:14:18 +0100 Subject: [PATCH] rnd-20031116-2-src --- src/Makefile | 4 +- src/conf_g2m.c | 63 ++++++++++++++++++++++++ src/conf_g2s.c | 59 +++++++++++++++++++++++ src/conf_mus.c | 5 +- src/conf_mus.h | 3 +- src/conf_snd.c | 8 ++-- src/conf_snd.h | 10 ++-- src/conftime.h | 2 +- src/game.c | 6 +-- src/init.c | 114 +++++++++++++++++++++++++++++++------------- src/libgame/sound.c | 18 ++++++- src/main.c | 6 ++- src/main.h | 54 +++++++++++---------- src/screens.c | 74 ++++++++++++++-------------- 14 files changed, 315 insertions(+), 111 deletions(-) create mode 100644 src/conf_g2m.c create mode 100644 src/conf_g2s.c diff --git a/src/Makefile b/src/Makefile index dd6896bf..2aa08a2e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -176,7 +176,9 @@ CNFS = conf_gfx.h \ conf_e2g.c \ conf_esg.c \ conf_e2s.c \ - conf_fnt.c + conf_fnt.c \ + conf_g2s.c \ + conf_g2m.c CNFS_CMD = ../Scripts/create_element_defs.pl diff --git a/src/conf_g2m.c b/src/conf_g2m.c new file mode 100644 index 00000000..1c186459 --- /dev/null +++ b/src/conf_g2m.c @@ -0,0 +1,63 @@ +/*********************************************************** +* Rocks'n'Diamonds -- McDuffin Strikes Back! * +*----------------------------------------------------------* +* (c) 1995-2002 Artsoft Entertainment * +* Holger Schemel * +* Detmolder Strasse 189 * +* 33604 Bielefeld * +* Germany * +* e-mail: info@artsoft.org * +*----------------------------------------------------------* +* conf_g2m.c * +***********************************************************/ + +/* ----- this file was automatically generated -- do not edit by hand ----- */ + +#ifndef CONF_G2M_C +#define CONF_G2M_C + +/* values for gamemode/music mapping configuration */ + +static struct +{ + int gamemode; + + int music; +} +gamemode_to_music[] = +{ + { + -1, + MUS_BACKGROUND + }, + { + GFX_SPECIAL_ARG_MAIN, + MUS_BACKGROUND_MAIN + }, + { + GFX_SPECIAL_ARG_LEVELS, + MUS_BACKGROUND_LEVELS + }, + { + GFX_SPECIAL_ARG_SCORES, + MUS_BACKGROUND_SCORES + }, + { + GFX_SPECIAL_ARG_EDITOR, + MUS_BACKGROUND_EDITOR + }, + { + GFX_SPECIAL_ARG_INFO, + MUS_BACKGROUND_INFO + }, + { + GFX_SPECIAL_ARG_SETUP, + MUS_BACKGROUND_SETUP + }, + { + -1, + -1 + }, +}; + +#endif /* CONF_G2M_C */ diff --git a/src/conf_g2s.c b/src/conf_g2s.c new file mode 100644 index 00000000..7ebfff0c --- /dev/null +++ b/src/conf_g2s.c @@ -0,0 +1,59 @@ +/*********************************************************** +* Rocks'n'Diamonds -- McDuffin Strikes Back! * +*----------------------------------------------------------* +* (c) 1995-2002 Artsoft Entertainment * +* Holger Schemel * +* Detmolder Strasse 189 * +* 33604 Bielefeld * +* Germany * +* e-mail: info@artsoft.org * +*----------------------------------------------------------* +* conf_g2s.c * +***********************************************************/ + +/* ----- this file was automatically generated -- do not edit by hand ----- */ + +#ifndef CONF_G2S_C +#define CONF_G2S_C + +/* values for gamemode/sound mapping configuration */ + +static struct +{ + int gamemode; + + int sound; +} +gamemode_to_sound[] = +{ + { + GFX_SPECIAL_ARG_MAIN, + SND_BACKGROUND_MAIN + }, + { + GFX_SPECIAL_ARG_LEVELS, + SND_BACKGROUND_LEVELS + }, + { + GFX_SPECIAL_ARG_SCORES, + SND_BACKGROUND_SCORES + }, + { + GFX_SPECIAL_ARG_EDITOR, + SND_BACKGROUND_EDITOR + }, + { + GFX_SPECIAL_ARG_INFO, + SND_BACKGROUND_INFO + }, + { + GFX_SPECIAL_ARG_SETUP, + SND_BACKGROUND_SETUP + }, + { + -1, + -1 + }, +}; + +#endif /* CONF_G2S_C */ diff --git a/src/conf_mus.c b/src/conf_mus.c index 6fe7f9da..469c7ed9 100644 --- a/src/conf_mus.c +++ b/src/conf_mus.c @@ -35,7 +35,10 @@ struct ConfigInfo music_config[] = { "background.EDITOR", UNDEFINED_FILENAME }, { "background.INFO", "rhythmloop.wav" }, { "background.SETUP", UNDEFINED_FILENAME }, - { "background.PLAYING", UNDEFINED_FILENAME }, + + /* there is no definition for "background.PLAYING", because this would + prevent selecting music from music directory that is not defined in + "musicinfo.conf", when no default music is defined here */ { NULL, NULL } }; diff --git a/src/conf_mus.h b/src/conf_mus.h index ea12090f..e6ba90e9 100644 --- a/src/conf_mus.h +++ b/src/conf_mus.h @@ -25,8 +25,7 @@ #define MUS_BACKGROUND_EDITOR 4 #define MUS_BACKGROUND_INFO 5 #define MUS_BACKGROUND_SETUP 6 -#define MUS_BACKGROUND_PLAYING 7 -#define NUM_MUSIC_FILES 8 +#define NUM_MUSIC_FILES 7 #endif /* CONF_MUS_H */ diff --git a/src/conf_snd.c b/src/conf_snd.c index 2a2d65af..9d028a5a 100644 --- a/src/conf_snd.c +++ b/src/conf_snd.c @@ -232,11 +232,13 @@ struct ConfigInfo sound_config[] = { "door.opening", "oeffnen.wav" }, { "door.closing", "oeffnen.wav" }, + { "background.MAIN", UNDEFINED_FILENAME }, + { "background.LEVELS", UNDEFINED_FILENAME }, { "background.SCORES", "halloffame.wav" }, { "background.SCORES.mode_loop", "false" }, - - { "background.INFO", "rhythmloop.wav" }, - { "background.INFO.mode_loop", "true" }, + { "background.EDITOR", UNDEFINED_FILENAME }, + { "background.INFO", UNDEFINED_FILENAME }, + { "background.SETUP", UNDEFINED_FILENAME }, #if 0 { "[not used]", "antigrav.wav" }, diff --git a/src/conf_snd.h b/src/conf_snd.h index 7cf2f25e..10abc084 100644 --- a/src/conf_snd.h +++ b/src/conf_snd.h @@ -195,9 +195,13 @@ #define SND_GAME_SOKOBAN_SOLVING 174 #define SND_DOOR_OPENING 175 #define SND_DOOR_CLOSING 176 -#define SND_BACKGROUND_SCORES 177 -#define SND_BACKGROUND_INFO 178 +#define SND_BACKGROUND_MAIN 177 +#define SND_BACKGROUND_LEVELS 178 +#define SND_BACKGROUND_SCORES 179 +#define SND_BACKGROUND_EDITOR 180 +#define SND_BACKGROUND_INFO 181 +#define SND_BACKGROUND_SETUP 182 -#define NUM_SOUND_FILES 179 +#define NUM_SOUND_FILES 183 #endif /* CONF_SND_H */ diff --git a/src/conftime.h b/src/conftime.h index a2246cbf..1199c31b 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-11-16 04:25]" +#define COMPILE_DATE_STRING "[2003-11-16 19:11]" diff --git a/src/game.c b/src/game.c index 27aa2b40..1ddc7937 100644 --- a/src/game.c +++ b/src/game.c @@ -8610,10 +8610,10 @@ static void StopLevelSoundActionIfLoop(int x, int y, int action) static void PlayLevelMusic() { #if 1 - if (levelset.music[game_status][level_nr] != MUS_UNDEFINED) - PlayMusic(levelset.music[game_status][level_nr]); + if (levelset.music[level_nr] != MUS_UNDEFINED) + PlayMusic(levelset.music[level_nr]); /* from config file */ else - PlayMusic(-(level_nr + 1)); + PlayMusic(-(level_nr + 1)); /* from music dir */ #else PlayMusic(level_nr); #endif diff --git a/src/init.c b/src/init.c index 301f0022..c0e3fce0 100644 --- a/src/init.c +++ b/src/init.c @@ -30,6 +30,8 @@ #include "conf_esg.c" /* include auto-generated data structure definitions */ #include "conf_e2s.c" /* include auto-generated data structure definitions */ #include "conf_fnt.c" /* include auto-generated data structure definitions */ +#include "conf_g2s.c" /* include auto-generated data structure definitions */ +#include "conf_g2m.c" /* include auto-generated data structure definitions */ #define CONFIG_TOKEN_FONT_INITIAL "font.initial" @@ -1183,6 +1185,39 @@ static void InitElementSoundInfo() } } +static void InitGameModeSoundInfo() +{ + int i; + + /* set values to -1 to identify later as "uninitialized" values */ + for (i=0; i < NUM_SPECIAL_GFX_ARGS; i++) + menu.sound[i] = -1; + + /* initialize gamemode/sound mapping from static configuration */ + for (i=0; gamemode_to_sound[i].sound > -1; i++) + { + int gamemode = gamemode_to_sound[i].gamemode; + int sound = gamemode_to_sound[i].sound; + + if (gamemode < 0) + gamemode = GAME_MODE_DEFAULT; + + menu.sound[gamemode] = sound; + } + + /* now set all '-1' values to levelset specific default values */ + for (i=0; i < NUM_SPECIAL_GFX_ARGS; i++) + if (menu.sound[i] == -1) + menu.sound[i] = menu.sound[GAME_MODE_DEFAULT]; + +#if 0 + /* TEST ONLY */ + for (i=0; i < NUM_SPECIAL_GFX_ARGS; i++) + if (menu.sound[i] != -1) + printf("::: menu.sound[%d] == %d\n", i, menu.sound[i]); +#endif +} + static void set_sound_parameters(int sound, char **parameter_raw) { int parameter[NUM_SND_ARGS]; @@ -1335,34 +1370,34 @@ static void InitSoundInfo() #endif } -static void InitLevelsetMusicInfo() +static void InitGameModeMusicInfo() { struct PropertyMapping *property_mapping = getMusicListPropertyMapping(); int num_property_mappings = getMusicListPropertyMappingSize(); - int i, j; + int default_levelset_music = -1; + int i; /* set values to -1 to identify later as "uninitialized" values */ + for (i=0; i < MAX_LEVELS; i++) + levelset.music[i] = -1; for (i=0; i < NUM_SPECIAL_GFX_ARGS; i++) - for (j=0; j < MAX_LEVELS; j++) - levelset.music[i][j] = -1; + menu.music[i] = -1; -#if 0 /* initialize gamemode/music mapping from static configuration */ - for (i=0; gamemode_to_music[i].element > -1; i++) + for (i=0; gamemode_to_music[i].music > -1; i++) { int gamemode = gamemode_to_music[i].gamemode; - int level = gamemode_to_music[i].level; int music = gamemode_to_music[i].music; - if (gamemode < 0) - gamemode = 0; +#if 0 + printf("::: gamemode == %d, music == %d\n", gamemode, music); +#endif - if (level < 0) - level = 0; + if (gamemode < 0) + gamemode = GAME_MODE_DEFAULT; - levelset.music[gamemode][level] = music; + menu.music[gamemode] = music; } -#endif /* initialize gamemode/music mapping from dynamic configuration */ for (i=0; i < num_property_mappings; i++) @@ -1372,39 +1407,51 @@ static void InitLevelsetMusicInfo() int level = property_mapping[i].ext2_index; int music = property_mapping[i].artwork_index; +#if 0 + printf("::: prefix == %d, gamemode == %d, level == %d, music == %d\n", + prefix, gamemode, level, music); +#endif + if (prefix < 0 || prefix >= NUM_MUSIC_PREFIXES) continue; if (gamemode < 0) - gamemode = 0; + gamemode = GAME_MODE_DEFAULT; - if (level < 0) + /* level specific music only allowed for in-game music */ + if (level != -1 && gamemode == GAME_MODE_DEFAULT) + gamemode = GAME_MODE_PLAYING; + + if (level == -1) + { level = 0; + default_levelset_music = music; + } - levelset.music[gamemode][level] = music; + if (gamemode == GAME_MODE_PLAYING || gamemode == GAME_MODE_DEFAULT) + levelset.music[level] = music; + if (gamemode != GAME_MODE_PLAYING) + menu.music[gamemode] = music; } - /* now set all '-1' values to levelset specific default values */ + /* now set all '-1' values to menu specific default values */ + /* (undefined values of "levelset.music[]" might stay at "-1" to + allow dynamic selection of music files from music directory!) */ + for (i=0; i < MAX_LEVELS; i++) + if (levelset.music[i] == -1) + levelset.music[i] = default_levelset_music; for (i=0; i < NUM_SPECIAL_GFX_ARGS; i++) - { - for (j=0; j < MAX_LEVELS; j++) - { - /* generic default music */ - int default_music = levelset.music[i][0]; /* may still be -1 */ - - /* no music for this specific game mode and level -- use default music */ - if (levelset.music[i][j] == -1) - levelset.music[i][j] = default_music; - } - } + if (menu.music[i] == -1) + menu.music[i] = menu.music[GAME_MODE_DEFAULT]; #if 0 /* TEST ONLY */ + for (i=0; i < MAX_LEVELS; i++) + if (levelset.music[i] != -1) + printf("::: levelset.music[%d] == %d\n", i, levelset.music[i]); for (i=0; i < NUM_SPECIAL_GFX_ARGS; i++) - for (j=0; j < MAX_LEVELS; j++) - if (levelset.music[i][j] != -1) - printf("::: levelset.music[%d][%d] == %d\n", - i, j, levelset.music[i][j]); + if (menu.music[i] != -1) + printf("::: menu.music[%d] == %d\n", i, menu.music[i]); #endif } @@ -1481,6 +1528,7 @@ static void ReinitializeSounds() { InitSoundInfo(); /* sound properties mapping */ InitElementSoundInfo(); /* element game sound mapping */ + InitGameModeSoundInfo(); /* game mode sound mapping */ InitPlayLevelSound(); /* internal game sound settings */ } @@ -1488,7 +1536,7 @@ static void ReinitializeSounds() static void ReinitializeMusic() { InitMusicInfo(); /* music properties mapping */ - InitLevelsetMusicInfo(); /* levelset music mapping */ + InitGameModeMusicInfo(); /* game mode music mapping */ } void InitElementPropertiesStatic() diff --git a/src/libgame/sound.c b/src/libgame/sound.c index 8b01135f..0e38c419 100644 --- a/src/libgame/sound.c +++ b/src/libgame/sound.c @@ -870,7 +870,7 @@ static void Mixer_InsertSound(SoundControl snd_ctrl) } else { - if (snd_ctrl.nr >= num_sounds) + if (snd_ctrl.nr < 0 || snd_ctrl.nr >= num_sounds) return; snd_info = getSoundInfoEntryFromSoundID(snd_ctrl.nr); @@ -1866,6 +1866,20 @@ static void *Load_MOD(char *filename) #endif } +static void *Load_WAV_or_MOD(char *filename) +{ + char *basename = strrchr(filename, '/'); + + basename = (basename != NULL ? basename + 1 : filename); + + if (FileIsSound(basename)) + return Load_WAV(filename); + else if (FileIsMusic(basename)) + return Load_MOD(filename); + else + return NULL; +} + void LoadCustomMusic_NoConf(void) { static boolean draw_init_text = TRUE; /* only draw at startup */ @@ -2183,7 +2197,7 @@ void InitMusicList(struct ConfigInfo *config_list, int num_file_list_entries, /* ---------- initialize artwork loading/freeing functions ---------- */ - music_info->load_artwork = Load_MOD; + music_info->load_artwork = Load_WAV_or_MOD; music_info->free_artwork = FreeMusic; } diff --git a/src/main.c b/src/main.c index 076c334f..83a9f6c6 100644 --- a/src/main.c +++ b/src/main.c @@ -3727,8 +3727,9 @@ struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS + 1] = { NULL, 0 } }; -struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1] = +struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] = { + { ".[DEFAULT]", GAME_MODE_DEFAULT, }, { ".MAIN", GAME_MODE_MAIN, }, { ".LEVELS", GAME_MODE_LEVELS }, { ".SCORES", GAME_MODE_SCORES, }, @@ -3740,6 +3741,9 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1] = { ".PREVIEW", GAME_MODE_PSEUDO_PREVIEW, }, { ".CRUMBLED", GAME_MODE_PSEUDO_CRUMBLED, }, + /* empty suffix always matches -- check as last entry in InitMusicInfo() */ + { "", GAME_MODE_DEFAULT, }, + { NULL, 0, } }; diff --git a/src/main.h b/src/main.h index 801fec4b..b3a28ffa 100644 --- a/src/main.h +++ b/src/main.h @@ -929,18 +929,19 @@ #define NUM_ACTIONS 34 /* values for special image configuration suffixes (must match game mode) */ -#define GFX_SPECIAL_ARG_MAIN 0 -#define GFX_SPECIAL_ARG_LEVELS 1 -#define GFX_SPECIAL_ARG_SCORES 2 -#define GFX_SPECIAL_ARG_EDITOR 3 -#define GFX_SPECIAL_ARG_INFO 4 -#define GFX_SPECIAL_ARG_SETUP 5 -#define GFX_SPECIAL_ARG_PLAYING 6 -#define GFX_SPECIAL_ARG_DOOR 7 -#define GFX_SPECIAL_ARG_PREVIEW 8 -#define GFX_SPECIAL_ARG_CRUMBLED 9 +#define GFX_SPECIAL_ARG_DEFAULT 0 +#define GFX_SPECIAL_ARG_MAIN 1 +#define GFX_SPECIAL_ARG_LEVELS 2 +#define GFX_SPECIAL_ARG_SCORES 3 +#define GFX_SPECIAL_ARG_EDITOR 4 +#define GFX_SPECIAL_ARG_INFO 5 +#define GFX_SPECIAL_ARG_SETUP 6 +#define GFX_SPECIAL_ARG_PLAYING 7 +#define GFX_SPECIAL_ARG_DOOR 8 +#define GFX_SPECIAL_ARG_PREVIEW 9 +#define GFX_SPECIAL_ARG_CRUMBLED 10 -#define NUM_SPECIAL_GFX_ARGS 10 +#define NUM_SPECIAL_GFX_ARGS 11 /* values for image configuration suffixes */ @@ -1025,22 +1026,24 @@ #define NUM_INITIAL_FONTS 4 /* values for game_status (must match special image configuration suffixes) */ -#define GAME_MODE_MAIN 0 -#define GAME_MODE_LEVELS 1 -#define GAME_MODE_SCORES 2 -#define GAME_MODE_EDITOR 3 -#define GAME_MODE_INFO 4 -#define GAME_MODE_SETUP 5 -#define GAME_MODE_PLAYING 6 -#define GAME_MODE_PSEUDO_DOOR 7 -#define GAME_MODE_PSEUDO_PREVIEW 8 -#define GAME_MODE_PSEUDO_CRUMBLED 9 +#define GAME_MODE_DEFAULT 0 +#define GAME_MODE_MAIN 1 +#define GAME_MODE_LEVELS 2 +#define GAME_MODE_SCORES 3 +#define GAME_MODE_EDITOR 4 +#define GAME_MODE_INFO 5 +#define GAME_MODE_SETUP 6 +#define GAME_MODE_PLAYING 7 +#define GAME_MODE_PSEUDO_DOOR 8 +#define GAME_MODE_PSEUDO_PREVIEW 9 +#define GAME_MODE_PSEUDO_CRUMBLED 10 /* there are no special config file suffixes for these modes */ -#define GAME_MODE_PSEUDO_TYPENAME 10 -#define GAME_MODE_QUIT 11 +#define GAME_MODE_PSEUDO_TYPENAME 11 +#define GAME_MODE_QUIT 12 /* special definitions currently only used for custom artwork configuration */ +#define MUSIC_PREFIX_BACKGROUND 0 #define NUM_MUSIC_PREFIXES 1 #define MAX_LEVELS 1000 @@ -1120,6 +1123,9 @@ struct MenuInfo int list_size_default; int list_size[NUM_SPECIAL_GFX_ARGS]; + + int sound[NUM_SPECIAL_GFX_ARGS]; + int music[NUM_SPECIAL_GFX_ARGS]; }; struct DoorInfo @@ -1198,7 +1204,7 @@ struct PlayerInfo struct LevelSetInfo { - int music[NUM_SPECIAL_GFX_ARGS][MAX_LEVELS]; + int music[MAX_LEVELS]; }; struct LevelInfo diff --git a/src/screens.c b/src/screens.c index 97eabb96..d82f3bd2 100644 --- a/src/screens.c +++ b/src/screens.c @@ -139,20 +139,40 @@ static void drawChooseTreeCursor(int ypos, int color) game_status = last_game_status; /* restore current game status */ } -static void PlaySound_Menu_Start(int sound) +static void PlayMenuSound() { + int sound = menu.sound[game_status]; + + if (sound == SND_UNDEFINED) + return; + if (sound_info[sound].loop) PlaySoundLoop(sound); else PlaySound(sound); } -static void PlaySound_Menu_Continue(int sound) +static void PlayMenuSoundIfLoop() { + int sound = menu.sound[game_status]; + + if (sound == SND_UNDEFINED) + return; + if (sound_info[sound].loop) PlaySoundLoop(sound); } +static void PlayMenuMusic() +{ + int music = menu.music[game_status]; + + if (music == MUS_UNDEFINED) + return; + + PlayMusic(music); +} + void DrawHeadline() { int text1_width = getTextWidth(PROGRAM_TITLE_STRING, FONT_TITLE_1); @@ -294,6 +314,9 @@ void DrawMainMenu() LoadTape(level_nr); DrawCompleteVideoDisplay(); + PlayMenuSound(); + PlayMenuMusic(); + OpenDoor(DOOR_CLOSE_1 | DOOR_OPEN_2); #if 0 @@ -1063,16 +1086,8 @@ void DrawHelpScreen() FadeToFront(); InitAnimation(); -#if 1 - PlaySound(SND_BACKGROUND_INFO); - PlayMusic(MUS_BACKGROUND_INFO); -#else -#if 0 - PlaySoundLoop(SND_BACKGROUND_INFO); -#else - PlaySound_Menu_Start(SND_BACKGROUND_INFO); -#endif -#endif + PlayMenuSound(); + PlayMenuMusic(); } void HandleHelpScreen(int button) @@ -1129,16 +1144,7 @@ void HandleHelpScreen(int button) DrawHelpScreenElAction(helpscreen_state * MAX_HELPSCREEN_ELS); } - /* !!! workaround for playing "music" that is really a sound loop (and - must therefore periodically be reactivated with the current sound - engine !!! */ -#if 0 -#if 0 - PlaySoundLoop(SND_BACKGROUND_INFO); -#else - PlaySound_Menu_Continue(SND_BACKGROUND_INFO); -#endif -#endif + PlayMenuSoundIfLoop(); } DoAnimation(); @@ -1556,6 +1562,9 @@ void DrawChooseLevel() SetMainBackgroundImage(IMG_BACKGROUND_LEVELS); DrawChooseTree(&leveldir_current); + + PlayMenuSound(); + PlayMenuMusic(); } void HandleChooseLevel(int mx, int my, int dx, int dy, int button) @@ -1580,16 +1589,8 @@ void DrawHallOfFame(int highlight_position) HandleHallOfFame(highlight_position,0, 0,0, MB_MENU_INITIALIZE); -#if 1 - PlaySound(SND_BACKGROUND_SCORES); - PlayMusic(MUS_BACKGROUND_SCORES); -#else -#if 0 - PlaySound(SND_BACKGROUND_SCORES); -#else - PlaySound_Menu_Start(SND_BACKGROUND_SCORES); -#endif -#endif + PlayMenuSound(); + PlayMenuMusic(); } static void drawHallOfFameList(int first_entry, int highlight_position) @@ -1674,12 +1675,8 @@ void HandleHallOfFame(int mx, int my, int dx, int dy, int button) DrawMainMenu(); } -#if 0 -#if 1 if (game_status == GAME_MODE_SCORES) - PlaySound_Menu_Continue(SND_BACKGROUND_SCORES); -#endif -#endif + PlayMenuSoundIfLoop(); DoAnimation(); BackToFront(); @@ -2780,6 +2777,9 @@ void DrawSetupScreen() DrawChooseTree(&artwork.mus_current); else DrawSetupScreen_Generic(); + + PlayMenuSound(); + PlayMenuMusic(); } void HandleSetupScreen(int mx, int my, int dx, int dy, int button) -- 2.34.1