diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-07-02 21:31:19 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-07-02 21:31:19 +0100 |
commit | a88810c8a70c8e3a7533a266774ab61a84a9adf4 (patch) | |
tree | 9ec78cd5e20f06a6cbcbd0251e215f2ecaae71c4 /src/pickup.c | |
parent | 6e03fe85b19bc533888a4689572aab0ccf68edc4 (diff) | |
download | gold-mine-run-a88810c8a70c8e3a7533a266774ab61a84a9adf4.tar.gz gold-mine-run-a88810c8a70c8e3a7533a266774ab61a84a9adf4.zip |
Add sound support
Diffstat (limited to 'src/pickup.c')
-rw-r--r-- | src/pickup.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pickup.c b/src/pickup.c index 044e3ef..7036891 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -2,6 +2,7 @@ #include <stdlib.h> #include "vga.h" +#include "sound.h" #include "entities.h" #include "game.h" @@ -133,7 +134,10 @@ void pickup_pickaxe_init(Entity *e) void pickup_wait_update(Entity *e) { if (e->counter-- == 0) + { e->update = pickup_in_update; + sound_play_efx(EFX_WARP); + } } void pickup_in_update(Entity *e) @@ -170,6 +174,7 @@ void pickup_update(Entity *e) if (e->counter++ == MAX_TTL) { effect_out_init(e); + sound_play_efx(EFX_WARP); return; } @@ -203,5 +208,6 @@ void pickup_update(Entity *e) break; } e->used = 0; + sound_play_efx(EFX_PICKUP); } } |