diff options
-rw-r--r-- | src/ft_draw_sprite_extra.c | 4 | ||||
-rw-r--r-- | src/ft_extra_keys.c | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/ft_draw_sprite_extra.c b/src/ft_draw_sprite_extra.c index de02f86..00e295e 100644 --- a/src/ft_draw_sprite_extra.c +++ b/src/ft_draw_sprite_extra.c @@ -39,9 +39,9 @@ static void ft_init_sprite(t_cub *cl, t_sprite *sprite) { sprite->invdet = 1.0 / - (cl->plist.plane_x * cl->plist.dir_x + (cl->plist.plane_x * -cl->plist.dir_x - cl->plist.dir_y * cl->plist.plane_y); - sprite->transformx = sprite->invdet * (cl->plist.dir_x * sprite->spritex + sprite->transformx = sprite->invdet * (-cl->plist.dir_x * sprite->spritex - cl->plist.dir_y * sprite->spritey); sprite->transformy = sprite->invdet * (cl->plist.plane_y * sprite->spritex - cl->plist.plane_x * sprite->spritey); diff --git a/src/ft_extra_keys.c b/src/ft_extra_keys.c index 1a81820..c1ea721 100644 --- a/src/ft_extra_keys.c +++ b/src/ft_extra_keys.c @@ -17,7 +17,6 @@ #include <libft.h> #include <pthread.h> -#include <stdio.h> int ft_left_key(t_cub *clist) { @@ -33,8 +32,6 @@ int sav_plane_x = pl->plane_x; pl->plane_x = pl->plane_x * cos(rot_speed) - pl->plane_y * sin(rot_speed); pl->plane_y = sav_plane_x * sin(rot_speed) + pl->plane_y * cos(rot_speed); - printf("dir_y %+f\n", pl->dir_y); - printf("dir_x %+f\n\n", pl->dir_x); return (0); } @@ -53,8 +50,6 @@ int sav_plane_x = pl->plane_x; pl->plane_x = pl->plane_x * cos(-rot_speed) - pl->plane_y * sin(-rot_speed); pl->plane_y = sav_plane_x * sin(-rot_speed) + pl->plane_y * cos(-rot_speed); - printf("dir_y %+f\n", pl->dir_y); - printf("dir_x %+f\n\n", pl->dir_x); return (0); } |