changed logic and defaults for falling element sounds in BD engine
authorHolger Schemel <holger.schemel@virtion.de>
Sat, 25 May 2024 09:32:12 +0000 (11:32 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Sat, 25 May 2024 09:32:39 +0000 (11:32 +0200)
src/conf_snd.c
src/files.c
src/game_bd/bd_caveengine.c
src/game_bd/export_bd.h
src/game_bd/main_bd.c
src/libgame/system.h
src/screens.c

index 3b38b50d499c1f5c90cab10b98ce52fa415bc061..103058e4f7b4c51b257fcdb02a3d331574aeeacb 100644 (file)
@@ -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"                     },
index 7b2d7b2d7e728c68d090bd1c8e25d51ad752a6e6..9779f83fb687ab119b1943c09c220d4c28fb0b27 100644 (file)
@@ -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;
index ee1b4ee2f9740ba97664dba40ad1a5324e59b0d3..6d0e3fcd2c13614bfa7ad887f9d2c05f1fad1cda 100644 (file)
@@ -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.
index 2344d2d07bfa9de9917ed81486770b453c2ec527..6fe2456cd63bc3198c67c3cb26acce5743c48e48 100644 (file)
@@ -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);
index e6def9ed41643850f7e1dead0799690339f5cd08..574edc3f3eeaef91434e3058239fd613c8caab82 100644 (file)
@@ -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)
index 51d783b77ffac3508c2755e187d885be7176412e..7669474f83ff2804993121ab44ced251cea52234 100644 (file)
@@ -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;
index a31e6121f4dd28b255bf69843a11cff503a0ce54..2ed2e71aa514d0bb64edde8cd58c3a5bdf2f50b0 100644 (file)
@@ -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,           ""                              },