From be777c78a3f69d7888a6fbbaa997834f1a27e981 Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 26 Oct 2013 18:03:14 +0000 Subject: [PATCH] Remove unused function med_copy_segment --- common/include/editor/editor.h | 4 ---- similar/editor/segment.cpp | 24 ------------------------ 2 files changed, 28 deletions(-) diff --git a/common/include/editor/editor.h b/common/include/editor/editor.h index ef25d3670..898df47b4 100644 --- a/common/include/editor/editor.h +++ b/common/include/editor/editor.h @@ -278,10 +278,6 @@ extern int create_new_mine(void); // extern void med_create_segment(segment *sp, vms_vector *scale); extern void old_med_attach_segment(struct segment *sp,int main_side,int branch_side,fix cx, fix cy, fix cz, fix length, fix width, fix height, vms_matrix *mp); -// Copy a segment from *ssp to *dsp. Do not simply copy the struct. Use *dsp's vertices, copying in -// just the values, not the indices. -extern void med_copy_segment(struct segment *dsp,struct segment *ssp); - // Create a segment given center, dimensions, rotation matrix. // Note that the created segment will always have planar sides and rectangular cross sections. // It will be created with walls on all sides, ie not connected to anything. diff --git a/similar/editor/segment.cpp b/similar/editor/segment.cpp index de6b8f96c..455587e9f 100644 --- a/similar/editor/segment.cpp +++ b/similar/editor/segment.cpp @@ -1637,30 +1637,6 @@ void init_all_vertices(void) } -// -------------------------------------------------------------------------------------------------- -// Copy a segment from *ssp to *dsp. Do not simply copy the struct. Use *dsp's vertices, copying in -// just the values, not the indices. -void med_copy_segment(segment *dsp,segment *ssp) -{ - int v; - int verts_copy[MAX_VERTICES_PER_SEGMENT]; - - // First make a copy of the vertex list. - for (v=0; vverts[v]; - - // Now copy the whole struct. - *dsp = *ssp; - - // Now restore the vertex indices. - for (v=0; vverts[v] = verts_copy[v]; - - // Now destructively modify the vertex values for all vertex indices. - for (v=0; vverts[v]] = Vertices[ssp->verts[v]]; -} - // ----------------------------------------------------------------------------- // Create coordinate axes in orientation of specified segment, stores vertices at *vp. void create_coordinate_axes_from_segment(segment *sp,int *vertnums)