diff --git a/include/sndprocs.h b/include/sndprocs.h index d2f5c9d5b..cc9eb2877 100755 --- a/include/sndprocs.h +++ b/include/sndprocs.h @@ -312,10 +312,13 @@ enum sound_effect_entries { se_orc_grunt = 186, se_avian_screak = 187, se_paranoid_confirmation = 188, - se_bars_whap = 189, - se_bars_flapp = 190, - se_bars_clink = 191, - se_bars_clonk = 192, + se_bars_whang = 194, + se_bars_whap = 195, + se_bars_flapp = 196, + se_bars_clink = 197, + se_bars_clonk = 198, + se_boomerang_klonk = 199, + se_bang_weapon_side = 200, number_of_se_entries }; diff --git a/src/dig.c b/src/dig.c index 9fe99c7a1..fcc1b8ec7 100644 --- a/src/dig.c +++ b/src/dig.c @@ -279,6 +279,7 @@ dig(void) } break; case 1: + Soundeffect(se_bang_weapon_side, 100); pline("Bang! You hit with the broad side of %s!", the(xname(uwep))); wake_nearby(); diff --git a/src/mthrowu.c b/src/mthrowu.c index a5f745b4e..991635b6f 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1234,17 +1234,28 @@ hit_bars( dissolve_bars(barsx, barsy); } } else { - if (!Deaf) - pline("%s!", (obj_type == BOULDER || obj_type == HEAVY_IRON_BALL) - ? "Whang" - : harmless_missile(otmp) ? "Whap" - : is_flimsy(otmp) ? "Flapp" + if (!Deaf) { + static enum sound_effect_entries se[] = { + se_zero_invalid, + se_bars_whang, se_bars_whap, se_bars_flapp, + se_bars_clink, se_bars_clonk + }; + static const char *const barsounds[] = { + "", "Whang", "Whap", "Flapp", "Clink", "Clonk" + }; + int bsindx = (obj_type == BOULDER || obj_type == HEAVY_IRON_BALL) + ? 1 + : harmless_missile(otmp) ? 2 + : is_flimsy(otmp) ? 3 : (otmp->oclass == COIN_CLASS || objects[obj_type].oc_material == GOLD || objects[obj_type].oc_material == SILVER) - ? "Clink" - : "Clonk"); + ? 4 + : SIZE(barsounds) - 1; + Soundeffect(se[bsindx], 100); + pline("%s!", barsounds[bsindx]); + } if (!(harmless_missile(otmp) || is_flimsy(otmp))) noise = 4 * 4; diff --git a/src/sounds.c b/src/sounds.c index e51218c31..c3d95970e 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -2040,10 +2040,13 @@ static const struct soundeffect_automapping { se_orc_grunt, "orc_grunt" }, { se_avian_screak, "avian_screak" }, { se_paranoid_confirmation, "paranoid_confirmation" }, + { se_bars_whang, "bars_whang" }, { se_bars_whap, "bars_whap" }, { se_bars_flapp, "bars_flapp" }, { se_bars_clink, "bars_clink" }, { se_bars_clonk, "bars_clonk" }, + { se_boomerang_klonk, "boomerang_klonk" }, + { se_bang_weapon_side, "bang_weapon_side" }, }; static const char *semap_basenames[SIZE(se_mappings_init)]; diff --git a/src/zap.c b/src/zap.c index 31a3a678d..58b0bef75 100644 --- a/src/zap.c +++ b/src/zap.c @@ -3852,6 +3852,7 @@ boomhit(struct obj *obj, coordxy dx, coordxy dy) tmp_at(gb.bhitpos.x, gb.bhitpos.y); delay_output(); if (IS_SINK(levl[gb.bhitpos.x][gb.bhitpos.y].typ)) { + Soundeffect(se_boomerang_klonk, 75); if (!Deaf) pline("Klonk!"); wake_nearto(gb.bhitpos.x, gb.bhitpos.y, 20);