fix(hooks): Reworked keypresses events

Keypresses (along with keyreleases) events are now using booleans, a
function in the game loop will apply various changes as the key are
pressed. By default every boolean are set to false
This commit is contained in:
Theo Champion 2025-07-29 12:31:05 +02:00
parent fa3cb8da4a
commit 1626b1d9da
4 changed files with 43 additions and 27 deletions

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
/* Updated: 2025/07/28 17:18:38 by tchampio ### ########.fr */
/* Updated: 2025/07/29 12:33:46 by tchampio ### ########.fr */
/* */
/* ************************************************************************** */
@ -162,6 +162,7 @@ int main(int argc, char **argv)
if (argc < 2)
return (ft_printf("Error: Missing cub3d file\n"), 1);
ft_bzero(&data, sizeof(data));
data.map = ft_calloc(sizeof(t_mapdata), 1);
if (!check_cubfile(argv[1], data.map))
return (ft_printf("Error: Wrong map file. Reason: %s\n",