feat: advancement on map parse
This commit is contained in:
parent
7321db26d9
commit
d586acba8f
11 changed files with 257 additions and 123 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/11/11 19:53:42 by rparodi #+# #+# */
|
||||
/* Updated: 2024/11/12 06:19:04 by bgoulard ### ########.fr */
|
||||
/* Updated: 2024/11/15 09:10:15 by bgoulard ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -20,11 +20,11 @@
|
|||
|
||||
int c3_frame_update(void *inf_ptr);
|
||||
|
||||
/* move player w keys and call to redraw screen */
|
||||
int c3_keyhook(int keycode, t_info *info)
|
||||
{
|
||||
if (keycode == XK_Escape || keycode == 65307)
|
||||
return (mlx_loop_end(info->mlx_ptr), EXIT_SUCCESS);
|
||||
/* move player w keys and call to redraw screen */
|
||||
return (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
@ -35,8 +35,8 @@ int c3_redcross(t_info *info)
|
|||
|
||||
t_win_list *c3_init_mlx_window(t_info *info)
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int x;
|
||||
int y;
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
|
|
@ -53,7 +53,8 @@ int init_mlx_env(t_info *info)
|
|||
if (!info->win_ptr)
|
||||
return (ERROR_MLX);
|
||||
mlx_hook(info->win_ptr, KeyPress, KeyPressMask, c3_keyhook, info);
|
||||
mlx_hook(info->win_ptr, DestroyNotify, StructureNotifyMask, c3_redcross, info);
|
||||
mlx_hook(info->win_ptr, DestroyNotify, StructureNotifyMask, c3_redcross, \
|
||||
info);
|
||||
mlx_loop_hook(info->mlx_ptr, c3_frame_update, info);
|
||||
return (NO_ERROR);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue