/* ************************************************************************** */ /* LE - / */ /* / */ /* ft_drawmap.c .:: .:/ . .:: */ /* +:+:+ +: +: +:+:+ */ /* By: rbousset +:+ +: +: +:+ */ /* #+# #+ #+ #+# */ /* Created: 2020/02/02 17:19:18 by rbousset #+# ## ## #+# */ /* Updated: 2020/02/02 17:19:19 by rbousset ### #+. /#+ ###.fr */ /* / */ /* / */ /* ************************************************************************** */ #include #include void ft_drawmap(t_cub *clist) { int x; int y; (void)clist; x = 0; y = 0; while (clist->map[x]) { while (clist->map[x][y]) { if (clist->map[x][y] == '1') ft_drawsquare(40 + (y * 41), 40 + (x * 41), 0x00aa99aa, clist); else if (clist->map[x][y] == '0') ft_drawsquare(40 + (y * 41), 40 + (x * 41), clist->f_color, clist); else if (clist->map[x][y] == '2') ft_drawsquare(40 + (y * 41), 40 + (x * 41), 0x0033ccff, clist); y++; } y = 0; x++; } }