feat: adding all the textures

This commit is contained in:
Raphael 2024-12-05 16:34:12 +01:00
parent 954c5f76d6
commit badd6534f4
11 changed files with 276 additions and 13 deletions

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/11 19:53:42 by rparodi #+# #+# */
/* Updated: 2024/12/01 18:02:27 by rparodi ### ########.fr */
/* Updated: 2024/12/02 00:20:25 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -41,8 +41,8 @@ t_win_list *c3_init_mlx_window(t_info *info)
{
mlx_get_screen_size(info->mlx_ptr, \
&info->screen_size.x, &info->screen_size.y);
info->screen_size.x *= WIN_COEF;
info->screen_size.y *= WIN_COEF;
/*info->screen_size.x *= WIN_COEF;*/
/*info->screen_size.y *= WIN_COEF;*/
ft_clamp(info->screen_size.x, 0, 1920);
ft_clamp(info->screen_size.y, 0, 1080);
return (\

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/20 12:25:45 by rparodi #+# #+# */
/* Updated: 2024/11/20 15:20:23 by rparodi ### ########.fr */
/* Updated: 2024/12/02 17:54:04 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -32,6 +32,9 @@ bool mlx_load_all_textures(t_info *info)
i = 0;
info->map.texture[0] = mlx_load_image(info, "../textures/a.xpm");
info->map.texture[1] = mlx_load_image(info, "../textures/b.xpm");
info->map.texture[2] = mlx_load_image(info, "../textures/sandy_32.xpm");
info->map.texture[3] = mlx_load_image(info, "../textures/cobblestone_32.xpm");
while (i < 4)
{
if (!info->map.texture[i])