From 9ee98cf0bfe52541c8ade0a4f467b5a13b88b4c4 Mon Sep 17 00:00:00 2001 From: Corwin Date: Tue, 25 Jul 2023 20:39:14 +0100 Subject: [PATCH] remove unused sounds --- examples/the-dungeon-puzzlers-lament/src/sfx.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/examples/the-dungeon-puzzlers-lament/src/sfx.rs b/examples/the-dungeon-puzzlers-lament/src/sfx.rs index f29a6dc9..bc336e13 100644 --- a/examples/the-dungeon-puzzlers-lament/src/sfx.rs +++ b/examples/the-dungeon-puzzlers-lament/src/sfx.rs @@ -8,8 +8,6 @@ const BAD_SELECTION: &[u8] = include_wav!("sfx/bad.wav"); const SELECT: &[u8] = include_wav!("sfx/select.wav"); const PLACE: &[u8] = include_wav!("sfx/place.wav"); -const BANG: &[u8] = include_wav!("sfx/bang.wav"); -const SWORD_HIT: &[u8] = include_wav!("sfx/sword_hit.wav"); const SLIME_DEATH: &[u8] = include_wav!("sfx/slime_death.wav"); const SWORD_PICKUP: &[u8] = include_wav!("sfx/sword_pickup.wav"); const WALL_HIT: &[u8] = include_wav!("sfx/wall_hit.wav"); @@ -51,7 +49,7 @@ impl<'a> Sfx<'a> { pub fn play_sound_effect(&mut self, effect: Option) { if let Some(effect) = effect { match effect { - SoundEffect::DoorFail | SoundEffect::WallHit => { + SoundEffect::WallHit => { self.mixer.play_sound(SoundChannel::new(WALL_HIT)); } SoundEffect::SlimeDie => { @@ -62,12 +60,7 @@ impl<'a> Sfx<'a> { SoundEffect::SwordPickup => { self.mixer.play_sound(SoundChannel::new(SWORD_PICKUP)); } - SoundEffect::SwordKill => { - self.mixer.play_sound(SoundChannel::new(SWORD_HIT)); - } - SoundEffect::SwordFail => { - self.mixer.play_sound(SoundChannel::new(BANG)); - } + SoundEffect::SwordKill => {} SoundEffect::KeyPickup => {} SoundEffect::DoorOpen => { self.mixer.play_sound(SoundChannel::new(DOOR_OPEN)); @@ -91,9 +84,7 @@ pub enum SoundEffect { SquidDie, SwordPickup, SwordKill, - SwordFail, KeyPickup, - DoorFail, DoorOpen, SwitchToggle, KeyDrop,