mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
feat: allocate screen_matrix on the heap
This commit is contained in:
parent
8d0a6d841b
commit
e625e254f7
7 changed files with 30 additions and 36 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
|
||||
/* Updated: 2025/07/31 11:28:04 by tchampio ### ########.fr */
|
||||
/* Updated: 2025/07/31 13:25:36 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -64,6 +64,7 @@ int main(int argc, char **argv)
|
|||
return (ft_printf("Error: Failed to initalize mlx\n"),
|
||||
free_map(data.map), 1);
|
||||
data.mlx_win = mlx_new_window(data.mlx, WIDTH, HEIGHT, "Cub3d");
|
||||
data.screen_matrix = ft_calloc(sizeof(int), WIDTH * HEIGHT);
|
||||
data.img_data = ft_calloc(sizeof(t_img_data), 1);
|
||||
data.img_data->img = mlx_new_image(data.mlx, WIDTH, HEIGHT);
|
||||
data.img_data->addr = mlx_get_data_addr(data.img_data->img,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue