resolve floating point exception when wliding through walls

This commit is contained in:
hugogogo
2022-04-28 23:42:15 +02:00
parent 9042b373a9
commit 81aef1eab0
7 changed files with 81 additions and 6 deletions

View File

@@ -1,9 +1,11 @@
#include "cube3d.h"
// temp, to map all the keys on linux and mac
static int print_keycode(int keycode)
static int print_keycode(int keycode, t_plr *plr)
{
ft_putnbr_fd(keycode, 1);
ft_putchar_fd(' ', 1);
ft_putnbr_fd(plr->rot, 1);
ft_putchar_fd('\n', 1);
return(0);
}
@@ -38,7 +40,7 @@ int keypress(int keycode, t_game *game)
unsigned i;
// temp
print_keycode(keycode);
print_keycode(keycode, &game->plr);
// temp end
i = 0;