From f922d1ed3235e3ce61c4e74420ae31354eb829d9 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 2 Apr 2020 16:16:45 +0200 Subject: Revert this if needed, still sprites and collision to do --- src/ft_basic_keys.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/ft_basic_keys.c') diff --git a/src/ft_basic_keys.c b/src/ft_basic_keys.c index 2d029ff..48a1305 100644 --- a/src/ft_basic_keys.c +++ b/src/ft_basic_keys.c @@ -20,34 +20,34 @@ int const float move_speed = FT_MOVE_SPEED; pl = &clist->plist; - pl->pos_y += move_speed * pl->dir_y; + pl->pos_y += move_speed * -pl->dir_y; pl->pos_x += move_speed * pl->dir_x; clist->moves = 1; return (0); } int - ft_a_key(t_cub *clist) + ft_s_key(t_cub *clist) { t_player *pl; - const float move_speed = FT_STRAFE_SPEED; + const float move_speed = FT_MOVE_SPEED; pl = &clist->plist; - pl->pos_y += move_speed * -pl->dir_x; - pl->pos_x += move_speed * pl->dir_y; + pl->pos_y += move_speed * pl->dir_y; + pl->pos_x += move_speed * -pl->dir_x; clist->moves = 1; return (0); } int - ft_s_key(t_cub *clist) + ft_a_key(t_cub *clist) { t_player *pl; - const float move_speed = FT_MOVE_SPEED; + const float move_speed = FT_STRAFE_SPEED; pl = &clist->plist; - pl->pos_y += move_speed * -pl->dir_y; - pl->pos_x += move_speed * -pl->dir_x; + pl->pos_y += move_speed * -pl->dir_x; + pl->pos_x += move_speed * -pl->dir_y; clist->moves = 1; return (0); } @@ -60,7 +60,7 @@ int pl = &clist->plist; pl->pos_y += move_speed * pl->dir_x; - pl->pos_x += move_speed * -pl->dir_y; + pl->pos_x += move_speed * pl->dir_y; clist->moves = 1; return (0); } -- cgit v1.2.3