void sprite_add_copy(sprite *spr, sprite *spr_copy) { spr->subcount = spr_copy->subcount; spr->width = spr_copy->width; spr->height = spr_copy->height; spr->xoffset = spr_copy->xoffset; spr->yoffset = spr_copy->yoffset; for (int i = 0; i < spr->subcount; i++) { spr->texturearray.push_back(graphics_duplicate_texture(spr_copy->texturearray[i])); spr->texbordxarray.push_back(spr_copy->texbordxarray[i]); spr->texbordyarray.push_back(spr_copy->texbordyarray[i]); } }
void sprite_add_copy(sprite *spr, sprite *spr_copy) { spr->subcount = spr_copy->subcount; spr->width = spr_copy->width; spr->height = spr_copy->height; spr->xoffset = spr_copy->xoffset; spr->yoffset = spr_copy->yoffset; spr->texturearray = new unsigned int[spr_copy->subcount]; spr->texbordxarray = new double[spr_copy->subcount]; spr->texbordyarray = new double[spr_copy->subcount]; for (int i = 0; i < spr->subcount; i++) { spr->texturearray[i] = graphics_duplicate_texture(spr_copy->texturearray[i]); spr->texbordxarray[i] = spr_copy->texbordxarray[i]; spr->texbordyarray[i] = spr_copy->texbordyarray[i]; } }