aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_lists.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-01-23 18:11:10 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-01-23 18:11:10 +0100
commit85d3408331fe61d9dbbeb2231ff10ada1c73017e (patch)
tree03ae65eada7cf622c4d206c5fa4ad6f325720e67 /src/ft_init_lists.c
parentwindow now closes (diff)
download42-cub3d-85d3408331fe61d9dbbeb2231ff10ada1c73017e.tar.gz
42-cub3d-85d3408331fe61d9dbbeb2231ff10ada1c73017e.tar.bz2
42-cub3d-85d3408331fe61d9dbbeb2231ff10ada1c73017e.tar.xz
42-cub3d-85d3408331fe61d9dbbeb2231ff10ada1c73017e.tar.zst
42-cub3d-85d3408331fe61d9dbbeb2231ff10ada1c73017e.zip
Pretty good
Diffstat (limited to '')
-rw-r--r--src/ft_init_lists.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c
index c61dd45..b6f2932 100644
--- a/src/ft_init_lists.c
+++ b/src/ft_init_lists.c
@@ -12,8 +12,9 @@ t_winlist
wlist->x_size = 800;
wlist->y_size = 600;
wlist->wlx = mlx_init();
- wlist->winptr = (void*)malloc(800 * 600);
- wlist->winptr = mlx_new_window(wlist->wlx, 800, 600, "Cub3D");
+ wlist->winptr = (void*)malloc(wlist->x_size * wlist->y_size);
+ wlist->winptr = mlx_new_window(wlist->wlx, wlist->x_size, wlist->y_size, "Cub3D");
+ ft_printf("Created window of size %dx%d\n", wlist->x_size, wlist->y_size);
return (wlist);
}