diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-14 01:13:23 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-14 01:13:23 +0100 |
commit | 47c6c125c7095bae50188376d8d8d10fe8b2b1c8 (patch) | |
tree | 5d4554ed336a70e0ca8e9d62ed764ff131a59330 /src | |
parent | Removed footsteps, in progress (diff) | |
download | 42-cub3d-47c6c125c7095bae50188376d8d8d10fe8b2b1c8.tar.gz 42-cub3d-47c6c125c7095bae50188376d8d8d10fe8b2b1c8.tar.bz2 42-cub3d-47c6c125c7095bae50188376d8d8d10fe8b2b1c8.tar.xz 42-cub3d-47c6c125c7095bae50188376d8d8d10fe8b2b1c8.tar.zst 42-cub3d-47c6c125c7095bae50188376d8d8d10fe8b2b1c8.zip |
Better than nothing
Diffstat (limited to 'src')
-rw-r--r-- | src/ft_init_lists.c | 1 | ||||
-rw-r--r-- | src/ft_key_loop.c | 3 | ||||
-rw-r--r-- | src/ft_parse_map.c | 3 | ||||
-rw-r--r-- | src/ft_suffer_animation.c | 2 |
4 files changed, 2 insertions, 7 deletions
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index af79b45..5726a5b 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -80,7 +80,6 @@ static int8_t cl->rlist = ft_init_s_ray(); if (ft_init_sfx(&cl->sfx) < 0) return (-1); - cl->plist.isdead = 0; cl->currlvl = 0; cl->walltexgood = 0; ft_init_funptr(cl); diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c index dc3a65d..c16655e 100644 --- a/src/ft_key_loop.c +++ b/src/ft_key_loop.c @@ -83,7 +83,7 @@ int { cl->key_ptr[cl->key_input[i]](cl); ft_collision(old_y, old_x, cl->key_input[i], cl); - if (cl->mlist.isnlvl && !cl->plist.isdead) + if (cl->mlist.isnlvl) { if ((uint32_t)cl->plist.pos_x == cl->mlist.nlx && (uint32_t)cl->plist.pos_y == cl->mlist.nly) @@ -95,7 +95,6 @@ int } i++; } - ft_printf("%hhu\n", cl->plist.isdead); if (cl->key_input[0] != -1) ft_draw_scene(cl); return (0); diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c index c5df30e..f1df73d 100644 --- a/src/ft_parse_map.c +++ b/src/ft_parse_map.c @@ -109,7 +109,6 @@ void ft_get_nlvl_pos(&clist->mlist); ft_check_missing(clist); ft_set_minimap_scale(clist); - if (!clist->plist.isdead) - clist->currlvl += 1; + clist->currlvl += 1; close(fd); } diff --git a/src/ft_suffer_animation.c b/src/ft_suffer_animation.c index 6933f56..3d9100a 100644 --- a/src/ft_suffer_animation.c +++ b/src/ft_suffer_animation.c @@ -40,7 +40,6 @@ void cl->plist.life -= 20; if (cl->plist.life <= 0) { - cl->plist.isdead = 1; ft_warp_level(cl->mlist.filename, cl); ft_sfx_death(cl); /* TODO death screen here */ @@ -74,7 +73,6 @@ void cl->plist.life -= 20; if (cl->plist.life <= 0) { - cl->plist.isdead = 1; ft_warp_level(cl->mlist.filename, cl); ft_sfx_death(cl); /* TODO death screen here */ |