aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_key_loop.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 21:59:13 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 21:59:13 +0100
commitb135ba89ccceffa88356cc25f256b0cb2adbd88c (patch)
tree1e87c98d28857abfea2c5199dfdf77516ab28898 /src/ft_key_loop.c
parentRework in progress (diff)
download42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.gz
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.bz2
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.xz
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.zst
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.zip
The og OOP
Diffstat (limited to 'src/ft_key_loop.c')
-rw-r--r--src/ft_key_loop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c
index f44da13..cf412f7 100644
--- a/src/ft_key_loop.c
+++ b/src/ft_key_loop.c
@@ -86,7 +86,7 @@ int
cl->key_ptr[cl->key_input[i]](cl);
if (cl->key_input[i] >= 0 && cl->key_input[i] <= 3)
{
- ft_sfx_footstep(cl);
+ cl->sfx[1].sfx_play(cl->sfx);
ft_collision(old_y, old_x, cl->key_input[i], cl);
ft_find_item(&cl->plist, &cl->mlist, cl);
if (cl->mlist.isnlvl)
@@ -94,7 +94,7 @@ int
if ((uint32_t)cl->plist.pos_x == cl->mlist.nlx &&
(uint32_t)cl->plist.pos_y == cl->mlist.nly)
{
- ft_sfx_new_level(cl);
+ cl->sfx[2].sfx_play(cl->sfx);
return ((ft_warp_level(cl->mlist.nlevel_path, cl) < 0) ?
(ft_exit(FT_RET_FAILED_STRUCTS, cl)) : (0));
}