1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#include <libft.h> #include <cub3d.h> 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), clist->f_color, clist); y++; } y = 0; x++; } }