mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
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:
parent
fa3cb8da4a
commit
1626b1d9da
4 changed files with 43 additions and 27 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/17 14:59:37 by kcolin #+# #+# */
|
||||
/* Updated: 2025/07/17 15:54:29 by kcolin ### ########.fr */
|
||||
/* Updated: 2025/07/29 12:26:32 by tchampio ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -16,14 +16,16 @@
|
|||
# include "map/mapdata.h"
|
||||
# include "draw/img_data.h"
|
||||
# include "player/player.h"
|
||||
#include "utils/hooks.h"
|
||||
|
||||
typedef struct s_cub3d_data
|
||||
{
|
||||
void *mlx;
|
||||
void *mlx_win;
|
||||
t_img_data *img_data;
|
||||
t_mapdata *map;
|
||||
t_player player;
|
||||
void *mlx;
|
||||
void *mlx_win;
|
||||
t_img_data *img_data;
|
||||
t_mapdata *map;
|
||||
t_player player;
|
||||
t_keypresses keypresses;
|
||||
} t_cub3d_data;
|
||||
|
||||
#endif // CUB3D_DATA_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue