From a88810c8a70c8e3a7533a266774ab61a84a9adf4 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sun, 2 Jul 2023 21:31:19 +0100 Subject: Add sound support --- src/pickup.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/pickup.c') 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 #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); } } -- cgit v1.2.3