params adjust angle of view and size of game window

This commit is contained in:
hugogogo
2022-04-24 11:14:08 +02:00
parent fac1f78230
commit c886118bd6
9 changed files with 135 additions and 103 deletions

View File

@@ -1,12 +1,12 @@
#include "cube3d.h"
// temp, to map all the keys on linux and mac
static int print_keycode(int keycode)
{
ft_putnbr_fd(keycode, 1);
ft_putchar_fd('\n', 1);
return(0);
}
static int print_keycode(int keycode)
{
ft_putnbr_fd(keycode, 1);
ft_putchar_fd('\n', 1);
return(0);
}
// temp end
int hook_action(t_game *game)
@@ -38,7 +38,7 @@ int keypress(int keycode, t_game *game)
unsigned i;
// temp
print_keycode(keycode);
print_keycode(keycode);
// temp end
i = 0;
@@ -48,7 +48,7 @@ int keypress(int keycode, t_game *game)
game->k_hook[i] = 0;
else if (i < MAX_NB_KEY)
game->k_hook[i] = keycode;
hook_action(game);
// hook_action(game);
return (0);
}