diff options
author | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-02-29 19:57:42 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-02-29 19:57:42 +0100 |
commit | a693ca6d41955dae86d9d3298b762662a5899c62 (patch) | |
tree | f620cd78e6edcf849405389dfd03627654648ee0 | |
parent | Better collision merge (diff) | |
download | 42-cub3d-a693ca6d41955dae86d9d3298b762662a5899c62.tar.gz 42-cub3d-a693ca6d41955dae86d9d3298b762662a5899c62.tar.bz2 42-cub3d-a693ca6d41955dae86d9d3298b762662a5899c62.tar.xz 42-cub3d-a693ca6d41955dae86d9d3298b762662a5899c62.tar.zst 42-cub3d-a693ca6d41955dae86d9d3298b762662a5899c62.zip |
Normed
Diffstat (limited to '')
-rw-r--r-- | src/ft_get_res.c | 2 | ||||
-rw-r--r-- | src/ft_key_loop.c | 24 |
2 files changed, 3 insertions, 23 deletions
diff --git a/src/ft_get_res.c b/src/ft_get_res.c index e7b38c9..aa1bec4 100644 --- a/src/ft_get_res.c +++ b/src/ft_get_res.c @@ -40,7 +40,7 @@ static void } static int8_t -ft_check_res_args(char **words, t_cub *clist) + ft_check_res_args(char **words, t_cub *clist) { if (!(*words + 0) || !(*(words + 1)) || !(*(words + 2)) || (*(words + 3))) diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c index 429628e..f72125a 100644 --- a/src/ft_key_loop.c +++ b/src/ft_key_loop.c @@ -51,28 +51,8 @@ static void t_player *pl; pl = cl->plist; - x = pl->pos_x; - y = pl->pos_y; - if (key == 0) - { - x = ft_find_x(key, pl); - y = ft_find_y(key, pl); - } - else if (key == 1) - { - x = ft_find_x(key, pl); - y = ft_find_y(key, pl); - } - else if (key == 2) - { - x = ft_find_x(key, pl); - y = ft_find_y(key, pl); - } - else if (key == 3) - { - x = ft_find_x(key, pl); - y = ft_find_y(key, pl); - } + x = ft_find_x(key, pl); + y = ft_find_y(key, pl); if (cl->mlist->map[y][x] == '1' || cl->mlist->map[y][x] == '2') { pl->pos_y = old_y; |