Adds key pickup SFX

This commit is contained in:
Linus Probert 2019-03-24 12:20:45 +01:00
parent 7a59d15be0
commit c2b8fd40eb
4 changed files with 4 additions and 0 deletions

Binary file not shown.

View File

@ -156,6 +156,7 @@ static void
pickup_silver_key(Item *item, Player *player)
{
gui_log("You pickup %s", item->label);
mixer_play_effect(KEY_PICKUP);
player->equipment.keys |= LOCK_SILVER;
}
@ -163,6 +164,7 @@ static void
pickup_gold_key(Item *item, Player *player)
{
gui_log("You pickup %s", item->label);
mixer_play_effect(KEY_PICKUP);
player->equipment.keys |= LOCK_GOLD;
}

View File

@ -89,6 +89,7 @@ load_effects(void)
effects[FADE_OUT] = load_effect("Sounds/FX/fade_out.wav");
effects[BURST] = load_effect("Sounds/FX/burst.wav");
effects[DOOR_OPEN] = load_effect("Sounds/FX/door_open.wav");
effects[KEY_PICKUP] = load_effect("Sounds/FX/key_pickup.wav");
}
void

View File

@ -65,6 +65,7 @@ typedef enum Fx_t {
FADE_OUT,
BURST,
DOOR_OPEN,
KEY_PICKUP,
LAST_EFFECT
} Fx;