void ft_arrow_left(t_lst **lst) { t_lst *tmp; int i; int move; i = 0; move = 0; tmp = *lst; if ((*lst)->nbr_w < tgetnum("li")) { if ((*lst)->next != *lst) move_tmp(tmp); } else { i = 0; while (tmp->select == 0) { tmp = tmp->next; i++; } tmp->select = 0; tmp = i_min_li(i, lst, tmp, move); tmp->select = 1; } }
void Block3D::nudge(Vector3f nudge) { Vector3f move_tmp(nudge); if (is_driven) { move_tmp.rotate(-dir); } offset.x += move_tmp.x; offset.z += move_tmp.z; offset.y += move_tmp.y; changed = true; }
void Block3D::move(Vector3f move) { Vector3f move_tmp(move); if (is_driven) { move_tmp.rotate(-dir); } pos.x += move_tmp.x; pos.z += move_tmp.z; pos.y += move_tmp.y; changed = true; for (list<Block3D*>::iterator it = children.begin(); it != children.end() ; it++) { (*it)->set_pos(pos); } }