diff options
author | Rudy Bousset <rbousset@z2r4p1.le-101.fr> | 2020-03-11 16:07:29 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p1.le-101.fr> | 2020-03-11 16:07:29 +0100 |
commit | 7f77c9bc922fb608f689385d642304956afe0492 (patch) | |
tree | 50ccbb70b2f39f6dbe2d8336165eea47b6b5c048 /src/ft_key_loop.c | |
parent | qweqwe (diff) | |
download | 42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.gz 42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.bz2 42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.xz 42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.zst 42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.zip |
Performance
Diffstat (limited to '')
-rw-r--r-- | src/ft_key_loop.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c index e0c2c28..45ed379 100644 --- a/src/ft_key_loop.c +++ b/src/ft_key_loop.c @@ -12,6 +12,7 @@ #include <libft.h> #include <cub3d.h> +#include <mlx.h> #include <stdint.h> #include <stddef.h> @@ -55,8 +56,8 @@ static void y = ft_find_y(key, pl); if (cl->mlist.map[y][x] == 'T') { - pl->pos_x = old_x + ((old_x - x) / 4); - pl->pos_y = old_y + ((old_y - y) / 4); + pl->pos_x = old_x + ((old_x - x) / 3); + pl->pos_y = old_y + ((old_y - y) / 3); ft_suffer_animation(cl); x = ft_find_x(key, pl); y = ft_find_y(key, pl); @@ -93,8 +94,6 @@ int i++; } if (cl->key_input[0] != -1) - { ft_draw_scene(cl); - } return (0); } |