Skip to content

Commit c2b8fd4

Browse files
committed
Adds key pickup SFX
1 parent 7a59d15 commit c2b8fd4

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

assets/Sounds/FX/key_pickup.wav

213 KB
Binary file not shown.

src/item_builder.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,15 @@ static void
156156
pickup_silver_key(Item *item, Player *player)
157157
{
158158
gui_log("You pickup %s", item->label);
159+
mixer_play_effect(KEY_PICKUP);
159160
player->equipment.keys |= LOCK_SILVER;
160161
}
161162

162163
static void
163164
pickup_gold_key(Item *item, Player *player)
164165
{
165166
gui_log("You pickup %s", item->label);
167+
mixer_play_effect(KEY_PICKUP);
166168
player->equipment.keys |= LOCK_GOLD;
167169
}
168170

src/mixer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ load_effects(void)
8989
effects[FADE_OUT] = load_effect("Sounds/FX/fade_out.wav");
9090
effects[BURST] = load_effect("Sounds/FX/burst.wav");
9191
effects[DOOR_OPEN] = load_effect("Sounds/FX/door_open.wav");
92+
effects[KEY_PICKUP] = load_effect("Sounds/FX/key_pickup.wav");
9293
}
9394

9495
void

src/mixer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ typedef enum Fx_t {
6565
FADE_OUT,
6666
BURST,
6767
DOOR_OPEN,
68+
KEY_PICKUP,
6869
LAST_EFFECT
6970
} Fx;
7071

0 commit comments

Comments
 (0)