void LimbData::Serialize(bin& ar) { int Version = 1; SerializeVersion(ar, Version); LAZY(cx); //origin from hotspot to pivot (for child) LAZY(cy); LAZY(px); //origin from hotspot to pivot (for parent) LAZY(py); LAZY(w); //width scale LAZY(h); LAZY(a); LAZY(opacity); LAZY(filter); }
void REMOVE(){ unsigned short int indice; struct celula *aux; if(inicio == NULL){ printf("Lista nao existe!\n"); getchar(); return; } aux = inicio; system("cls"); printf("++++++++++++++++++++++++++++++\n"); printf("+ Remove +\n"); printf("++++++++++++++++++++++++++++++\n\n"); printf("Digite o indice do elemento a remover: "); scanf("%hu", &indice); getchar(); while(aux != NULL && aux->pessoa.indice != indice){ aux = aux->proximo; } if(aux != NULL){ if(aux->pessoa.deletado == 1){ printf("Elemento ja havia sido deletado!\n"); } else{ aux->pessoa.deletado = 1; printf("O elemento foi deletado!\n"); removidos++; nremovidos--; LAZY(); } } else{ printf("O elemento nao existe!\n"); } getchar(); }
void INSERE(){ char nome[200]; unsigned short int idade; system("cls"); printf("++++++++++++++++++++++++++++++\n"); printf("+ Insere +\n"); printf("++++++++++++++++++++++++++++++\n\n"); printf("Digite o nome: "); scanf("%200[^\n]", nome); while(getchar() != '\n'); printf("Digite a idade: "); scanf("%hu", &idade); getchar(); if(inicio == NULL){ INICIA(); strncpy(inicio->pessoa.nome, nome, sizeof(nome)-1); inicio->pessoa.idade = idade; inicio->pessoa.indice = 1; inicio->pessoa.deletado = 0; } else{ fim->proximo = (struct celula*)malloc(sizeof(struct celula)); fim->proximo->anterior = fim; fim = fim->proximo; fim->proximo = NULL; strncpy(fim->pessoa.nome, nome, sizeof(nome)-1); fim->pessoa.idade = idade; fim->pessoa.indice = (fim->anterior->pessoa.indice) + 1; fim->pessoa.deletado = 0; } nremovidos++; printf("\nElemento Inserido!\n"); LAZY(); getchar(); }