diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_get_player_spawn.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/ft_get_player_spawn.c b/src/ft_get_player_spawn.c index c506775..8642096 100644 --- a/src/ft_get_player_spawn.c +++ b/src/ft_get_player_spawn.c @@ -16,37 +16,37 @@ #include <stdint.h> static void + ft_get_s_dir(t_player *pl) +{ + pl->dir_y = -pl->dir_y; + pl->dir_x = -pl->dir_x; + pl->plane_x = -pl->plane_x; + pl->plane_y = -pl->plane_y; +} + +static void ft_get_e_dir(t_player *pl) { - float sav_dir_x; + float sav_dir_y; float sav_plane_x; - sav_dir_x = pl->dir_x; - pl->dir_x = -pl->dir_y; - pl->dir_y = sav_dir_x; + sav_dir_y = pl->dir_y; + pl->dir_y = -pl->dir_x; + pl->dir_x = -sav_dir_y; sav_plane_x = pl->plane_x; pl->plane_x = -pl->plane_y; pl->plane_y = sav_plane_x; } static void - ft_get_s_dir(t_player *pl) -{ - pl->dir_x = -pl->dir_x; - pl->dir_y = -pl->dir_y; - pl->plane_x = -pl->plane_x; - pl->plane_y = -pl->plane_y; -} - -static void ft_get_w_dir(t_player *pl) { - float sav_dir_x; + float sav_dir_y; float sav_plane_x; - sav_dir_x = pl->dir_x; - pl->dir_x = pl->dir_y; - pl->dir_y = -sav_dir_x; + sav_dir_y = pl->dir_y; + pl->dir_y = pl->dir_x; + pl->dir_x = sav_dir_y; sav_plane_x = pl->plane_x; pl->plane_x = pl->plane_y; pl->plane_y = -sav_plane_x; |