From: Holger Schemel Date: Sat, 25 May 2024 09:32:12 +0000 (+0200) Subject: changed logic and defaults for falling element sounds in BD engine X-Git-Tag: 4.4.0.0-test-2~20 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e4e2346cab8fe2f81bcab90fbfb6e4683c675332;p=rocksndiamonds.git changed logic and defaults for falling element sounds in BD engine --- diff --git a/src/conf_snd.c b/src/conf_snd.c index 3b38b50d..103058e4 100644 --- a/src/conf_snd.c +++ b/src/conf_snd.c @@ -64,30 +64,30 @@ struct ConfigInfo sound_config[] = { "bd_firefly.waiting", "roehr.wav" }, // sounds for Boulder Dash style elements and actions (native game engine) - { "bdx_sand_ball.falling", UNDEFINED_FILENAME }, + { "bdx_sand_ball.falling", "schlurf.wav" }, { "bdx_sand_ball.impact", "schlurf.wav" }, - { "bdx_sand_loose.falling", UNDEFINED_FILENAME }, + { "bdx_sand_loose.falling", "schlurf.wav" }, { "bdx_sand_loose.impact", "schlurf.wav" }, { "bdx_diamond.collecting", "pong.wav" }, - { "bdx_diamond.falling", UNDEFINED_FILENAME }, + { "bdx_diamond.falling", "pling.wav" }, { "bdx_diamond.impact", "pling.wav" }, { "bdx_flying_diamond.collecting", "pong.wav" }, - { "bdx_flying_diamond.falling", UNDEFINED_FILENAME }, + { "bdx_flying_diamond.falling", "pling.wav" }, { "bdx_flying_diamond.impact", "pling.wav" }, { "bdx_rock.pushing", "pusch.wav" }, - { "bdx_rock.falling", UNDEFINED_FILENAME }, + { "bdx_rock.falling", "klopf.wav" }, { "bdx_rock.impact", "klopf.wav" }, { "bdx_flying_rock.pushing", "pusch.wav" }, - { "bdx_flying_rock.falling", UNDEFINED_FILENAME }, + { "bdx_flying_rock.falling", "klopf.wav" }, { "bdx_flying_rock.impact", "klopf.wav" }, { "bdx_mega_rock.pushing", "pusch.wav" }, - { "bdx_mega_rock.falling", UNDEFINED_FILENAME }, + { "bdx_mega_rock.falling", "klopf.wav" }, { "bdx_mega_rock.impact", "klopf.wav" }, { "bdx_waiting_rock.pushing", "pusch.wav" }, { "bdx_chasing_rock.pushing", "pusch.wav" }, { "bdx_nut.pushing", "knurk.wav" }, { "bdx_nut.breaking", "knack.wav" }, - { "bdx_nut.falling", UNDEFINED_FILENAME }, + { "bdx_nut.falling", "klumpf.wav" }, { "bdx_nut.impact", "klumpf.wav" }, { "bdx_nitro_pack.pushing", "pusch.wav" }, { "bdx_nitro_pack.impact", "klopf.wav" }, diff --git a/src/files.c b/src/files.c index 7b2d7b2d..9779f83f 100644 --- a/src/files.c +++ b/src/files.c @@ -10846,7 +10846,7 @@ static struct TokenInfo global_setup_tokens[] = }, { TYPE_SWITCH_3_STATES, - &setup.bd_skip_falling_sounds, "bd_skip_falling_sounds" + &setup.bd_falling_sounds, "bd_falling_sounds" }, { TYPE_INTEGER, @@ -11713,7 +11713,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->bd_smooth_movements = STATE_TRUE; si->bd_pushing_graphics = STATE_TRUE; si->bd_up_down_graphics = STATE_TRUE; - si->bd_skip_falling_sounds = STATE_TRUE; + si->bd_falling_sounds = STATE_AUTO; si->bd_palette_c64 = GD_DEFAULT_PALETTE_C64; si->bd_palette_c64dtv = GD_DEFAULT_PALETTE_C64DTV; si->bd_palette_atari = GD_DEFAULT_PALETTE_ATARI; diff --git a/src/game_bd/bd_caveengine.c b/src/game_bd/bd_caveengine.c index ee1b4ee2..6d0e3fcd 100644 --- a/src/game_bd/bd_caveengine.c +++ b/src/game_bd/bd_caveengine.c @@ -136,7 +136,7 @@ static inline boolean el_can_fall(const int element) static void play_sound_of_element(GdCave *cave, GdElement element, int x, int y) { // check if sound should be skipped for falling elements (and only be played on impact) - if (el_can_fall(element) && skip_bd_falling_sounds()) + if (el_can_fall(element) && !use_bd_falling_sounds()) return; // stone and diamond fall sounds. diff --git a/src/game_bd/export_bd.h b/src/game_bd/export_bd.h index 2344d2d0..6fe2456c 100644 --- a/src/game_bd/export_bd.h +++ b/src/game_bd/export_bd.h @@ -121,7 +121,7 @@ boolean use_native_bd_graphics_engine(void); boolean use_bd_smooth_movements(void); boolean use_bd_pushing_graphics(void); boolean use_bd_up_down_graphics(void); -boolean skip_bd_falling_sounds(void); +boolean use_bd_falling_sounds(void); Bitmap **GetTitleScreenBitmaps_BD(void); void CoverScreen_BD(void); diff --git a/src/game_bd/main_bd.c b/src/game_bd/main_bd.c index e6def9ed..574edc3f 100644 --- a/src/game_bd/main_bd.c +++ b/src/game_bd/main_bd.c @@ -474,11 +474,11 @@ boolean use_bd_up_down_graphics(void) (setup.bd_up_down_graphics == STATE_AUTO && !use_native_bd_graphics_engine())); } -// check if skipping falling sounds selected in setup menu -boolean skip_bd_falling_sounds(void) +// check if element falling sounds selected in setup menu +boolean use_bd_falling_sounds(void) { - return ((setup.bd_skip_falling_sounds == STATE_TRUE) || - (setup.bd_skip_falling_sounds == STATE_AUTO && !game.use_native_bd_sound_engine)); + return ((setup.bd_falling_sounds == STATE_TRUE) || + (setup.bd_falling_sounds == STATE_AUTO && game.use_native_bd_sound_engine)); } Bitmap **GetTitleScreenBitmaps_BD(void) diff --git a/src/libgame/system.h b/src/libgame/system.h index 51d783b7..7669474f 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1530,7 +1530,7 @@ struct SetupInfo int bd_smooth_movements; // not boolean -- can also be "MODE_AUTO" int bd_pushing_graphics; // not boolean -- can also be "MODE_AUTO" int bd_up_down_graphics; // not boolean -- can also be "MODE_AUTO" - int bd_skip_falling_sounds; // not boolean -- can also be "MODE_AUTO" + int bd_falling_sounds; // not boolean -- can also be "MODE_AUTO" int bd_palette_c64; int bd_palette_c64dtv; int bd_palette_atari; diff --git a/src/screens.c b/src/screens.c index a31e6121..2ed2e71a 100644 --- a/src/screens.c +++ b/src/screens.c @@ -7993,7 +7993,7 @@ static struct TokenInfo setup_info_engines[] = { TYPE_YES_NO_AUTO, &setup.bd_smooth_movements, "Smooth Element Movement:" }, { TYPE_YES_NO_AUTO, &setup.bd_pushing_graphics, "Use Player Pushing Graphics:" }, { TYPE_YES_NO_AUTO, &setup.bd_up_down_graphics, "Use Player Up/Down Graphics:" }, - { TYPE_YES_NO_AUTO, &setup.bd_skip_falling_sounds, "Mute Double Falling Sounds:" }, + { TYPE_YES_NO_AUTO, &setup.bd_falling_sounds, "Double Falling Sounds:" }, { TYPE_SWITCH, &setup.bd_show_invisible_outbox,"Show invisible outbox:" }, { TYPE_ENTER_LIST, &execSetupChoosePaletteC64, "Color Palette (C64):" }, { TYPE_STRING, &bd_palette_c64_text, "" },