static void st_put_img_view(t_env *e, t_case *field, int x, int y) { ft_print_img(e, FIELD_VOID.ptr, x, y); if (field->l) ft_print_img(e, OBJ_V_L.ptr, x + 5, y + 40); if (field->d) ft_print_img(e, OBJ_V_D.ptr, x + 70, y + 4); if (field->s) ft_print_img(e, OBJ_V_S.ptr, x + 70, y + 35); if (field->m) ft_print_img(e, OBJ_V_M.ptr, x + 5, y + 75); if (field->p) ft_print_img(e, OBJ_V_P.ptr, x + 70, y + 70); if (field->t) ft_print_img(e, OBJ_V_T.ptr, x + 4, y); if (field->food) ft_print_img(e, OBJ_V_FOOD.ptr, x + 40, y + 72); if (field->my_player) ft_print_img_my_player_view(e, field, x, y); if (field->other_player) ft_print_img(e, OBJ_V_OTHER.ptr, x + 40, y + 0); }
static void st_put_img_fog(t_env *e, t_case *field, int x, int y) { ft_print_img(e, FIELD_FOG.ptr, x, y); if (field->l) ft_print_img(e, OBJ_FOG_L.ptr, x + 5, y + 40); if (field->d) ft_print_img(e, OBJ_FOG_D.ptr, x + 70, y + 4); if (field->s) ft_print_img(e, OBJ_FOG_S.ptr, x + 70, y + 35); if (field->m) ft_print_img(e, OBJ_FOG_M.ptr, x + 5, y + 75); if (field->p) ft_print_img(e, OBJ_FOG_P.ptr, x + 70, y + 70); if (field->t) ft_print_img(e, OBJ_FOG_T.ptr, x + 4, y); if (field->food) ft_print_img(e, OBJ_FOG_FOOD.ptr, x + 40, y + 72); if (field->my_player) ft_print_img_my_player_fog(e, field, x, y); }
void ft_print_rest(t_env *e) { if (g_philo[0].state == en_rest) ft_print_img(70, 400, e, "./img/rest.xpm"); if (g_philo[1].state == en_rest) ft_print_img(70, 600, e, "./img/rest.xpm"); if (g_philo[2].state == en_rest) ft_print_img(150, 700, e, "./img/rest.xpm"); if (g_philo[3].state == en_rest) ft_print_img(300, 680, e, "./img/rest.xpm"); if (g_philo[4].state == en_rest) ft_print_img(350, 500, e, "./img/rest.xpm"); if (g_philo[5].state == en_rest) ft_print_img(300, 320, e, "./img/rest.xpm"); if (g_philo[6].state == en_rest) ft_print_img(150, 300, e, "./img/rest.xpm"); }
void ft_print_eat(t_env *e) { if (g_philo[0].state == en_eat) ft_print_img(70, 360, e, "./img/baguette.xpm"); if (g_philo[1].state == en_eat) ft_print_img(70, 560, e, "./img/baguette.xpm"); if (g_philo[2].state == en_eat) ft_print_img(150, 660, e, "./img/baguette.xpm"); if (g_philo[3].state == en_eat) ft_print_img(300, 640, e, "./img/baguette.xpm"); if (g_philo[4].state == en_eat) ft_print_img(350, 460, e, "./img/baguette.xpm"); if (g_philo[5].state == en_eat) ft_print_img(300, 280, e, "./img/baguette.xpm"); if (g_philo[6].state == en_eat) ft_print_img(150, 260, e, "./img/baguette.xpm"); }