diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-01-23 18:46:55 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-01-23 18:46:55 +0100 |
commit | dada4b12f07388262729a1b979e53e28bfb79db3 (patch) | |
tree | 4231057b3a7fc3fc2f4e100f9e188949df146023 /src/ft_key_events.c | |
parent | Pretty fine (diff) | |
download | 42-cub3d-dada4b12f07388262729a1b979e53e28bfb79db3.tar.gz 42-cub3d-dada4b12f07388262729a1b979e53e28bfb79db3.tar.bz2 42-cub3d-dada4b12f07388262729a1b979e53e28bfb79db3.tar.xz 42-cub3d-dada4b12f07388262729a1b979e53e28bfb79db3.tar.zst 42-cub3d-dada4b12f07388262729a1b979e53e28bfb79db3.zip |
Nice squares
Diffstat (limited to 'src/ft_key_events.c')
-rw-r--r-- | src/ft_key_events.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/ft_key_events.c b/src/ft_key_events.c index 82235fc..6702988 100644 --- a/src/ft_key_events.c +++ b/src/ft_key_events.c @@ -5,28 +5,28 @@ static int ft_w_key(void) { - ft_printf("w\n"); + ft_printf("[W]\n"); return (0); } static int ft_a_key(void) { - ft_printf("a\n"); + ft_printf("[A]\n"); return (0); } static int ft_s_key(void) { - ft_printf("s\n"); + ft_printf("[S]\n"); return (0); } static int ft_d_key(void) { - ft_printf("d\n"); + ft_printf("[D]\n"); return (0); } @@ -44,11 +44,10 @@ ft_key_event(int keycode, void *param) (keycode <= 3) ? ((*fun_ptr[keycode])()) : 0; if (keycode == 53) { - ft_memdel(((t_winlist*)param)->wlx); - ft_memdel(((t_winlist*)param)->winptr); - ft_memdel((t_winlist*)param); - ft_printf("Exiting program\n"); - exit(0); + ft_memdel(((t_win*)param)->wlx); + ft_memdel(((t_win*)param)->winptr); + ft_memdel((t_win*)param); + ft_exit(0); } return (0); } |