diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-27 13:55:24 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-27 13:55:24 +0100 |
commit | b626f171f26f709b27e790911b48f7a4272dc707 (patch) | |
tree | de04209c5ffecc5f26baac853951bc1748c925d4 /src/ft_get_traps.c | |
parent | Ready to try traps (diff) | |
download | 42-cub3d-b626f171f26f709b27e790911b48f7a4272dc707.tar.gz 42-cub3d-b626f171f26f709b27e790911b48f7a4272dc707.tar.bz2 42-cub3d-b626f171f26f709b27e790911b48f7a4272dc707.tar.xz 42-cub3d-b626f171f26f709b27e790911b48f7a4272dc707.tar.zst 42-cub3d-b626f171f26f709b27e790911b48f7a4272dc707.zip |
In progress
Diffstat (limited to '')
-rw-r--r-- | src/ft_get_traps.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/ft_get_traps.c b/src/ft_get_traps.c index fef3179..db0699c 100644 --- a/src/ft_get_traps.c +++ b/src/ft_get_traps.c @@ -14,35 +14,35 @@ #include <cub3d.h> #include <stdint.h> -void - ft_get_trap_spawn(t_cub *clist) -{ - size_t x; - size_t y; - uint16_t i; +/* void */ +/* ft_get_trap_spawn(t_cub *clist) */ +/* { */ +/* size_t x; */ +/* size_t y; */ +/* uint16_t i; */ - x = 1; - y = 1; - i = 0; - while (clist->mlist.map[y]) - { - while (clist->mlist.map[y][x]) - { - if (clist->mlist.map[y][x] == 'T') - { - clist->mlist.traps_nbr++; - if (clist->mlist.traps_nbr > 512) - ft_map_error(FT_ERR_TOO_MUCH_TRAPS, clist); - clist->traps[i].s_pos_x = x; - clist->traps[i].s_pos_y = y; - i++; - } - x++; - } - x = 1; - y++; - } -} +/* x = 1; */ +/* y = 1; */ +/* i = 0; */ +/* while (clist->mlist.map[y]) */ +/* { */ +/* while (clist->mlist.map[y][x]) */ +/* { */ +/* if (clist->mlist.map[y][x] == 'T') */ +/* { */ +/* clist->mlist.traps_nbr++; */ +/* if (clist->mlist.traps_nbr > 512) */ +/* ft_map_error(FT_ERR_TOO_MUCH_TRAPS, clist); */ +/* clist->traps[i].s_pos_x = x; */ +/* clist->traps[i].s_pos_y = y; */ +/* i++; */ +/* } */ +/* x++; */ +/* } */ +/* x = 1; */ +/* y++; */ +/* } */ +/* } */ int8_t ft_get_traps(char **words, t_cub *clist) |