aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_basic_keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_basic_keys.c')
-rw-r--r--src/ft_basic_keys.c20
1 files changed, 10 insertions, 10 deletions
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);
}