diff --git a/src/main.c b/src/main.c index dd73434..7edf1ea 100644 --- a/src/main.c +++ b/src/main.c @@ -6,7 +6,7 @@ /* By: kcolin +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */ -/* Updated: 2025/07/21 11:50:30 by kcolin ### ########.fr */ +/* Updated: 2025/07/22 12:50:14 by kcolin ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,7 +35,7 @@ int game_loop(t_cub3d_data *data) data->player.x += data->player.movement.x; data->player.y += data->player.movement.y; mlx_destroy_image(data->mlx, data->img_data->img); - data->img_data->img = mlx_new_image(data->mlx, 800, 600); + data->img_data->img = mlx_new_image(data->mlx, WIDTH, HEIGHT); draw_map(data->map, &data->player, data->img_data); mlx_put_image_to_window(data->mlx, data->mlx_win, data->img_data->img, 0, 0); @@ -57,9 +57,9 @@ int main(int argc, char **argv) if (data.mlx == NULL) return (ft_printf("Error: Failed to initalize mlx\n"), free_map(data.map), 1); - data.mlx_win = mlx_new_window(data.mlx, 800, 600, "Cub3d"); + data.mlx_win = mlx_new_window(data.mlx, WIDTH, HEIGHT, "Cub3d"); data.img_data = ft_calloc(sizeof(t_img_data), 1); - data.img_data->img = mlx_new_image(data.mlx, 800, 600); + data.img_data->img = mlx_new_image(data.mlx, WIDTH, HEIGHT); data.img_data->addr = mlx_get_data_addr(data.img_data->img, &data.img_data->bits_per_pixel, &data.img_data->line_length, &data.img_data->endian);